11 #define TEST_ENABLE_TEMPORARY_TRACKING 12 #define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8 41 p *= m1_for_prod(
i,
j);
54 VERIFY_IS_APPROX((m1.matrix() * m1.matrix().transpose()) .cwiseProduct(m2.matrix()).rowwise().sum().sum(),
55 (m1.matrix() * m1.matrix().transpose()).
eval().cwiseProduct(m2.matrix()).rowwise().sum().sum());
58 Index r0 = internal::random<Index>(0,rows-1);
59 Index c0 = internal::random<Index>(0,cols-1);
61 Index c1 = internal::random<Index>(c0+1,
cols)-c0;
62 VERIFY_IS_APPROX(m1.block(r0,c0,r1,c1).sum(), m1.block(r0,c0,r1,c1).eval().sum());
63 VERIFY_IS_APPROX(m1.block(r0,c0,r1,c1).mean(), m1.block(r0,c0,r1,c1).eval().mean());
64 VERIFY_IS_APPROX(m1_for_prod.block(r0,c0,r1,c1).prod(), m1_for_prod.block(r0,c0,r1,c1).eval().prod());
65 VERIFY_IS_APPROX(m1.block(r0,c0,r1,c1).real().minCoeff(), m1.block(r0,c0,r1,c1).real().eval().minCoeff());
66 VERIFY_IS_APPROX(m1.block(r0,c0,r1,c1).real().maxCoeff(), m1.block(r0,c0,r1,c1).real().eval().maxCoeff());
69 const int R1 = MatrixType::RowsAtCompileTime>=2 ? MatrixType::RowsAtCompileTime/2 : 6;
70 const int C1 = MatrixType::ColsAtCompileTime>=2 ? MatrixType::ColsAtCompileTime/2 : 6;
71 if(R1<=rows-r0 && C1<=cols-c0)
73 VERIFY_IS_APPROX( (m1.template block<R1,C1>(r0,c0).sum()), m1.block(r0,c0,R1,C1).sum() );
81 VERIFY_EVALUATION_COUNT( (m1.matrix()*m1.matrix().transpose()).sum(), (MatrixType::IsVectorAtCompileTime && MatrixType::SizeAtCompileTime!=1 ? 0 : 1) );
82 VERIFY_EVALUATION_COUNT( ((m1.matrix()*m1.matrix().transpose())+m2).sum(),(MatrixType::IsVectorAtCompileTime && MatrixType::SizeAtCompileTime!=1 ? 0 : 1));
99 for(
int j = 0;
j <
i;
j++)
112 for(
int i = 0;
i < size-1;
i++)
129 for(
int i = 0;
i < size/2;
i++)
133 for(
int j =
i;
j < size-
i;
j++)
#define VERIFY_RAISES_ASSERT(a)
#define CALL_SUBTEST_6(FUNC)
#define CALL_SUBTEST_4(FUNC)
#define CALL_SUBTEST_3(FUNC)
#define CALL_SUBTEST_7(FUNC)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
void vectorRedux(const VectorType &w)
static const Vector2 mean(20, 40)
#define VERIFY_EVALUATION_COUNT(XPR, N)
#define VERIFY_IS_APPROX(a, b)
#define CALL_SUBTEST_1(FUNC)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Array< int, Dynamic, 1 > v
#define CALL_SUBTEST_8(FUNC)
NumTraits< Scalar >::Real RealScalar
#define VERIFY_IS_MUCH_SMALLER_THAN(a, b)
#define TEST_SET_BUT_UNUSED_VARIABLE(X)
#define CALL_SUBTEST_5(FUNC)
#define EIGEN_TEST_MAX_SIZE
General-purpose arrays with easy API for coefficient-wise operations.
#define CALL_SUBTEST_2(FUNC)
internal::nested_eval< T, 1 >::type eval(const T &xpr)
EIGEN_DECLARE_TEST(redux)
The matrix class, also used for vectors and row-vectors.
void matrixRedux(const MatrixType &m)
Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & setRandom(Index size)