/external/libxcam/xcore/ |
D | vec_mat.h | 556 inline MatrixN<T, 2> inverse (const MatrixN<T, 2>& mat); 557 inline MatrixN<T, 3> inverse (const MatrixN<T, 3>& mat); 558 inline MatrixN<T, 4> inverse (const MatrixN<T, 4>& mat); 750 MatrixN<T, 2> MatrixN<T, N>::inverse (const MatrixN<T, 2>& mat) in inverse() argument 754 T det = mat(0, 0) * mat(1, 1) - mat(0, 1) * mat(1, 0); in inverse() 760 result(0, 0) = mat(1, 1); in inverse() 761 result(0, 1) = -mat(0, 1); in inverse() 762 result(1, 0) = -mat(1, 0); in inverse() 763 result(1, 1) = mat(0, 0); in inverse() 769 MatrixN<T, 3> MatrixN<T, N>::inverse (const MatrixN<T, 3>& mat) in inverse() argument [all …]
|
/external/skia/tests/ |
D | MatrixTest.cpp | 248 SkMatrix mat; in test_matrix_min_max_scale() local 249 mat.reset(); in test_matrix_min_max_scale() 252 mat.postConcat(mats[x]); in test_matrix_min_max_scale() 255 SkScalar minScale = mat.getMinScale(); in test_matrix_min_max_scale() 256 SkScalar maxScale = mat.getMaxScale(); in test_matrix_min_max_scale() 258 REPORTER_ASSERT(reporter, (maxScale < 0) == mat.hasPerspective()); in test_matrix_min_max_scale() 261 bool success = mat.getMinMaxScales(scales); in test_matrix_min_max_scale() 262 REPORTER_ASSERT(reporter, success == !mat.hasPerspective()); in test_matrix_min_max_scale() 265 if (mat.hasPerspective()) { in test_matrix_min_max_scale() 284 mat.mapVectors(vectors, SK_ARRAY_COUNT(vectors)); in test_matrix_min_max_scale() [all …]
|
D | MatrixClipCollapseTest.cpp | 141 typedef void (*PFEmitMC)(SkCanvas* canvas, MatType mat, ClipType clip, 144 typedef void (*PFEmitBody)(SkCanvas* canvas, PFEmitMC emitMC, MatType mat, 147 typedef void (*PFEmitStruct)(SkCanvas* canvas, PFEmitMC emitMC, MatType mat, 194 static void add_clip(ClipType clip, MatType mat, SkTDArray<DrawType>* expected) { in add_clip() argument 224 static void emit_mat(SkCanvas* canvas, MatType mat) { in emit_mat() argument 225 switch (mat) { in emit_mat() 257 static void add_mat(MatType mat, SkTDArray<DrawType>* expected) { in add_mat() argument 263 switch (mat) { in add_mat() 325 static void emit_clip_and_mat(SkCanvas* canvas, MatType mat, ClipType clip, in emit_clip_and_mat() argument 329 emit_mat(canvas, mat); in emit_clip_and_mat() [all …]
|
D | Matrix44Test.cpp | 119 SkMatrix44 mat(SkMatrix44::kUninitialized_Constructor); in test_translate() local 122 mat.setTranslate(0, 0, 0); in test_translate() 123 REPORTER_ASSERT(reporter, bits_isonly(mat.getType(), SkMatrix44::kIdentity_Mask)); in test_translate() 124 mat.setTranslate(1, 2, 3); in test_translate() 125 REPORTER_ASSERT(reporter, bits_isonly(mat.getType(), SkMatrix44::kTranslate_Mask)); in test_translate() 126 REPORTER_ASSERT(reporter, mat.invert(&inverse)); in test_translate() 136 mat = a; in test_translate() 137 mat.preTranslate(10, 11, 12); in test_translate() 138 REPORTER_ASSERT(reporter, mat == c); in test_translate() 141 mat = a; in test_translate() [all …]
|
D | DrawBitmapRectTest.cpp | 24 static void rand_matrix(SkMatrix* mat, SkRandom& rand, unsigned mask) { in rand_matrix() argument 25 mat->setIdentity(); in rand_matrix() 27 mat->postTranslate(rand.nextSScalar1(), rand.nextSScalar1()); in rand_matrix() 30 mat->postScale(rand.nextSScalar1(), rand.nextSScalar1()); in rand_matrix() 33 mat->postRotate(rand.nextSScalar1() * 360); in rand_matrix() 36 mat->setPerspX(rand.nextSScalar1()); in rand_matrix() 37 mat->setPerspY(rand.nextSScalar1()); in rand_matrix() 47 SkMatrix mat; in test_treatAsSprite() local 57 rand_matrix(&mat, rand, SkMatrix::kTranslate_Mask); in test_treatAsSprite() 60 REPORTER_ASSERT(reporter, SkTreatAsSprite(mat, size, noaaPaint)); in test_treatAsSprite() [all …]
|
/external/skqp/tests/ |
D | MatrixTest.cpp | 248 SkMatrix mat; in test_matrix_min_max_scale() local 249 mat.reset(); in test_matrix_min_max_scale() 252 mat.postConcat(mats[x]); in test_matrix_min_max_scale() 255 SkScalar minScale = mat.getMinScale(); in test_matrix_min_max_scale() 256 SkScalar maxScale = mat.getMaxScale(); in test_matrix_min_max_scale() 258 REPORTER_ASSERT(reporter, (maxScale < 0) == mat.hasPerspective()); in test_matrix_min_max_scale() 261 bool success = mat.getMinMaxScales(scales); in test_matrix_min_max_scale() 262 REPORTER_ASSERT(reporter, success == !mat.hasPerspective()); in test_matrix_min_max_scale() 265 if (mat.hasPerspective()) { in test_matrix_min_max_scale() 284 mat.mapVectors(vectors, SK_ARRAY_COUNT(vectors)); in test_matrix_min_max_scale() [all …]
|
D | MatrixClipCollapseTest.cpp | 141 typedef void (*PFEmitMC)(SkCanvas* canvas, MatType mat, ClipType clip, 144 typedef void (*PFEmitBody)(SkCanvas* canvas, PFEmitMC emitMC, MatType mat, 147 typedef void (*PFEmitStruct)(SkCanvas* canvas, PFEmitMC emitMC, MatType mat, 194 static void add_clip(ClipType clip, MatType mat, SkTDArray<DrawType>* expected) { in add_clip() argument 224 static void emit_mat(SkCanvas* canvas, MatType mat) { in emit_mat() argument 225 switch (mat) { in emit_mat() 257 static void add_mat(MatType mat, SkTDArray<DrawType>* expected) { in add_mat() argument 263 switch (mat) { in add_mat() 325 static void emit_clip_and_mat(SkCanvas* canvas, MatType mat, ClipType clip, in emit_clip_and_mat() argument 329 emit_mat(canvas, mat); in emit_clip_and_mat() [all …]
|
D | Matrix44Test.cpp | 119 SkMatrix44 mat(SkMatrix44::kUninitialized_Constructor); in test_translate() local 122 mat.setTranslate(0, 0, 0); in test_translate() 123 REPORTER_ASSERT(reporter, bits_isonly(mat.getType(), SkMatrix44::kIdentity_Mask)); in test_translate() 124 mat.setTranslate(1, 2, 3); in test_translate() 125 REPORTER_ASSERT(reporter, bits_isonly(mat.getType(), SkMatrix44::kTranslate_Mask)); in test_translate() 126 REPORTER_ASSERT(reporter, mat.invert(&inverse)); in test_translate() 136 mat = a; in test_translate() 137 mat.preTranslate(10, 11, 12); in test_translate() 138 REPORTER_ASSERT(reporter, mat == c); in test_translate() 141 mat = a; in test_translate() [all …]
|
D | DrawBitmapRectTest.cpp | 24 static void rand_matrix(SkMatrix* mat, SkRandom& rand, unsigned mask) { in rand_matrix() argument 25 mat->setIdentity(); in rand_matrix() 27 mat->postTranslate(rand.nextSScalar1(), rand.nextSScalar1()); in rand_matrix() 30 mat->postScale(rand.nextSScalar1(), rand.nextSScalar1()); in rand_matrix() 33 mat->postRotate(rand.nextSScalar1() * 360); in rand_matrix() 36 mat->setPerspX(rand.nextSScalar1()); in rand_matrix() 37 mat->setPerspY(rand.nextSScalar1()); in rand_matrix() 47 SkMatrix mat; in test_treatAsSprite() local 57 rand_matrix(&mat, rand, SkMatrix::kTranslate_Mask); in test_treatAsSprite() 60 REPORTER_ASSERT(reporter, SkTreatAsSprite(mat, size, noaaPaint)); in test_treatAsSprite() [all …]
|
/external/vulkan-validation-layers/libs/glm/gtx/ |
D | matrix_interpolation.inl | 15 detail::tmat4x4<T, P> const & mat, argument 23 …if((abs(mat[1][0] - mat[0][1]) < epsilon) && (abs(mat[2][0] - mat[0][2]) < epsilon) && (abs(mat[2]… 25 …mat[1][0] + mat[0][1]) < epsilon2) && (abs(mat[2][0] + mat[0][2]) < epsilon2) && (abs(mat[2][1] + … 34 T xx = (mat[0][0] + (T)1.0) / (T)2.0; 35 T yy = (mat[1][1] + (T)1.0) / (T)2.0; 36 T zz = (mat[2][2] + (T)1.0) / (T)2.0; 37 T xy = (mat[1][0] + mat[0][1]) / (T)4.0; 38 T xz = (mat[2][0] + mat[0][2]) / (T)4.0; 39 T yz = (mat[2][1] + mat[1][2]) / (T)4.0; 78 …rt((mat[2][1] - mat[1][2]) * (mat[2][1] - mat[1][2]) + (mat[2][0] - mat[0][2]) * (mat[2][0] - mat[… [all …]
|
/external/deqp/framework/common/ |
D | tcuMatrixUtil.hpp | 37 Matrix<T, Cols, Rows> transpose (const Matrix<T, Rows, Cols>& mat); 61 inline Matrix<T, Cols, Rows> transpose (const Matrix<T, Rows, Cols>& mat) in transpose() argument 66 res(col, row) = mat(row, col); in transpose() 72 Matrix<float, 2, 2> mat; in rotationMatrix() local 76 mat(0, 0) = c; in rotationMatrix() 77 mat(0, 1) = -s; in rotationMatrix() 78 mat(1, 0) = s; in rotationMatrix() 79 mat(1, 1) = c; in rotationMatrix() 81 return mat; in rotationMatrix() 86 Matrix<float, 2, 2> mat; in shearMatrix() local [all …]
|
D | tcuMatrix.hpp | 103 static T doDeterminant (const Matrix<T, Size, Size>& mat); 104 static Matrix<T, Size, Size> doInverse (const Matrix<T, Size, Size>& mat); 110 static T doDeterminant (const Matrix<T, 2, 2>& mat); 111 static Matrix<T, 2, 2> doInverse (const Matrix<T, 2, 2>& mat); 117 static T doDeterminant (const Matrix<T, 3, 3>& mat); 118 static Matrix<T, 3, 3> doInverse (const Matrix<T, 3, 3>& mat); 124 static T doDeterminant (const Matrix<T, 4, 4>& mat); 125 static Matrix<T, 4, 4> doInverse (const Matrix<T, 4, 4>& mat); 132 T determinant (const Matrix<T, Size, Size>& mat) in determinant() argument 134 return SquareMatrixOps<T, Size>::doDeterminant(mat); in determinant() [all …]
|
/external/autotest/client/deps/webgl_mpd/src/resources/ |
D | J3DIMath.js | 460 var mat = new J3DIMatrix4(); 464 mat.$matrix.m11 = 1; 465 mat.$matrix.m12 = 0; 466 mat.$matrix.m13 = 0; 467 mat.$matrix.m21 = 0; 468 mat.$matrix.m22 = 1 - 2 * sinA2; 469 mat.$matrix.m23 = 2 * sinA * cosA; 470 mat.$matrix.m31 = 0; 471 mat.$matrix.m32 = -2 * sinA * cosA; 472 mat.$matrix.m33 = 1 - 2 * sinA2; [all …]
|
/external/autotest/client/site_tests/graphics_SanAngeles/src/ |
D | matrixop.c | 36 void Matrix4x4_LoadIdentity(Matrix4x4 mat) in Matrix4x4_LoadIdentity() argument 40 mat[i] = 0; in Matrix4x4_LoadIdentity() 42 mat[i*4 + i] = 1.f; in Matrix4x4_LoadIdentity() 46 void Matrix4x4_Scale(Matrix4x4 mat, float sx, float sy, float sz) in Matrix4x4_Scale() argument 51 mat[0*4 + i] *= sx; in Matrix4x4_Scale() 52 mat[1*4 + i] *= sy; in Matrix4x4_Scale() 53 mat[2*4 + i] *= sz; in Matrix4x4_Scale() 58 void Matrix4x4_Translate(Matrix4x4 mat, float tx, float ty, float tz) in Matrix4x4_Translate() argument 62 mat[3*4 + i] += mat[0*4 + i] * tx + in Matrix4x4_Translate() 63 mat[1*4 + i] * ty + in Matrix4x4_Translate() [all …]
|
/external/eigen/doc/snippets/ |
D | TopicAliasing_cwise.cpp | 1 MatrixXf mat(2,2); variable 2 mat << 1, 2, 4, 7; 3 cout << "Here is the matrix mat:\n" << mat << endl << endl; 5 mat = 2 * mat; 6 cout << "After 'mat = 2 * mat', mat = \n" << mat << endl << endl; 9 mat = mat - MatrixXf::Identity(2,2); 10 cout << "After the subtraction, it becomes\n" << mat << endl << endl; 13 ArrayXXf arr = mat; 18 mat << 1, 2, 4, 7; 19 mat = (2 * mat - MatrixXf::Identity(2,2)).array().square(); [all …]
|
/external/eigen/Eigen/src/Eigenvalues/ |
D | Tridiagonalization.h | 427 void tridiagonalization_inplace(MatrixType& mat, DiagonalType& diag, SubDiagonalType& subdiag, bool… 429 eigen_assert(mat.cols()==mat.rows() && diag.size()==mat.rows() && subdiag.size()==mat.rows()-1); 430 tridiagonalization_inplace_selector<MatrixType>::run(mat, diag, subdiag, extractQ); 442 static void run(MatrixType& mat, DiagonalType& diag, SubDiagonalType& subdiag, bool extractQ) 444 CoeffVectorType hCoeffs(mat.cols()-1); 445 tridiagonalization_inplace(mat,hCoeffs); 446 diag = mat.diagonal().real(); 447 subdiag = mat.template diagonal<-1>().real(); 449 mat = HouseholderSequenceType(mat, hCoeffs.conjugate()) 450 .setLength(mat.rows() - 1) [all …]
|
/external/mesa3d/src/mesa/math/ |
D | m_matrix.c | 112 #define TEST_MAT_FLAGS(mat, a) \ argument 113 ((MAT_FLAGS_GEOMETRY & (~(a)) & ((mat)->flags) ) == 0) 215 static void matrix_multf( GLmatrix *mat, const GLfloat *m, GLuint flags ) in matrix_multf() argument 217 mat->flags |= (flags | MAT_DIRTY_TYPE | MAT_DIRTY_INVERSE); in matrix_multf() 219 if (TEST_MAT_FLAGS(mat, MAT_FLAGS_3D)) in matrix_multf() 220 matmul34( mat->m, mat->m, m ); in matrix_multf() 222 matmul4( mat->m, mat->m, m ); in matrix_multf() 353 static GLboolean invert_matrix_general( GLmatrix *mat ) in invert_matrix_general() argument 355 const GLfloat *m = mat->m; in invert_matrix_general() 356 GLfloat *out = mat->inv; in invert_matrix_general() [all …]
|
/external/eigen/test/ |
D | sparse_permutations.cpp | 23 bool is_sorted(const T& mat) { in is_sorted() argument 24 for(Index k = 0; k<mat.outerSize(); ++k) in is_sorted() 27 for(typename T::InnerIterator it(mat,k); it; ++it) in is_sorted() 58 SparseMatrixType mat(rows, cols), up(rows,cols), lo(rows,cols); in sparse_permutations() local 62 initSparse<Scalar>(density, mat_d, mat, 0); in sparse_permutations() 64 up = mat.template triangularView<Upper>(); in sparse_permutations() 65 lo = mat.template triangularView<Lower>(); in sparse_permutations() 70 VERIFY_IS_APPROX(mat, mat_d); in sparse_permutations() 79 VERIFY( is_sorted( ::eval(mat*p) )); in sparse_permutations() 80 VERIFY( is_sorted( res = mat*p )); in sparse_permutations() [all …]
|
/external/eigen/unsupported/Eigen/src/EulerAngles/ |
D | EulerSystem.h | 180 …pename MatrixBase<Derived>::Scalar, 3, 1>& res, const MatrixBase<Derived>& mat, internal::true_typ… 189 res[0] = atan2(mat(J,K), mat(K,K)); 190 Scalar c2 = Vector2(mat(I,I), mat(I,J)).norm(); 198 res[1] = atan2(-mat(I,K), -c2); 201 res[1] = atan2(-mat(I,K), c2); 204 res[2] = atan2(s1*mat(K,I)-c1*mat(J,I), c1*mat(J,J) - s1 * mat(K,J)); 208 …typename MatrixBase<Derived>::Scalar,3,1>& res, const MatrixBase<Derived>& mat, internal::false_ty… 217 res[0] = atan2(mat(J,I), mat(K,I)); 226 Scalar s2 = Vector2(mat(J,I), mat(K,I)).norm(); 227 res[1] = -atan2(s2, mat(I,I)); [all …]
|
/external/eigen/demos/opengl/ |
D | gpuhelper.h | 41 void multMatrix(const Matrix<Scalar,4,4, _Flags, 4,4>& mat, GLenum matrixTarget); 51 void loadMatrix(const Eigen::Matrix<Scalar,4,4, _Flags, 4,4>& mat, GLenum matrixTarget); 70 inline void pushMatrix(const Matrix<Scalar,4,4, _Flags, 4,4>& mat, GLenum matrixTarget); 120 … static void loadMatrix(const Matrix<float, 4,4, _Flags, 4,4>& mat) { glLoadMatrixf(mat.data()); } 121 … static void loadMatrix(const Matrix<double,4,4, _Flags, 4,4>& mat) { glLoadMatrixd(mat.data()); } 122 … static void multMatrix(const Matrix<float, 4,4, _Flags, 4,4>& mat) { glMultMatrixf(mat.data()); } 123 … static void multMatrix(const Matrix<double,4,4, _Flags, 4,4>& mat) { glMultMatrixd(mat.data()); } 128 …static void loadMatrix(const Matrix<float, 4,4, _Flags, 4,4>& mat) { glLoadMatrixf(mat.transpose(… 129 …static void loadMatrix(const Matrix<double,4,4, _Flags, 4,4>& mat) { glLoadMatrixd(mat.transpose()… 130 …static void multMatrix(const Matrix<float, 4,4, _Flags, 4,4>& mat) { glMultMatrixf(mat.transpose(… [all …]
|
/external/mesa3d/src/gallium/drivers/ilo/core/ |
D | ilo_state_viewport.c | 33 const struct ilo_state_viewport_matrix_info *mat, in viewport_matrix_get_gen6_guardband() argument 72 int center_x = (int) mat->translate[0]; in viewport_matrix_get_gen6_guardband() 73 int center_y = (int) mat->translate[1]; in viewport_matrix_get_gen6_guardband() 89 scale_x = fabsf(mat->scale[0]); in viewport_matrix_get_gen6_guardband() 90 scale_y = fabsf(mat->scale[1]); in viewport_matrix_get_gen6_guardband() 108 *min_gbx = ((float) (center_x - half_len) - mat->translate[0]) / scale_x; in viewport_matrix_get_gen6_guardband() 109 *max_gbx = ((float) (center_x + half_len) - mat->translate[0]) / scale_x; in viewport_matrix_get_gen6_guardband() 110 *min_gby = ((float) (center_y - half_len) - mat->translate[1]) / scale_y; in viewport_matrix_get_gen6_guardband() 111 *max_gby = ((float) (center_y + half_len) - mat->translate[1]) / scale_y; in viewport_matrix_get_gen6_guardband() 115 viewport_matrix_get_extent(const struct ilo_state_viewport_matrix_info *mat, in viewport_matrix_get_extent() argument [all …]
|
/external/eigen/Eigen/src/Core/ |
D | Redux.h | 100 static EIGEN_STRONG_INLINE Scalar run(const Derived &mat, const Func& func) in run() 102 return func(redux_novec_unroller<Func, Derived, Start, HalfLength>::run(mat,func), in run() 103 … redux_novec_unroller<Func, Derived, Start+HalfLength, Length-HalfLength>::run(mat,func)); in run() 118 static EIGEN_STRONG_INLINE Scalar run(const Derived &mat, const Func&) 120 return mat.coeffByOuterInner(outer, inner); 148 static EIGEN_STRONG_INLINE PacketScalar run(const Derived &mat, const Func& func) 151 redux_vec_unroller<Func, Derived, Start, HalfLength>::run(mat,func), 152 redux_vec_unroller<Func, Derived, Start+HalfLength, Length-HalfLength>::run(mat,func) ); 169 static EIGEN_STRONG_INLINE PacketScalar run(const Derived &mat, const Func&) 171 return mat.template packetByOuterInner<alignment,PacketScalar>(outer, inner); [all …]
|
/external/eigen/Eigen/src/IterativeLinearSolvers/ |
D | BasicPreconditioners.h | 50 explicit DiagonalPreconditioner(const MatType& mat) : m_invdiag(mat.cols()) in DiagonalPreconditioner() argument 52 compute(mat); in DiagonalPreconditioner() 65 DiagonalPreconditioner& factorize(const MatType& mat) in factorize() argument 67 m_invdiag.resize(mat.cols()); in factorize() 68 for(int j=0; j<mat.outerSize(); ++j) in factorize() 70 typename MatType::InnerIterator it(mat,j); in factorize() 82 DiagonalPreconditioner& compute(const MatType& mat) in compute() argument 84 return factorize(mat); in compute() 139 explicit LeastSquareDiagonalPreconditioner(const MatType& mat) : Base() in LeastSquareDiagonalPreconditioner() argument 141 compute(mat); in LeastSquareDiagonalPreconditioner() [all …]
|
/external/eigen/bench/ |
D | sparse_setter.cpp | 197 SparseMatrix<Scalar> mat(SIZE,SIZE); in setinnerrand_eigen() local 201 mat.insert(coords[i].x(), coords[i].y()) = vals[i]; in setinnerrand_eigen() 203 mat.finalize(); in setinnerrand_eigen() 211 DynamicSparseMatrix<Scalar> mat(SIZE,SIZE); in setrand_eigen_dynamic() local 212 mat.reserve(coords.size()/10); in setrand_eigen_dynamic() 215 mat.coeffRef(coords[i].x(), coords[i].y()) += vals[i]; in setrand_eigen_dynamic() 217 mat.finalize(); in setrand_eigen_dynamic() 219 return &mat.coeffRef(coords[0].x(), coords[0].y()); in setrand_eigen_dynamic() 226 DynamicSparseMatrix<Scalar> mat(SIZE,SIZE); in setrand_eigen_sumeq() local 230 mat.reserve(n); in setrand_eigen_sumeq() [all …]
|
/external/eigen/Eigen/src/SparseCore/ |
D | SparseCompressedBase.h | 157 InnerIterator(const SparseCompressedBase& mat, Index outer) 158 : m_values(mat.valuePtr()), m_indices(mat.innerIndexPtr()), m_outer(outer) 160 if(Derived::IsVectorAtCompileTime && mat.outerIndexPtr()==0) 163 m_end = mat.nonZeros(); 167 m_id = mat.outerIndexPtr()[outer]; 168 if(mat.isCompressed()) 169 m_end = mat.outerIndexPtr()[outer+1]; 171 m_end = m_id + mat.innerNonZeroPtr()[outer]; 175 explicit InnerIterator(const SparseCompressedBase& mat) 176 …: m_values(mat.valuePtr()), m_indices(mat.innerIndexPtr()), m_outer(0), m_id(0), m_end(mat.nonZero… [all …]
|