/external/eigen/test/ |
D | array.cpp | 23 ArrayType m1 = ArrayType::Random(rows, cols), in array() local 34 VERIFY_IS_APPROX(m1 + s1, s1 + m1); in array() 35 VERIFY_IS_APPROX(m1 + s1, ArrayType::Constant(rows,cols,s1) + m1); in array() 36 VERIFY_IS_APPROX(s1 - m1, (-m1)+s1 ); in array() 37 VERIFY_IS_APPROX(m1 - s1, m1 - ArrayType::Constant(rows,cols,s1)); in array() 38 VERIFY_IS_APPROX(s1 - m1, ArrayType::Constant(rows,cols,s1) - m1); in array() 39 VERIFY_IS_APPROX((m1*Scalar(2)) - s2, (m1+m1) - ArrayType::Constant(rows,cols,s2) ); in array() 40 m3 = m1; in array() 42 VERIFY_IS_APPROX(m3, m1 + s2); in array() 43 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 | cwiseop.cpp | 41 MatrixType m1 = MatrixType::Random(rows, cols), in cwiseops() local 86 VERIFY_IS_APPROX(m1.cwise().pow(2), m1.cwise().abs2()); in cwiseops() 87 VERIFY_IS_APPROX(m1.cwise().pow(2), m1.cwise().square()); in cwiseops() 88 VERIFY_IS_APPROX(m1.cwise().pow(3), m1.cwise().cube()); in cwiseops() 90 VERIFY_IS_APPROX(m1 + mones, m1.cwise()+Scalar(1)); in cwiseops() 91 VERIFY_IS_APPROX(m1 - mones, m1.cwise()-Scalar(1)); in cwiseops() 92 m3 = m1; m3.cwise() += 1; in cwiseops() 93 VERIFY_IS_APPROX(m1 + mones, m3); in cwiseops() 94 m3 = m1; m3.cwise() -= 1; in cwiseops() 95 VERIFY_IS_APPROX(m1 - mones, m3); in cwiseops() [all …]
|
D | linearstructure.cpp | 25 MatrixType m1 = MatrixType::Random(rows, cols), in linearStructure() local 35 VERIFY_IS_APPROX(-(-m1), m1); in linearStructure() 36 VERIFY_IS_APPROX(m1+m1, 2*m1); in linearStructure() 37 VERIFY_IS_APPROX(m1+m2-m1, m2); in linearStructure() 38 VERIFY_IS_APPROX(-m2+m1+m2, m1); in linearStructure() 39 VERIFY_IS_APPROX(m1*s1, s1*m1); in linearStructure() 40 VERIFY_IS_APPROX((m1+m2)*s1, s1*m1+s1*m2); in linearStructure() 41 VERIFY_IS_APPROX((-m1+m2)*s1, -s1*m1+s1*m2); in linearStructure() 42 m3 = m2; m3 += m1; in linearStructure() 43 VERIFY_IS_APPROX(m3, m1+m2); in linearStructure() [all …]
|
D | product_extra.cpp | 25 MatrixType m1 = MatrixType::Random(rows, cols), in product_extra() local 36 OtherMajorMatrixType tm1 = m1; in product_extra() 42 VERIFY_IS_APPROX(m3.noalias() = m1 * m2.adjoint(), m1 * m2.adjoint().eval()); in product_extra() 43 …VERIFY_IS_APPROX(m3.noalias() = m1.adjoint() * square.adjoint(), m1.adjoint().eval() * square.ad… in product_extra() 44 VERIFY_IS_APPROX(m3.noalias() = m1.adjoint() * m2, m1.adjoint().eval() * m2); in product_extra() 45 …VERIFY_IS_APPROX(m3.noalias() = (s1 * m1.adjoint()) * m2, (s1 * m1.adjoint()).eval() * m2… in product_extra() 46 …VERIFY_IS_APPROX(m3.noalias() = ((s1 * m1).adjoint()) * m2, (internal::conj(s1) * m1.adjoin… in product_extra() 47 …VERIFY_IS_APPROX(m3.noalias() = (- m1.adjoint() * s1) * (s3 * m2), (- m1.adjoint() * s1).eval() *… in product_extra() 48 …VERIFY_IS_APPROX(m3.noalias() = (s2 * m1.adjoint() * s1) * m2, (s2 * m1.adjoint() * s1).eval(… in product_extra() 49 …VERIFY_IS_APPROX(m3.noalias() = (-m1*s2) * s1*m2.adjoint(), (-m1*s2).eval() * (s1*m2.adjoin… in product_extra() [all …]
|
D | array_for_matrix.cpp | 23 MatrixType m1 = MatrixType::Random(rows, cols), in array_for_matrix() local 34 VERIFY_IS_APPROX(m1.array() + s1, s1 + m1.array()); in array_for_matrix() 35 VERIFY_IS_APPROX((m1.array() + s1).matrix(), MatrixType::Constant(rows,cols,s1) + m1); in array_for_matrix() 36 …VERIFY_IS_APPROX(((m1*Scalar(2)).array() - s2).matrix(), (m1+m1) - MatrixType::Constant(rows,cols,… in array_for_matrix() 37 m3 = m1; in array_for_matrix() 39 VERIFY_IS_APPROX(m3, (m1.array() + s2).matrix()); in array_for_matrix() 40 m3 = m1; in array_for_matrix() 42 VERIFY_IS_APPROX(m3, (m1.array() - s1).matrix()); in array_for_matrix() 45 VERIFY_IS_MUCH_SMALLER_THAN(m1.colwise().sum().sum() - m1.sum(), m1.cwiseAbs().maxCoeff()); in array_for_matrix() 46 VERIFY_IS_MUCH_SMALLER_THAN(m1.rowwise().sum().sum() - m1.sum(), m1.cwiseAbs().maxCoeff()); in array_for_matrix() [all …]
|
D | nomalloc.cpp | 38 MatrixType m1 = MatrixType::Random(rows, cols), in nomalloc() local 47 VERIFY_IS_APPROX((m1+m2)*s1, s1*m1+s1*m2); in nomalloc() 48 VERIFY_IS_APPROX((m1+m2)(r,c), (m1(r,c))+(m2(r,c))); in nomalloc() 49 VERIFY_IS_APPROX(m1.cwiseProduct(m1.block(0,0,rows,cols)), (m1.array()*m1.array()).matrix()); in nomalloc() 50 VERIFY_IS_APPROX((m1*m1.transpose())*m2, m1*(m1.transpose()*m2)); in nomalloc() 52 m2.col(0).noalias() = m1 * m1.col(0); in nomalloc() 53 m2.col(0).noalias() -= m1.adjoint() * m1.col(0); in nomalloc() 54 m2.col(0).noalias() -= m1 * m1.row(0).adjoint(); in nomalloc() 55 m2.col(0).noalias() -= m1.adjoint() * m1.row(0).adjoint(); in nomalloc() 57 m2.row(0).noalias() = m1.row(0) * m1; in nomalloc() [all …]
|
D | vectorwiseop.cpp | 27 ArrayType m1 = ArrayType::Random(rows, cols), in vectorwiseop_array() local 36 m2 = m1; in vectorwiseop_array() 38 VERIFY_IS_APPROX(m2, m1.colwise() + colvec); in vectorwiseop_array() 39 VERIFY_IS_APPROX(m2.col(c), m1.col(c) + colvec); in vectorwiseop_array() 42 VERIFY_RAISES_ASSERT(m1.colwise() + colvec.transpose()); in vectorwiseop_array() 44 m2 = m1; in vectorwiseop_array() 46 VERIFY_IS_APPROX(m2, m1.rowwise() + rowvec); in vectorwiseop_array() 47 VERIFY_IS_APPROX(m2.row(r), m1.row(r) + rowvec); in vectorwiseop_array() 50 VERIFY_RAISES_ASSERT(m1.rowwise() + rowvec.transpose()); in vectorwiseop_array() 54 m2 = m1; in vectorwiseop_array() [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())); 40 MatrixType m1 = MatrixType::Random(rows, cols), in product() local 52 OtherMajorMatrixType tm1 = m1; in product() 62 VERIFY_IS_APPROX((m1*m1.transpose())*m2, m1*(m1.transpose()*m2)); in product() 63 m3 = m1; in product() 64 m3 *= m1.transpose() * m2; in product() 65 VERIFY_IS_APPROX(m3, m1 * (m1.transpose()*m2)); in product() 66 VERIFY_IS_APPROX(m3, m1 * (m1.transpose()*m2)); in product() [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 | eigen2support.cpp | 22 MatrixType m1 = MatrixType::Random(rows, cols), in eigen2support() local 29 VERIFY_IS_APPROX(m1.cwise() + s1, s1 + m1.cwise()); in eigen2support() 30 VERIFY_IS_APPROX(m1.cwise() + s1, MatrixType::Constant(rows,cols,s1) + m1); in eigen2support() 31 VERIFY_IS_APPROX((m1*Scalar(2)).cwise() - s2, (m1+m1) - MatrixType::Constant(rows,cols,s2) ); in eigen2support() 32 m3 = m1; in eigen2support() 34 VERIFY_IS_APPROX(m3, m1.cwise() + s2); in eigen2support() 35 m3 = m1; in eigen2support() 37 VERIFY_IS_APPROX(m3, m1.cwise() - s1); in eigen2support() 39 VERIFY_IS_EQUAL((m1.corner(TopLeft,1,1)), (m1.block(0,0,1,1))); in eigen2support() 40 VERIFY_IS_EQUAL((m1.template corner<1,1>(TopLeft)), (m1.template block<1,1>(0,0))); in eigen2support() [all …]
|
D | block.cpp | 26 MatrixType m1 = MatrixType::Random(rows, cols), in block() local 27 m1_copy = m1, in block() 41 VERIFY_IS_EQUAL(m1.col(c1).transpose(), m1.transpose().row(c1)); in block() 43 m1 = m1_copy; in block() 44 m1.row(r1) += s1 * m1_copy.row(r2); in block() 45 VERIFY_IS_APPROX(m1.row(r1), m1_copy.row(r1) + s1 * m1_copy.row(r2)); in block() 47 m1.row(r1).row(0) += s1 * m1_copy.row(r2); in block() 48 VERIFY_IS_APPROX(m1.row(r1), m1_copy.row(r1) + Scalar(2) * s1 * m1_copy.row(r2)); in block() 49 m1 = m1_copy; in block() 50 m1.col(c1) += s1 * m1_copy.col(c2); in block() [all …]
|
D | product_trmv.cpp | 24 MatrixType m1 = MatrixType::Random(rows, cols), in trmv() local 30 m1 = MatrixType::Random(rows, cols); in trmv() 33 m3 = m1.template triangularView<Eigen::Lower>(); in trmv() 34 VERIFY((m3 * v1).isApprox(m1.template triangularView<Eigen::Lower>() * v1, largerEps)); in trmv() 35 m3 = m1.template triangularView<Eigen::Upper>(); in trmv() 36 VERIFY((m3 * v1).isApprox(m1.template triangularView<Eigen::Upper>() * v1, largerEps)); in trmv() 37 m3 = m1.template triangularView<Eigen::UnitLower>(); in trmv() 38 VERIFY((m3 * v1).isApprox(m1.template triangularView<Eigen::UnitLower>() * v1, largerEps)); in trmv() 39 m3 = m1.template triangularView<Eigen::UnitUpper>(); in trmv() 40 VERIFY((m3 * v1).isApprox(m1.template triangularView<Eigen::UnitUpper>() * v1, largerEps)); in trmv() [all …]
|
D | inverse.cpp | 27 MatrixType m1(rows, cols), in inverse() local 30 createRandomPIMatrixOfRank(rows,rows,rows,m1); in inverse() 31 m2 = m1.inverse(); in inverse() 32 VERIFY_IS_APPROX(m1, m2.inverse() ); in inverse() 36 VERIFY_IS_APPROX(identity, m1.inverse() * m1 ); in inverse() 37 VERIFY_IS_APPROX(identity, m1 * m1.inverse() ); in inverse() 39 VERIFY_IS_APPROX(m1, m1.inverse().inverse() ); in inverse() 42 VERIFY_IS_APPROX(MatrixType(m1.transpose().inverse()), MatrixType(m1.inverse().transpose())); in inverse() 51 m1.computeInverseAndDetWithCheck(m2, det, invertible); in inverse() 53 VERIFY_IS_APPROX(identity, m1*m2); in inverse() [all …]
|
D | swap.cpp | 35 MatrixType m1 = MatrixType::Random(rows,cols); in swap() local 39 MatrixType m1_copy = m1; in swap() 44 m1.swap(m2); in swap() 45 VERIFY_IS_APPROX(m1,m2_copy); in swap() 47 m1 = m1_copy; in swap() 51 m1.swap(m3); in swap() 52 VERIFY_IS_APPROX(m1,m3_copy); in swap() 54 m1 = m1_copy; in swap() 58 m1.swap(m2.block(0,0,rows,cols)); in swap() 59 VERIFY_IS_APPROX(m1,m2_copy); in swap() [all …]
|
/external/eigen/test/eigen2/ |
D | eigen2_linearstructure.cpp | 26 MatrixType m1 = MatrixType::Random(rows, cols), in linearStructure() local 37 VERIFY_IS_APPROX(-(-m1), m1); in linearStructure() 38 VERIFY_IS_APPROX(m1+m1, 2*m1); in linearStructure() 39 VERIFY_IS_APPROX(m1+m2-m1, m2); in linearStructure() 40 VERIFY_IS_APPROX(-m2+m1+m2, m1); in linearStructure() 41 VERIFY_IS_APPROX(m1*s1, s1*m1); in linearStructure() 42 VERIFY_IS_APPROX((m1+m2)*s1, s1*m1+s1*m2); in linearStructure() 43 VERIFY_IS_APPROX((-m1+m2)*s1, -s1*m1+s1*m2); in linearStructure() 44 m3 = m2; m3 += m1; in linearStructure() 45 VERIFY_IS_APPROX(m3, m1+m2); in linearStructure() [all …]
|
D | eigen2_cwiseop.cpp | 31 MatrixType m1 = MatrixType::Random(rows, cols), in cwiseops() local 79 VERIFY_IS_APPROX(m1.cwise().pow(2), m1.cwise().abs2()); in cwiseops() 80 VERIFY_IS_APPROX(m1.cwise().pow(2), m1.cwise().square()); in cwiseops() 81 VERIFY_IS_APPROX(m1.cwise().pow(3), m1.cwise().cube()); in cwiseops() 83 VERIFY_IS_APPROX(m1 + mones, m1.cwise()+Scalar(1)); in cwiseops() 84 VERIFY_IS_APPROX(m1 - mones, m1.cwise()-Scalar(1)); in cwiseops() 85 m3 = m1; m3.cwise() += 1; in cwiseops() 86 VERIFY_IS_APPROX(m1 + mones, m3); in cwiseops() 87 m3 = m1; m3.cwise() -= 1; in cwiseops() 88 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 56 OtherMajorMatrixType tm1 = m1; in product() 66 VERIFY_IS_APPROX((m1*m1.transpose())*m2, m1*(m1.transpose()*m2)); in product() 67 m3 = m1; in product() 68 m3 *= m1.transpose() * m2; in product() 69 VERIFY_IS_APPROX(m3, m1 * (m1.transpose()*m2)); in product() 70 VERIFY_IS_APPROX(m3, m1.lazy() * (m1.transpose()*m2)); in product() [all …]
|
D | eigen2_submatrices.cpp | 19 CheckMinor(MatrixType& m1, int r1, int c1) in CheckMinor() 21 int rows = m1.rows(); in CheckMinor() 22 int cols = m1.cols(); in CheckMinor() 24 Matrix<Scalar, Dynamic, Dynamic> mi = m1.minor(0,0).eval(); in CheckMinor() 25 VERIFY_IS_APPROX(mi, m1.block(1,1,rows-1,cols-1)); in CheckMinor() 26 mi = m1.minor(r1,c1); in CheckMinor() 27 VERIFY_IS_APPROX(mi.transpose(), m1.transpose().minor(c1,r1)); in CheckMinor() 29 m1.minor(r1,c1)(0,0) = m1.minor(0,0)(0,0); in CheckMinor() 51 MatrixType m1 = MatrixType::Random(rows, cols), in submatrices() local 73 VERIFY_IS_APPROX(m1.col(c1).transpose(), m1.transpose().row(c1)); in submatrices() [all …]
|
D | eigen2_swap.cpp | 35 MatrixType m1 = MatrixType::Random(rows,cols); in swap() local 39 MatrixType m1_copy = m1; in swap() 44 m1.swap(m2); in swap() 45 VERIFY_IS_APPROX(m1,m2_copy); in swap() 47 m1 = m1_copy; in swap() 51 m1.swap(m3); in swap() 52 VERIFY_IS_APPROX(m1,m3_copy); in swap() 54 m1 = m1_copy; in swap() 58 m1.swap(m2.block(0,0,rows,cols)); in swap() 59 VERIFY_IS_APPROX(m1,m2_copy); in swap() [all …]
|
D | eigen2_basicstuff.cpp | 22 MatrixType m1 = MatrixType::Random(rows, cols), in basicStuff() local 38 m1.coeffRef(r,c) = x; in basicStuff() 39 VERIFY_IS_APPROX(x, m1.coeff(r,c)); in basicStuff() 40 m1(r,c) = x; in basicStuff() 41 VERIFY_IS_APPROX(x, m1(r,c)); in basicStuff() 56 VERIFY_IS_APPROX( m1, m1); in basicStuff() 57 VERIFY_IS_NOT_APPROX( m1, 2*m1); in basicStuff() 58 VERIFY_IS_MUCH_SMALLER_THAN( mzero, m1); in basicStuff() 59 VERIFY_IS_NOT_MUCH_SMALLER_THAN(m1, m1); in basicStuff() 60 VERIFY_IS_APPROX( mzero, m1-m1); in basicStuff() [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/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 …]
|
/external/valgrind/main/none/tests/s390x/ |
D | mul.h | 3 #define MUL_REG_MEM(insn, m1, m2) \ argument 5 unsigned long tmp1 = m1; \ 6 unsigned long tmp2 = m1; \ 15 printf(#insn " %16.16lX * %16.16lX = %16.16lX%16.16lX\n", m1, m2, tmp1, tmp2); \ 18 #define MUL_REG_REG(insn, m1, m2) \ argument 20 unsigned long tmp1 = m1; \ 21 unsigned long tmp2 = m1; \ 30 printf(#insn " %16.16lX * %16.16lX = %16.16lX%16.16lX\n", m1, m2, tmp1, tmp2); \ 33 #define MUL_REG_IMM(insn, m1, m2) \ argument 35 unsigned long tmp1 = m1; \ [all …]
|