11 #ifdef EIGEN_DEFAULT_TO_ROW_MAJOR 12 #undef EIGEN_DEFAULT_TO_ROW_MAJOR 15 #define TEST_ENABLE_TEMPORARY_TRACKING 16 #define TEST_CHECK_STATIC_ASSERTIONS 22 #if EIGEN_ARCH_i386 && !(EIGEN_ARCH_x86_64) 24 #if EIGEN_COMP_GNUC_STRICT && EIGEN_GNUC_AT_LEAST(4,4) 25 #pragma GCC optimize ("-ffloat-store") 27 #undef VERIFY_IS_EQUAL 28 #define VERIFY_IS_EQUAL(X,Y) VERIFY_IS_APPROX(X,Y) 50 Index i = internal::random<Index>(0,rows-1);
52 Index brows = internal::random<Index>(1,rows-
i);
53 Index bcols = internal::random<Index>(1,
cols-
j);
59 RefDynMat rm2 = m1.block(i,j,brows,bcols);
62 m2.block(i,j,brows,bcols).setOnes();
65 m2.block(i,j,brows,bcols).setRandom();
66 rm2 =
m2.block(i,j,brows,bcols);
69 ConstRefDynMat rm3 = m1.block(i,j,brows,bcols);
70 m1.block(i,j,brows,bcols) *= 2;
71 m2.block(i,j,brows,bcols) *= 2;
73 RefRealMatWithStride rm4 = m1.real();
76 m2.real().array() += 1;
98 MatrixType
mat1 = MatrixType::Random(size,size),
100 mat3 = MatrixType::Random(size,size);
102 Index i = internal::random<Index>(0,size-1);
103 Index bsize = internal::random<Index>(1,size-
i);
109 RefDynMat rv2 = v1.segment(i,bsize);
112 v2.segment(i,bsize).setOnes();
115 v2.segment(i,bsize).setRandom();
116 rv2 =
v2.segment(i,bsize);
119 ConstRefDynMat rm3 = v1.segment(i,bsize);
120 v1.segment(i,bsize) *= 2;
121 v2.segment(i,bsize) *= 2;
124 RefRealMatWithStride rm4 = v1.real();
127 v2.real().array() += 1;
130 RefMatWithStride rm5 = mat1.row(i).transpose();
133 mat2.row(i).array() += 1;
135 rm5.noalias() = rm4.transpose() * mat3;
136 mat2.row(i) =
v2.real().transpose() * mat3;
167 VectorXcf ca = VectorXcf::Random(10);
168 VectorXf
a = VectorXf::Random(10);
169 RowVectorXf
b = RowVectorXf::Random(10);
170 MatrixXf
A = MatrixXf::Random(10,10);
171 RowVector3f
c = RowVector3f::Random();
172 const VectorXf& ac(a);
189 MatrixXf tmp = A*A.col(1);
282 CALL_SUBTEST_4(
ref_matrix(MatrixXcf(internal::random<int>(1,10),internal::random<int>(1,10))) );
284 CALL_SUBTEST_5(
ref_matrix(MatrixXi(internal::random<int>(1,10),internal::random<int>(1,10))) );
Matrix< double, Dynamic, Dynamic, RowMajor > RowMatrixXd
void test_ref_overloads()
EIGEN_DONT_INLINE void call_ref_5(Ref< MatrixXf, 0, OuterStride<> > a, const B &b)
const unsigned int LvalueBit
MatrixXd mat1(size, size)
Matrix< SCALARA, Dynamic, Dynamic > A
void test_ref_ambiguous(const Ref< const ArrayXd > &A, Ref< ArrayXd > B)
#define VERIFY_RAISES_STATIC_ASSERT(a)
Matrix< SCALARB, Dynamic, Dynamic > B
#define EIGEN_DONT_INLINE
EIGEN_DONT_INLINE void call_ref_1(Ref< VectorXf > a, const B &b)
EIGEN_DONT_INLINE void call_ref_3(Ref< VectorXf, 0, InnerStride<> > a, const B &b)
#define VERIFY_EVALUATION_COUNT(XPR, N)
Expression of a fixed-size or dynamic-size sub-vector.
#define VERIFY_IS_APPROX(a, b)
#define VERIFY_IS_EQUAL(a, b)
void test_ref_fixed_size_assert()
EIGEN_DONT_INLINE void call_ref_6(const Ref< const MatrixXf, 0, OuterStride<> > &a, const B &b)
Convenience specialization of Stride to specify only an inner stride See class Map for some examples...
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
void ref_vector(const VectorType &m)
void check_const_correctness(const PlainObjectType &)
EIGEN_DONT_INLINE void call_ref_2(const Ref< const VectorXf > &a, const B &b)
NumTraits< Scalar >::Real RealScalar
A matrix or vector expression mapping an existing expression.
EIGEN_DONT_INLINE void call_ref_7(Ref< Matrix< float, Dynamic, 3 > > a, const B &b)
EIGEN_DONT_INLINE void call_ref_4(const Ref< const VectorXf, 0, InnerStride<> > &a, const B &b)
void ref_matrix(const MatrixType &m)
Expression of a diagonal/subdiagonal/superdiagonal in a matrix.
StridedVectorType vx(make_vector(x,*n, std::abs(*incx)))
The matrix class, also used for vectors and row-vectors.
Convenience specialization of Stride to specify only an outer stride See class Map for some examples...
int test_ref_overload_fun1(Ref< MatrixXd >)
int test_ref_overload_fun2(Ref< const MatrixXd >)