22 Scalar* a_array = internal::aligned_new<Scalar>(arraysize+1);
23 Scalar*
array = a_array;
57 Scalar s1 = internal::random<Scalar>();
61 Scalar* a_array1 = internal::aligned_new<Scalar>(arraysize+1);
62 Scalar* array1 = a_array1;
67 Scalar* array2 = a_array2;
72 Index maxsize2 = a_array2 - array2 + 256;
75 for(
int k=0; k<2; ++k)
77 if(k==1 && (m.innerSize()+1)*m.outerSize() > maxsize2)
79 Scalar*
array = (k==0 ? array1 : array2);
84 for(
int i = 0;
i < m.outerSize(); ++
i)
85 for(
int j = 0;
j < m.innerSize(); ++
j)
88 VERIFY(map.coeffByOuterInner(
i,
j) == m.coeffByOuterInner(
i,
j));
97 for(
int k=0; k<2; ++k)
99 if(k==1 && (m.innerSize()+4)*m.outerSize() > maxsize2)
101 Scalar*
array = (k==0 ? array1 : array2);
104 InnerSize = MatrixType::InnerSizeAtCompileTime,
105 OuterStrideAtCompileTime = InnerSize==
Dynamic ?
Dynamic : InnerSize+4
111 for(
int i = 0;
i < m.outerSize(); ++
i)
112 for(
int j = 0;
j < m.innerSize(); ++
j)
115 VERIFY(map.coeffByOuterInner(
i,
j) == m.coeffByOuterInner(
i,
j));
123 for(
int k=0; k<2; ++k)
125 if(k==1 && (2*m.innerSize()+1)*(m.outerSize()*2) > maxsize2)
127 Scalar*
array = (k==0 ? array1 : array2);
133 for(
int i = 0;
i < m.outerSize(); ++
i)
134 for(
int j = 0;
j < m.innerSize(); ++
j)
137 VERIFY(map.coeffByOuterInner(
i,
j) == m.coeffByOuterInner(
i,
j));
145 for(
int k=0; k<2; ++k)
147 if(k==1 && (m.innerSize()*2)*m.outerSize() > maxsize2)
149 Scalar*
array = (k==0 ? array1 : array2);
154 for(
int i = 0;
i < m.outerSize(); ++
i)
155 for(
int j = 0;
j < m.innerSize(); ++
j)
157 VERIFY(array[map.innerSize()*
i*2+
j*2] == m.coeffByOuterInner(
i,
j));
158 VERIFY(map.coeffByOuterInner(
i,
j) == m.coeffByOuterInner(
i,
j));
172 const int data[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
206 CALL_SUBTEST_2( map_class_vector<Aligned>(Vector4d()) );
207 CALL_SUBTEST_2( map_class_vector<Unaligned>(Vector4d()) );
208 CALL_SUBTEST_3( map_class_vector<Aligned>(RowVector4f()) );
209 CALL_SUBTEST_3( map_class_vector<Unaligned>(RowVector4f()) );
210 CALL_SUBTEST_4( map_class_vector<Aligned>(VectorXcf(internal::random<int>(1,maxn))) );
211 CALL_SUBTEST_4( map_class_vector<Unaligned>(VectorXcf(internal::random<int>(1,maxn))) );
212 CALL_SUBTEST_5( map_class_vector<Aligned>(VectorXi(internal::random<int>(1,maxn))) );
213 CALL_SUBTEST_5( map_class_vector<Unaligned>(VectorXi(internal::random<int>(1,maxn))) );
217 CALL_SUBTEST_2( map_class_matrix<Aligned>(Matrix4d()) );
218 CALL_SUBTEST_2( map_class_matrix<Unaligned>(Matrix4d()) );
223 CALL_SUBTEST_4( map_class_matrix<Aligned>(MatrixXcf(internal::random<int>(1,maxn),internal::random<int>(1,maxn))) );
224 CALL_SUBTEST_4( map_class_matrix<Unaligned>(MatrixXcf(internal::random<int>(1,maxn),internal::random<int>(1,maxn))) );
225 CALL_SUBTEST_5( map_class_matrix<Aligned>(MatrixXi(internal::random<int>(1,maxn),internal::random<int>(1,maxn))) );
226 CALL_SUBTEST_5( map_class_matrix<Unaligned>(MatrixXi(internal::random<int>(1,maxn),internal::random<int>(1,maxn))) );
227 CALL_SUBTEST_6( map_class_matrix<Aligned>(MatrixXcd(internal::random<int>(1,maxn),internal::random<int>(1,maxn))) );
228 CALL_SUBTEST_6( map_class_matrix<Unaligned>(MatrixXcd(internal::random<int>(1,maxn),internal::random<int>(1,maxn))) );
230 CALL_SUBTEST_5( bug1453<0>() );
#define EIGEN_MAX_ALIGN_BYTES
A matrix or vector expression mapping an existing array of data.
EIGEN_DEVICE_FUNC void aligned_delete(T *ptr, std::size_t size)
Holds strides information for Map.
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
void map_class_matrix(const MatrixType &_m)
#define VERIFY_IS_APPROX(a, b)
EIGEN_DEVICE_FUNC Index innerStride() const
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.
EIGEN_DEVICE_FUNC Index outerStride() const
#define TEST_SET_BUT_UNUSED_VARIABLE(X)
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...
void map_class_vector(const VectorType &m)