10 #define TEST_ENABLE_TEMPORARY_TRACKING 14 template<
typename Dst,
typename Lhs,
typename Rhs>
25 template<
typename Dst,
typename Lhs,
typename Rhs,
typename S2>
35 template<
typename Dst,
typename Lhs,
typename Rhs,
typename S1,
typename S2>
59 ColMajorMatrixType
m1 = MatrixType::Random(rows, cols),
60 m2 = MatrixType::Random(rows, cols),
62 RowVectorType rv1 = RowVectorType::Random(rows), rvres(rows);
63 ColVectorType cv1 = ColVectorType::Random(cols), cvres(cols);
64 RowMajorMatrixType rm3(rows, cols);
66 Scalar s1 = internal::random<Scalar>(),
67 s2 = internal::random<Scalar>(),
68 s3 = internal::random<Scalar>();
70 Index c0 = internal::random<Index>(4,cols-8),
71 c1 = internal::random<Index>(8,cols-c0),
72 r0 = internal::random<Index>(4,cols-8),
73 r1 = internal::random<Index>(8,rows-r0);
100 VERIFY_EVALUATION_COUNT(( m3.block(r0,r0,
r1,
r1).noalias() += -m1.block(r0,c0,
r1,c1) * (s2*m2.block(r0,c0,
r1,c1)).
adjoint() ), 0);
101 VERIFY_EVALUATION_COUNT(( m3.block(r0,r0,
r1,
r1).noalias() -= s1 * m1.block(r0,c0,
r1,c1) * m2.block(c0,r0,c1,
r1) ), 0);
104 VERIFY_EVALUATION_COUNT(( m3.block(r0,r0,
r1,
r1).noalias() = s1 * m1.block(r0,c0,
r1,c1) * (s1*
m2).
block(c0,r0,c1,
r1) ), 1);
108 VERIFY_EVALUATION_COUNT( rm3.noalias() = (s1 * m1.adjoint()).
template triangularView<UnitUpper>() * m2.adjoint(), 0);
120 VERIFY_EVALUATION_COUNT( m3.noalias() = s2 * m2.adjoint() * (s1 * m1.adjoint()).
template selfadjointView<Upper>(), 0);
121 VERIFY_EVALUATION_COUNT( rm3.noalias() = (s1 * m1.adjoint()).
template selfadjointView<Lower>() * m2.adjoint(), 0);
127 VERIFY_EVALUATION_COUNT( m3.block(r0,c0,
r1,c1).noalias() += m1.block(r0,r0,
r1,
r1).template selfadjointView<Upper>() * (s1*m2.block(r0,c0,
r1,c1)), 0);
128 VERIFY_EVALUATION_COUNT( m3.block(r0,c0,
r1,c1).noalias() = m1.block(r0,r0,
r1,
r1).template selfadjointView<Upper>() * m2.block(r0,c0,
r1,c1), 0);
139 m3.setRandom(rows,cols);
148 VERIFY_EVALUATION_COUNT( m3.col(0).template head<5>() * m3.col(0).transpose() + m3.col(0).template head<5>() * m3.col(0).transpose(), 0 );
166 bool temp_via_alloca =
false;
191 check_scalar_multiple1(m3_blck, m1.block(r0,c0,1,1), m2.block(c0,r0,1,1), s1, s2);
Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
void product_notemporary(const MatrixType &m)
#define CALL_SUBTEST_4(FUNC)
m m block(1, 0, 2, 2)<< 4
void adjoint(const MatrixType &m)
#define CALL_SUBTEST_3(FUNC)
void check_scalar_multiple3(Dst &dst, const Lhs &A, const Rhs &B)
void diagonal(const MatrixType &m)
EIGEN_DECLARE_TEST(product_notemporary)
Block< Derived > BlockXpr
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
#define VERIFY_EVALUATION_COUNT(XPR, N)
#define VERIFY_IS_APPROX(a, b)
void check_scalar_multiple1(Dst &dst, const Lhs &A, const Rhs &B, S1 s1, S2 s2)
#define CALL_SUBTEST_1(FUNC)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
EIGEN_DEVICE_FUNC ConjugateReturnType conjugate() const
NumTraits< Scalar >::Real RealScalar
void check_scalar_multiple2(Dst &dst, const Lhs &A, const Rhs &B, S2 s2)
#define TEST_SET_BUT_UNUSED_VARIABLE(X)
#define CALL_SUBTEST(FUNC)
#define EIGEN_TEST_MAX_SIZE
A triangularView< Lower >().adjoint().solveInPlace(B)
#define EIGEN_STACK_ALLOCATION_LIMIT
#define CALL_SUBTEST_2(FUNC)
internal::nested_eval< T, 1 >::type eval(const T &xpr)
The matrix class, also used for vectors and row-vectors.