/external/eigen/test/ |
D | array.cpp | 22 ArrayType m1 = ArrayType::Random(rows, cols), in array() local 33 VERIFY_IS_APPROX(m1 + s1, s1 + m1); in array() 34 VERIFY_IS_APPROX(m1 + s1, ArrayType::Constant(rows,cols,s1) + m1); in array() 35 VERIFY_IS_APPROX(s1 - m1, (-m1)+s1 ); in array() 36 VERIFY_IS_APPROX(m1 - s1, m1 - ArrayType::Constant(rows,cols,s1)); in array() 37 VERIFY_IS_APPROX(s1 - m1, ArrayType::Constant(rows,cols,s1) - m1); in array() 38 VERIFY_IS_APPROX((m1*Scalar(2)) - s2, (m1+m1) - ArrayType::Constant(rows,cols,s2) ); in array() 39 m3 = m1; in array() 41 VERIFY_IS_APPROX(m3, m1 + s2); in array() 42 m3 = m1; in array() [all …]
|
D | integer_types.cpp | 30 MatrixType m1(rows, cols), in signed_integer_type_tests() local 35 m1 = MatrixType::Random(rows, cols); in signed_integer_type_tests() 36 } while(m1 == mzero || m1 == m2); in signed_integer_type_tests() 45 VERIFY_IS_EQUAL(-(-m1), m1); in signed_integer_type_tests() 46 VERIFY_IS_EQUAL(-m2+m1+m2, m1); in signed_integer_type_tests() 47 VERIFY_IS_EQUAL((-m1+m2)*s1, -s1*m1+s1*m2); in signed_integer_type_tests() 66 MatrixType m1(rows, cols), in integer_type_tests() local 79 m1 = MatrixType::Random(rows, cols); in integer_type_tests() 80 } while(m1 == mzero || m1 == m2); in integer_type_tests() 89 VERIFY_IS_APPROX( m1, m1); in integer_type_tests() [all …]
|
D | product.h | 14 bool areNotApprox(const MatrixBase<Derived1>& m1, const MatrixBase<Derived2>& m2, typename Derived1… 16 return !((m1-m2).cwiseAbs2().maxCoeff() < epsilon * epsilon 17 * (std::max)(m1.cwiseAbs2().maxCoeff(), m2.cwiseAbs2().maxCoeff())); 39 MatrixType m1 = MatrixType::Random(rows, cols), in product() local 51 OtherMajorMatrixType tm1 = m1; in product() 61 VERIFY_IS_APPROX((m1*m1.transpose())*m2, m1*(m1.transpose()*m2)); in product() 62 m3 = m1; in product() 63 m3 *= m1.transpose() * m2; in product() 64 VERIFY_IS_APPROX(m3, m1 * (m1.transpose()*m2)); in product() 65 VERIFY_IS_APPROX(m3, m1 * (m1.transpose()*m2)); in product() [all …]
|
D | array_for_matrix.cpp | 22 MatrixType m1 = MatrixType::Random(rows, cols), in array_for_matrix() local 33 VERIFY_IS_APPROX(m1.array() + s1, s1 + m1.array()); in array_for_matrix() 34 VERIFY_IS_APPROX((m1.array() + s1).matrix(), MatrixType::Constant(rows,cols,s1) + m1); in array_for_matrix() 35 …VERIFY_IS_APPROX(((m1*Scalar(2)).array() - s2).matrix(), (m1+m1) - MatrixType::Constant(rows,cols,… in array_for_matrix() 36 m3 = m1; in array_for_matrix() 38 VERIFY_IS_APPROX(m3, (m1.array() + s2).matrix()); in array_for_matrix() 39 m3 = m1; in array_for_matrix() 41 VERIFY_IS_APPROX(m3, (m1.array() - s1).matrix()); in array_for_matrix() 44 VERIFY_IS_MUCH_SMALLER_THAN(m1.colwise().sum().sum() - m1.sum(), m1.squaredNorm()); in array_for_matrix() 45 VERIFY_IS_MUCH_SMALLER_THAN(m1.rowwise().sum().sum() - m1.sum(), m1.squaredNorm()); in array_for_matrix() [all …]
|
D | linearstructure.cpp | 26 MatrixType m1 = MatrixType::Random(rows, cols), in linearStructure() local 36 VERIFY_IS_APPROX(-(-m1), m1); in linearStructure() 37 VERIFY_IS_APPROX(m1+m1, 2*m1); in linearStructure() 38 VERIFY_IS_APPROX(m1+m2-m1, m2); in linearStructure() 39 VERIFY_IS_APPROX(-m2+m1+m2, m1); in linearStructure() 40 VERIFY_IS_APPROX(m1*s1, s1*m1); in linearStructure() 41 VERIFY_IS_APPROX((m1+m2)*s1, s1*m1+s1*m2); in linearStructure() 42 VERIFY_IS_APPROX((-m1+m2)*s1, -s1*m1+s1*m2); in linearStructure() 43 m3 = m2; m3 += m1; in linearStructure() 44 VERIFY_IS_APPROX(m3, m1+m2); in linearStructure() [all …]
|
D | cwiseop.cpp | 35 cwiseops_real_only(MatrixType& m1, MatrixType& m2, MatrixType& m3, MatrixType& mones) in cwiseops_real_only() argument 40 VERIFY_IS_APPROX(m1.cwise() / m2, m1.cwise() * (m2.cwise().inverse())); in cwiseops_real_only() 41 m3 = m1.cwise().abs().cwise().sqrt(); in cwiseops_real_only() 42 VERIFY_IS_APPROX(m3.cwise().square(), m1.cwise().abs()); in cwiseops_real_only() 43 VERIFY_IS_APPROX(m1.cwise().square().cwise().sqrt(), m1.cwise().abs()); in cwiseops_real_only() 44 VERIFY_IS_APPROX(m1.cwise().abs().cwise().log().cwise().exp() , m1.cwise().abs()); in cwiseops_real_only() 46 VERIFY_IS_APPROX(m1.cwise().pow(2), m1.cwise().square()); in cwiseops_real_only() 47 m3 = (m1.cwise().abs().cwise()<=RealScalar(0.01)).select(mones,m1); in cwiseops_real_only() 49 m3 = m1.cwise().abs(); in cwiseops_real_only() 53 VERIFY_IS_APPROX(mones, m1.cwise().sin().cwise().square() + m1.cwise().cos().cwise().square()); in cwiseops_real_only() [all …]
|
D | vectorwiseop.cpp | 26 ArrayType m1 = ArrayType::Random(rows, cols), in vectorwiseop_array() local 35 m2 = m1; in vectorwiseop_array() 37 VERIFY_IS_APPROX(m2, m1.colwise() + colvec); in vectorwiseop_array() 38 VERIFY_IS_APPROX(m2.col(c), m1.col(c) + colvec); in vectorwiseop_array() 41 VERIFY_RAISES_ASSERT(m1.colwise() + colvec.transpose()); in vectorwiseop_array() 43 m2 = m1; in vectorwiseop_array() 45 VERIFY_IS_APPROX(m2, m1.rowwise() + rowvec); in vectorwiseop_array() 46 VERIFY_IS_APPROX(m2.row(r), m1.row(r) + rowvec); in vectorwiseop_array() 49 VERIFY_RAISES_ASSERT(m1.rowwise() + rowvec.transpose()); in vectorwiseop_array() 53 m2 = m1; in vectorwiseop_array() [all …]
|
D | nomalloc.cpp | 43 MatrixType m1 = MatrixType::Random(rows, cols), in nomalloc() local 52 VERIFY_IS_APPROX((m1+m2)*s1, s1*m1+s1*m2); in nomalloc() 53 VERIFY_IS_APPROX((m1+m2)(r,c), (m1(r,c))+(m2(r,c))); in nomalloc() 54 VERIFY_IS_APPROX(m1.cwiseProduct(m1.block(0,0,rows,cols)), (m1.array()*m1.array()).matrix()); in nomalloc() 55 VERIFY_IS_APPROX((m1*m1.transpose())*m2, m1*(m1.transpose()*m2)); in nomalloc() 57 m2.col(0).noalias() = m1 * m1.col(0); in nomalloc() 58 m2.col(0).noalias() -= m1.adjoint() * m1.col(0); in nomalloc() 59 m2.col(0).noalias() -= m1 * m1.row(0).adjoint(); in nomalloc() 60 m2.col(0).noalias() -= m1.adjoint() * m1.row(0).adjoint(); in nomalloc() 62 m2.row(0).noalias() = m1.row(0) * m1; in nomalloc() [all …]
|
D | triangular.cpp | 25 MatrixType m1 = MatrixType::Random(rows, cols), in triangular_square() local 33 MatrixType m1up = m1.template triangularView<Upper>(); in triangular_square() 48 r1.template triangularView<Upper>() += m1; in triangular_square() 53 m1.setZero(); in triangular_square() 54 m1.template triangularView<Upper>() = m2.transpose() + m2; in triangular_square() 56 VERIFY_IS_APPROX(m3.template triangularView<Lower>().transpose().toDenseMatrix(), m1); in triangular_square() 59 m1.setZero(); in triangular_square() 60 m1.template triangularView<Lower>() = m2.transpose() + m2; in triangular_square() 61 VERIFY_IS_APPROX(m3.template triangularView<Lower>().toDenseMatrix(), m1); in triangular_square() 66 m1 = MatrixType::Random(rows, cols); in triangular_square() [all …]
|
D | product_extra.cpp | 24 MatrixType m1 = MatrixType::Random(rows, cols), in product_extra() local 35 OtherMajorMatrixType tm1 = m1; in product_extra() 41 VERIFY_IS_APPROX(m3.noalias() = m1 * m2.adjoint(), m1 * m2.adjoint().eval()); in product_extra() 42 …VERIFY_IS_APPROX(m3.noalias() = m1.adjoint() * square.adjoint(), m1.adjoint().eval() * square.ad… in product_extra() 43 VERIFY_IS_APPROX(m3.noalias() = m1.adjoint() * m2, m1.adjoint().eval() * m2); in product_extra() 44 …VERIFY_IS_APPROX(m3.noalias() = (s1 * m1.adjoint()) * m2, (s1 * m1.adjoint()).eval() * m2… in product_extra() 45 …VERIFY_IS_APPROX(m3.noalias() = ((s1 * m1).adjoint()) * m2, (numext::conj(s1) * m1.adjoint(… in product_extra() 46 …VERIFY_IS_APPROX(m3.noalias() = (- m1.adjoint() * s1) * (s3 * m2), (- m1.adjoint() * s1).eval() *… in product_extra() 47 …VERIFY_IS_APPROX(m3.noalias() = (s2 * m1.adjoint() * s1) * m2, (s2 * m1.adjoint() * s1).eval(… in product_extra() 48 …VERIFY_IS_APPROX(m3.noalias() = (-m1*s2) * s1*m2.adjoint(), (-m1*s2).eval() * (s1*m2.adjoin… in product_extra() [all …]
|
D | block.cpp | 15 block_real_only(const MatrixType &m1, Index r1, Index r2, Index c1, Index c2, const Scalar& s1) { in block_real_only() argument 17 VERIFY_IS_APPROX(m1.row(r1).cwiseMax(s1), m1.cwiseMax(s1).row(r1)); in block_real_only() 18 VERIFY_IS_APPROX(m1.col(c1).cwiseMin(s1), m1.cwiseMin(s1).col(c1)); in block_real_only() 20 …VERIFY_IS_APPROX(m1.block(r1,c1,r2-r1+1,c2-c1+1).cwiseMin(s1), m1.cwiseMin(s1).block(r1,c1,r2-r1+1… in block_real_only() 21 …VERIFY_IS_APPROX(m1.block(r1,c1,r2-r1+1,c2-c1+1).cwiseMax(s1), m1.cwiseMax(s1).block(r1,c1,r2-r1+1… in block_real_only() 46 MatrixType m1 = MatrixType::Random(rows, cols), in block() local 47 m1_copy = m1, in block() 60 block_real_only(m1, r1, r2, c1, c1, s1); in block() 63 VERIFY_IS_EQUAL(m1.col(c1).transpose(), m1.transpose().row(c1)); in block() 65 m1 = m1_copy; in block() [all …]
|
/external/eigen/test/eigen2/ |
D | eigen2_linearstructure.cpp | 26 MatrixType m1 = MatrixType::Random(rows, cols), in linearStructure() local 36 VERIFY_IS_APPROX(-(-m1), m1); in linearStructure() 37 VERIFY_IS_APPROX(m1+m1, 2*m1); in linearStructure() 38 VERIFY_IS_APPROX(m1+m2-m1, m2); in linearStructure() 39 VERIFY_IS_APPROX(-m2+m1+m2, m1); in linearStructure() 40 VERIFY_IS_APPROX(m1*s1, s1*m1); in linearStructure() 41 VERIFY_IS_APPROX((m1+m2)*s1, s1*m1+s1*m2); in linearStructure() 42 VERIFY_IS_APPROX((-m1+m2)*s1, -s1*m1+s1*m2); in linearStructure() 43 m3 = m2; m3 += m1; in linearStructure() 44 VERIFY_IS_APPROX(m3, m1+m2); in linearStructure() [all …]
|
D | eigen2_cwiseop.cpp | 31 MatrixType m1 = MatrixType::Random(rows, cols), in cwiseops() local 76 VERIFY_IS_APPROX(m1.cwise().pow(2), m1.cwise().abs2()); in cwiseops() 77 VERIFY_IS_APPROX(m1.cwise().pow(2), m1.cwise().square()); in cwiseops() 78 VERIFY_IS_APPROX(m1.cwise().pow(3), m1.cwise().cube()); in cwiseops() 80 VERIFY_IS_APPROX(m1 + mones, m1.cwise()+Scalar(1)); in cwiseops() 81 VERIFY_IS_APPROX(m1 - mones, m1.cwise()-Scalar(1)); in cwiseops() 82 m3 = m1; m3.cwise() += 1; in cwiseops() 83 VERIFY_IS_APPROX(m1 + mones, m3); in cwiseops() 84 m3 = m1; m3.cwise() -= 1; in cwiseops() 85 VERIFY_IS_APPROX(m1 - mones, m3); in cwiseops() [all …]
|
D | eigen2_array.cpp | 26 MatrixType m1 = MatrixType::Random(rows, cols), in array() local 34 VERIFY_IS_APPROX(m1.cwise() + s1, s1 + m1.cwise()); in array() 35 VERIFY_IS_APPROX(m1.cwise() + s1, MatrixType::Constant(rows,cols,s1) + m1); in array() 36 VERIFY_IS_APPROX((m1*Scalar(2)).cwise() - s2, (m1+m1) - MatrixType::Constant(rows,cols,s2) ); in array() 37 m3 = m1; in array() 39 VERIFY_IS_APPROX(m3, m1.cwise() + s2); in array() 40 m3 = m1; in array() 42 VERIFY_IS_APPROX(m3, m1.cwise() - s1); in array() 45 VERIFY_IS_APPROX(m1.colwise().sum().sum(), m1.sum()); in array() 46 VERIFY_IS_APPROX(m1.rowwise().sum().sum(), m1.sum()); in array() [all …]
|
D | product.h | 15 bool areNotApprox(const MatrixBase<Derived1>& m1, const MatrixBase<Derived2>& m2, typename Derived1… 17 return !((m1-m2).cwise().abs2().maxCoeff() < epsilon * epsilon 18 * std::max(m1.cwise().abs2().maxCoeff(), m2.cwise().abs2().maxCoeff())); 41 MatrixType m1 = MatrixType::Random(rows, cols), in product() local 53 OtherMajorMatrixType tm1 = m1; in product() 63 VERIFY_IS_APPROX((m1*m1.transpose())*m2, m1*(m1.transpose()*m2)); in product() 64 m3 = m1; in product() 65 m3 *= m1.transpose() * m2; in product() 66 VERIFY_IS_APPROX(m3, m1 * (m1.transpose()*m2)); in product() 67 VERIFY_IS_APPROX(m3, m1.lazy() * (m1.transpose()*m2)); in product() [all …]
|
/external/clang/test/CodeGen/ |
D | 3dnow-builtins.c | 8 __m64 test_m_pavgusb(__m64 m1, __m64 m2) { in test_m_pavgusb() argument 11 return _m_pavgusb(m1, m2); in test_m_pavgusb() 20 __m64 test_m_pfacc(__m64 m1, __m64 m2) { in test_m_pfacc() argument 23 return _m_pfacc(m1, m2); in test_m_pfacc() 26 __m64 test_m_pfadd(__m64 m1, __m64 m2) { in test_m_pfadd() argument 29 return _m_pfadd(m1, m2); in test_m_pfadd() 32 __m64 test_m_pfcmpeq(__m64 m1, __m64 m2) { in test_m_pfcmpeq() argument 35 return _m_pfcmpeq(m1, m2); in test_m_pfcmpeq() 38 __m64 test_m_pfcmpge(__m64 m1, __m64 m2) { in test_m_pfcmpge() argument 41 return _m_pfcmpge(m1, m2); in test_m_pfcmpge() [all …]
|
/external/libcxx/test/std/containers/associative/multiset/multiset.special/ |
D | member_swap.pass.cpp | 27 M m1; in main() local 29 M m1_save = m1; in main() 31 m1.swap(m2); in main() 32 assert(m1 == m2_save); in main() 47 M m1; in main() local 49 M m1_save = m1; in main() 51 m1.swap(m2); in main() 52 assert(m1 == m2_save); in main() 63 M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0])); in main() local 65 M m1_save = m1; in main() [all …]
|
D | non_member_swap.pass.cpp | 26 M m1; in main() local 28 M m1_save = m1; in main() 30 swap(m1, m2); in main() 31 assert(m1 == m2_save); in main() 46 M m1; in main() local 48 M m1_save = m1; in main() 50 swap(m1, m2); in main() 51 assert(m1 == m2_save); in main() 62 M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0])); in main() local 64 M m1_save = m1; in main() [all …]
|
/external/libcxx/test/std/containers/associative/set/set.special/ |
D | member_swap.pass.cpp | 27 M m1; in main() local 29 M m1_save = m1; in main() 31 m1.swap(m2); in main() 32 assert(m1 == m2_save); in main() 47 M m1; in main() local 49 M m1_save = m1; in main() 51 m1.swap(m2); in main() 52 assert(m1 == m2_save); in main() 63 M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0])); in main() local 65 M m1_save = m1; in main() [all …]
|
D | non_member_swap.pass.cpp | 26 M m1; in main() local 28 M m1_save = m1; in main() 30 swap(m1, m2); in main() 31 assert(m1 == m2_save); in main() 46 M m1; in main() local 48 M m1_save = m1; in main() 50 swap(m1, m2); in main() 51 assert(m1 == m2_save); in main() 62 M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0])); in main() local 64 M m1_save = m1; in main() [all …]
|
/external/libcxx/test/std/containers/associative/map/map.special/ |
D | non_member_swap.pass.cpp | 30 M m1; in main() local 32 M m1_save = m1; in main() 34 swap(m1, m2); in main() 35 assert(m1 == m2_save); in main() 50 M m1; in main() local 52 M m1_save = m1; in main() 54 swap(m1, m2); in main() 55 assert(m1 == m2_save); in main() 66 M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0])); in main() local 68 M m1_save = m1; in main() [all …]
|
D | member_swap.pass.cpp | 27 M m1; in main() local 29 M m1_save = m1; in main() 31 m1.swap(m2); in main() 32 assert(m1 == m2_save); in main() 47 M m1; in main() local 49 M m1_save = m1; in main() 51 m1.swap(m2); in main() 52 assert(m1 == m2_save); in main() 63 M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0])); in main() local 65 M m1_save = m1; in main() [all …]
|
/external/libcxx/test/std/containers/associative/multimap/multimap.special/ |
D | non_member_swap.pass.cpp | 30 M m1; in main() local 32 M m1_save = m1; in main() 34 swap(m1, m2); in main() 35 assert(m1 == m2_save); in main() 50 M m1; in main() local 52 M m1_save = m1; in main() 54 swap(m1, m2); in main() 55 assert(m1 == m2_save); in main() 66 M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0])); in main() local 68 M m1_save = m1; in main() [all …]
|
D | member_swap.pass.cpp | 27 M m1; in main() local 29 M m1_save = m1; in main() 31 m1.swap(m2); in main() 32 assert(m1 == m2_save); in main() 47 M m1; in main() local 49 M m1_save = m1; in main() 51 m1.swap(m2); in main() 52 assert(m1 == m2_save); in main() 63 M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0])); in main() local 65 M m1_save = m1; in main() [all …]
|
/external/skia/tests/ |
D | MetaDataTest.cpp | 39 SkMetaData m1; in DEF_TEST() local 41 REPORTER_ASSERT(reporter, !m1.findS32("int")); in DEF_TEST() 42 REPORTER_ASSERT(reporter, !m1.findScalar("scalar")); in DEF_TEST() 43 REPORTER_ASSERT(reporter, !m1.findString("hello")); in DEF_TEST() 44 REPORTER_ASSERT(reporter, !m1.removeS32("int")); in DEF_TEST() 45 REPORTER_ASSERT(reporter, !m1.removeScalar("scalar")); in DEF_TEST() 46 REPORTER_ASSERT(reporter, !m1.removeString("hello")); in DEF_TEST() 47 REPORTER_ASSERT(reporter, !m1.removeString("true")); in DEF_TEST() 48 REPORTER_ASSERT(reporter, !m1.removeString("false")); in DEF_TEST() 50 m1.setS32("int", 12345); in DEF_TEST() [all …]
|