Home
last modified time | relevance | path

Searched refs:Matrix (Results 1 – 25 of 606) sorted by relevance

12345678910>>...25

/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp32/
Dattention_fp32.h25 typedef struct Matrix { struct
34 } Matrix; argument
36 int InitMatrix(Matrix *matrix, int batch, int row, int col, bool is_trans);
38 size_t LeftMatrixPackElementSize(Matrix *matrix, int row_tile);
40 size_t RightMatrixPackElementSize(Matrix *matrix, int col_tile);
42 int PackLeftMatrix(Matrix *matrix, int row_tile);
44 int PackRightMatrix(Matrix *matrix, int col_tile);
46 int PackAttentionBias(Matrix *matrix, int tile);
48 …ithPosition(RelativePositionAttentionParameter *param, Matrix *q_mat, const Matrix *wq_mat, Matrix
49 Matrix *q2wq_mat, Matrix *pu_mat, Matrix *pv_mat, Matrix *q2wq_with_pos_mat,
[all …]
Dattention_fp32.c26 int InitMatrix(Matrix *matrix, int batch, int row, int col, bool is_trans) { in InitMatrix()
39 size_t LeftMatrixPackElementSize(Matrix *matrix, int row_tile) { in LeftMatrixPackElementSize()
53 size_t RightMatrixPackElementSize(Matrix *matrix, int col_tile) { in RightMatrixPackElementSize()
67 int PackLeftMatrix(Matrix *matrix, int row_tile) { in PackLeftMatrix()
129 int PackRightMatrix(Matrix *matrix, int col_tile) { in PackRightMatrix()
190 int PackAttentionBias(Matrix *matrix, int tile) { in PackAttentionBias()
252 static void RelativeShift(const Matrix *x, float *pad_buf, float *slice_buf) { in RelativeShift()
319 …ithPosition(RelativePositionAttentionParameter *param, Matrix *q_mat, const Matrix *wq_mat, Matrix in QWithPosition()
320 Matrix *q2wq_mat, Matrix *pu_mat, Matrix *pv_mat, Matrix *q2wq_with_pos_mat, in QWithPosition()
321 Matrix *q2wq_with_pu_trans_mat, Matrix *q2wq_with_pv_trans_mat) { in QWithPosition()
[all …]
/third_party/skia/third_party/externals/swiftshader/src/Renderer/
DMatrix.hpp24 struct Matrix struct
26 Matrix();
27 Matrix(const int i);
28 Matrix(const float m[16]);
29 Matrix(const float m[4][4]);
30 Matrix(float m11, float m12, float m13,
33 Matrix(float m11, float m12, float m13, float m14,
37 Matrix(const Vector &v1, const Vector &v2, const Vector &v3); // Column vectors
42 static Matrix diag(float m11, float m22, float m33, float m44);
46 Matrix operator+() const;
[all …]
DMatrix.cpp22 Matrix Matrix::diag(float m11, float m22, float m33, float m44) in diag()
24 return Matrix(m11, 0, 0, 0, in diag()
30 Matrix::operator float*() in operator float*()
35 Matrix Matrix::operator+() const in operator +()
40 Matrix Matrix::operator-() const in operator -()
42 const Matrix &M = *this; in operator -()
44 return Matrix(-M(1, 1), -M(1, 2), -M(1, 3), -M(1, 4), in operator -()
50 Matrix Matrix::operator!() const in operator !()
52 const Matrix &M = *this; in operator !()
53 Matrix I; in operator !()
[all …]
DVertexProcessor.hpp206 void setModelMatrix(const Matrix &M, int i = 0);
207 void setViewMatrix(const Matrix &V);
208 void setBaseMatrix(const Matrix &B);
209 void setProjectionMatrix(const Matrix &P);
250 void setTextureMatrix(int stage, const Matrix &T);
286 const Matrix &getModelTransform(int i);
287 const Matrix &getViewTransform();
327 void setTransform(const Matrix &M, int i);
328 void setCameraTransform(const Matrix &M, int i);
329 void setNormalTransform(const Matrix &M, int i);
[all …]
/third_party/vk-gl-cts/framework/common/
DtcuMatrix.hpp35 class Matrix class
48 Matrix (void);
49 explicit Matrix (const T& src);
50 explicit Matrix (const T src[Rows*Cols]);
51 Matrix (const Vector<T, Rows>& src);
52 Matrix (const Matrix<T, Rows, Cols>& src);
53 ~Matrix (void);
55 Matrix<T, Rows, Cols>& operator= (const Matrix<T, Rows, Cols>& src);
56 Matrix<T, Rows, Cols>& operator*= (const Matrix<T, Rows, Cols>& src);
82 Matrix<T, Rows0, Cols1> operator* (const Matrix<T, Rows0, Cols0>& a, const Matrix<T, Rows1, Cols1>&…
[all …]
DtcuMatrixUtil.hpp34 Matrix<T, Size+1, Size+1> translationMatrix (const Vector<T, Size>& translation);
37 Matrix<T, Cols, Rows> transpose (const Matrix<T, Rows, Cols>& mat);
40 Matrix<float, 2, 2> rotationMatrix (float radians);
41 Matrix<float, 2, 2> shearMatrix (const Vector<float, 2>& shear);
44 Matrix<float, 3, 3> rotationMatrixX (float radiansX);
45 Matrix<float, 3, 3> rotationMatrixY (float radiansY);
46 Matrix<float, 3, 3> rotationMatrixZ (float radiansZ);
52 inline Matrix<T, Len+1, Len+1> translationMatrix (const Vector<T, Len>& translation) in translationMatrix()
54 Matrix<T, Len+1, Len+1> res = Matrix<T, Len+1, Len+1>(); in translationMatrix()
61 inline Matrix<T, Cols, Rows> transpose (const Matrix<T, Rows, Cols>& mat) in transpose()
[all …]
/third_party/mindspore/mindspore/lite/src/runtime/kernel/arm/fp32/
Drelative_position_attention_fp32.h82 Matrix input_q_mat_{}; // [1, q_seq, d_model]
83 Matrix input_k_mat_{}; // [1, k_seq, d_model]
84 Matrix input_v_mat_{}; // [1, v_seq, d_model] // v_seq = k_seq
85 Matrix input_p_mat_{}; // [1, p_seq, d_model] // p_seq/2 = k_seq
86 Matrix weight_q_mat_{}; // [d_model, d_model]
87 Matrix weight_k_mat_{}; // [d_model, d_model]
88 Matrix weight_v_mat_{}; // [d_model, d_model]
89 Matrix weight_p_mat_{}; // [d_model, d_model]
90 Matrix weight_o_mat_{}; // [d_model, d_model]
91 Matrix bias_q_mat_{}; // [d_model]
[all …]
/third_party/boost/boost/numeric/ublas/
Dmatrix_vector.hpp35 template<class Matrix, class Reference>
37 matrix_vector_iterator<Matrix,Reference>,
47 matrix_vector_iterator(Matrix& matrix, std::size_t position) in matrix_vector_iterator()
93 Matrix* matrix_;//no matrix_closure here to ensure easy usage
107 template<class Matrix>
110 typedef ublas::matrix_row<Matrix> value_type;
111 typedef ublas::matrix_row<Matrix> reference;
112 typedef ublas::matrix_row<Matrix const> const_reference;
114 typedef ublas::detail::matrix_vector_iterator<Matrix, ublas::matrix_row<Matrix> > iterator;
115 …typedef ublas::detail::matrix_vector_iterator<Matrix const, ublas::matrix_row<Matrix const> const>…
[all …]
/third_party/skia/platform_tools/android/apps/AndroidKit/src/main/java/org/skia/androidkit/
DMatrix.java15 public class Matrix { class
21 public Matrix() { in Matrix() method in Matrix
31 public Matrix(float m0, float m4, float m8, float m12, in Matrix() method in Matrix
41 Matrix(long nativeInstance) { in Matrix() method in Matrix
45 public static Matrix makeLookAt(float eyeX, float eyeY, float eyeZ, in makeLookAt()
48 return new Matrix(nCreateLookAt(eyeX, eyeY, eyeZ, in makeLookAt()
53 public static Matrix makePerspective(float near, float far, float angle) { in makePerspective()
54 return new Matrix(nCreatePerspective(near, far, angle)); in makePerspective()
57 public static Matrix makeInverse(Matrix m) throws RuntimeException { in makeInverse()
63 return new Matrix(nativeMatrix); in makeInverse()
[all …]
/third_party/boost/libs/numeric/ublas/test/
Dtest_matrix_vector.cpp32 template <class Matrix>
36 typedef matrix_row_vector<Matrix> RowVector; in test_matrix_row_facade()
41 typename Matrix::size_type num_rows = 3; in test_matrix_row_facade()
42 typename Matrix::size_type num_cols = 5; in test_matrix_row_facade()
44 Matrix matrix(num_rows, num_cols); in test_matrix_row_facade()
50 typename Matrix::size_type new_num_rows = 6; in test_matrix_row_facade()
51 guardSparsePreserveResize( rows, new_num_rows, typename Matrix::storage_category()); in test_matrix_row_facade()
62 Matrix A(3,3), RA(3,3); in test_matrix_row_facade()
69 for(typename Matrix::size_type i = 0; i < A.size1(); i++) { in test_matrix_row_facade()
70 rows(i) = matrix_row<Matrix>(RA, i); in test_matrix_row_facade()
[all …]
/third_party/boost/boost/geometry/algorithms/detail/relation/
Dinterface.hpp44 template <typename Matrix, typename Strategy>
45 static inline Matrix apply(Geometry1 const& geometry1, in apply()
57 Matrix in apply()
69 template <typename Matrix, typename Strategy>
70 struct visitor : boost::static_visitor<Matrix>
79 Matrix operator()(Geometry1 const& geometry1) const in operator ()()
82 ::template apply<Matrix>(geometry1, m_geometry2, m_strategy); in operator ()()
86 template <typename Matrix, typename Strategy>
87 static inline Matrix
92 return boost::apply_visitor(visitor<Matrix, Strategy>(geometry2, strategy), geometry1); in apply()
[all …]
/third_party/skia/third_party/externals/tint/src/sem/
Dmatrix_type.cc20 TINT_INSTANTIATE_TYPEINFO(tint::sem::Matrix);
25 Matrix::Matrix(const Vector* column_type, uint32_t columns) in Matrix() function in tint::sem::Matrix
36 Matrix::Matrix(Matrix&&) = default;
38 Matrix::~Matrix() = default;
40 std::string Matrix::type_name() const { in type_name()
45 std::string Matrix::FriendlyName(const SymbolTable& symbols) const { in FriendlyName()
52 bool Matrix::IsConstructible() const { in IsConstructible()
56 uint32_t Matrix::Size() const { in Size()
60 uint32_t Matrix::Align() const { in Align()
64 uint32_t Matrix::ColumnStride() const { in ColumnStride()
Dmatrix_type.h29 class Matrix : public Castable<Matrix, Type> {
34 Matrix(const Vector* column_type, uint32_t columns);
36 Matrix(Matrix&&);
37 ~Matrix() override;
/third_party/flutter/skia/platform_tools/android/apps/skar_java/src/main/java/com/google/skar/
DCanvasMatrixUtil.java19 import android.graphics.Matrix;
46 public static Matrix createPerspectiveMatrix(float[] model, float[] view, float[] projection, in createPerspectiveMatrix()
64 android.opengl.Matrix.setIdentityM(viewPort, 0); in createViewportMatrix()
65 android.opengl.Matrix.translateM(viewPort, 0, width / 2, height / 2, 0); in createViewportMatrix()
66 android.opengl.Matrix.scaleM(viewPort, 0, width / 2, -height / 2, 0); in createViewportMatrix()
80 android.opengl.Matrix.setIdentityM(rotation, 0); in createXYtoXZRotationMatrix()
81 android.opengl.Matrix.rotateM(rotation, 0, 90, 1, 0, 0); in createXYtoXZRotationMatrix()
94 public static Matrix createMatrixFrom4x4(float[] m4) { in createMatrixFrom4x4()
108 public static Matrix createMatrixFrom4x4Array(float[][] m4Array) { in createMatrixFrom4x4Array()
125 android.opengl.Matrix.multiplyMV(result, 0, m4, 0, v4, 0); in multiplyMatrixVector()
[all …]
/third_party/skia/third_party/externals/tint/src/ast/
Dmatrix.cc19 TINT_INSTANTIATE_TYPEINFO(tint::ast::Matrix);
24 Matrix::Matrix(ProgramID pid, in Matrix() function in tint::ast::Matrix
37 Matrix::Matrix(Matrix&&) = default;
39 Matrix::~Matrix() = default;
41 std::string Matrix::FriendlyName(const SymbolTable& symbols) const { in FriendlyName()
48 const Matrix* Matrix::Clone(CloneContext* ctx) const { in Clone()
52 return ctx->dst->create<Matrix>(src, ty, rows, columns); in Clone()
Dmatrix.h26 class Matrix : public Castable<Matrix, Type> {
34 Matrix(ProgramID pid,
40 Matrix(Matrix&&);
41 ~Matrix() override;
51 const Matrix* Clone(CloneContext* ctx) const override;
/third_party/boost/libs/multiprecision/test/
Deigen.hpp23 Matrix<Num, 2, 2> r1, r2; in example1()
26 Matrix<Num, 3, 1> r3; in example1()
29 Matrix<Num, 2, 2> a; in example1()
31 Matrix<Num, Dynamic, Dynamic> b(2, 2); in example1()
43 Matrix<Num, 3, 1> v(1, 2, 3); in example1()
44 Matrix<Num, 3, 1> w(1, 0, 0); in example1()
53 Matrix<Num, 2, 2> a; in example2()
55 Matrix<Num, 3, 1> v(1, 2, 3); in example2()
89 Matrix<Num, Dynamic, Dynamic> a = Matrix<Num, Dynamic, Dynamic>::Random(2, 2); in example3()
103 Matrix<Num, 2, 2> mat; in example4()
[all …]
/third_party/boost/boost/geometry/algorithms/detail/relate/
Dresult.hpp130 template <typename Matrix>
134 typedef Matrix result_type;
168 static const bool in_bounds = F1 < Matrix::static_height in set()
169 && F2 < Matrix::static_width; in set()
177 static const bool in_bounds = F1 < Matrix::static_height in update()
178 && F2 < Matrix::static_width; in update()
187 static const std::size_t index = F1 * Matrix::static_width + F2; in set_dispatch()
188 BOOST_STATIC_ASSERT(index < Matrix::static_size); in set_dispatch()
199 static const std::size_t index = F1 * Matrix::static_width + F2; in update_dispatch()
200 BOOST_STATIC_ASSERT(index < Matrix::static_size); in update_dispatch()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/CodeGen/PBQP/
DMath.h121 class Matrix {
123 friend hash_code hash_value(const Matrix &);
127 Matrix(unsigned Rows, unsigned Cols) : in Matrix() function
133 Matrix(unsigned Rows, unsigned Cols, PBQPNum InitVal) in Matrix() function
140 Matrix(const Matrix &M) in Matrix() function
147 Matrix(Matrix &&M) in Matrix() function
153 bool operator==(const Matrix &M) const {
205 Matrix transpose() const { in transpose()
207 Matrix M(Cols, Rows); in transpose()
215 Matrix& operator+=(const Matrix &M) {
[all …]
/third_party/boost/boost/graph/
Dmatrix_as_graph.hpp31 #define BOOST_GRAPH_ADAPT_MATRIX_TO_GRAPH(Matrix) \ argument
34 template <> struct graph_traits< Matrix > \
36 typedef Matrix::OneD::const_iterator Iter; \
37 typedef Matrix::size_type V; \
44 typedef Matrix::size_type size_type; \
48 const Matrix& g) \
55 out_edges(V v, const Matrix& g) \
62 adjacent_vertices(V v, const Matrix& g) \
68 friend vertex_descriptor source(E e, const Matrix& g) \
72 friend vertex_descriptor target(E e, const Matrix& g) \
[all …]
/third_party/flutter/skia/third_party/externals/angle2/src/common/
Dmatrix_utils.h27 class Matrix
30 Matrix(const std::vector<T> &elements, const unsigned int numRows, const unsigned int numCols) in Matrix() function
37 Matrix(const std::vector<T> &elements, const unsigned int size) in Matrix() function
44 Matrix(const T *elements, const unsigned int size) : mRows(size), mCols(size) in Matrix() function
73 Matrix<T> operator*(const Matrix<T> &m)
79 Matrix<T> result(std::vector<T>(resultRows * resultCols), resultRows, resultCols);
94 void operator*=(const Matrix<T> &m)
97 Matrix<T> res = (*this) * m;
103 bool operator==(const Matrix<T> &m) const
110 bool operator!=(const Matrix<T> &m) const { return !(mElements == m.elements()); }
[all …]
/third_party/skia/third_party/externals/angle2/src/common/
Dmatrix_utils.h27 class Matrix
30 Matrix(const std::vector<T> &elements, const unsigned int numRows, const unsigned int numCols) in Matrix() function
37 Matrix(const std::vector<T> &elements, const unsigned int size) in Matrix() function
44 Matrix(const T *elements, const unsigned int size) : mRows(size), mCols(size) in Matrix() function
73 Matrix<T> operator*(const Matrix<T> &m)
79 Matrix<T> result(std::vector<T>(resultRows * resultCols), resultRows, resultCols);
94 void operator*=(const Matrix<T> &m)
97 Matrix<T> res = (*this) * m;
103 bool operator==(const Matrix<T> &m) const
110 bool operator!=(const Matrix<T> &m) const { return !(mElements == m.elements()); }
[all …]
/third_party/skia/modules/canvaskit/tests/
Dmatrix.spec.js19 CanvasKit.Matrix.translated(5, -1),
27 CanvasKit.Matrix.scaled(2, 3),
35 CanvasKit.Matrix.rotated(Math.PI, 9, 9),
43 CanvasKit.Matrix.skewed(4, 3, 2, 1),
66 CanvasKit.Matrix.multiply(a, b),
77 const b = CanvasKit.Matrix.invert(a);
79 CanvasKit.Matrix.multiply(a, b),
80 CanvasKit.Matrix.identity());
98 CanvasKit.Matrix.mapPoints(a, points),
/third_party/skia/third_party/externals/swiftshader/src/OpenGL/common/
DMatrixStack.cpp23 stack = new Matrix[size]; in MatrixStack()
41 void MatrixStack::load(const Matrix &M) in load()
48 stack[top] = Matrix(M[0], M[4], M[8], M[12], in load()
56 stack[top] = Matrix((float)M[0], (float)M[4], (float)M[8], (float)M[12], in load()
64 stack[top] *= Matrix::translate(x, y, z); in translate()
86 sw::Matrix rotate(c+x*x*_c, x*y*_c-z*s, x*z*_c+y*s, in rotate()
100 stack[top] *= Matrix::scale(x, y, z); in scale()
110 stack[top] *= Matrix(M[0], M[4], M[8], M[12], in multiply()
118 stack[top] *= Matrix((float)M[0], (float)M[4], (float)M[8], (float)M[12], in multiply()
138 Matrix frustum(2 * n / (r - l), 0, A, 0, in frustum()
[all …]

12345678910>>...25