10 #ifndef EIGEN_NO_STATIC_ASSERT 11 #define EIGEN_NO_STATIC_ASSERT // turn static asserts into runtime asserts in order to check them 16 #define EIGEN_TESTMAP_MAX_SIZE 256 24 Scalar* array1 = internal::aligned_new<Scalar>(
size);
25 Scalar* array2 = internal::aligned_new<Scalar>(
size);
26 Scalar* array3 =
new Scalar[size+1];
41 #ifdef EIGEN_VECTORIZE 42 if(internal::packet_traits<Scalar>::Vectorizable && size>=
AlignedMax)
56 Scalar s1 = internal::random<Scalar>();
59 Scalar* array1 = internal::aligned_new<Scalar>(
size);
61 Scalar* array2 = internal::aligned_new<Scalar>(
size);
64 Scalar* array3 =
new Scalar[size+1];
65 Index sizep1 = size + 1;
80 map1 = MatrixType::Random(rows,cols);
127 Scalar* array1 = internal::aligned_new<Scalar>(
size);
128 Scalar* array2 = internal::aligned_new<Scalar>(
size);
129 Scalar* array3 =
new Scalar[size+1];
132 VectorType::MapAligned(array1, size) = VectorType::Random(size);
133 VectorType::Map(array2, size) = VectorType::Map(array1, size);
134 VectorType::Map(array3unaligned, size) = VectorType::Map(array1, size);
135 VectorType ma1 = VectorType::Map(array1, size);
136 VectorType ma2 = VectorType::MapAligned(array2, size);
137 VectorType ma3 = VectorType::Map(array3unaligned, size);
160 template<
typename Scalar>
165 Scalar* array1 = internal::aligned_new<Scalar>((size+1)*(size+1)+1);
168 MatrixType
m2 = MatrixType::Random(size,size);
174 MatrixType
v3 = VectorType::Random(size);
197 CALL_SUBTEST_4(
map_class_matrix(MatrixXcf(internal::random<int>(1,10),internal::random<int>(1,10))) );
198 CALL_SUBTEST_5(
map_class_matrix(MatrixXi(internal::random<int>(1,10),internal::random<int>(1,10))) );
206 CALL_SUBTEST_11( map_not_aligned_on_scalar<double>() );
#define VERIFY_RAISES_ASSERT(a)
#define EIGEN_MAX_ALIGN_BYTES
A matrix or vector expression mapping an existing array of data.
const unsigned int LvalueBit
EIGEN_DEVICE_FUNC void aligned_delete(T *ptr, std::size_t size)
void map_class_vector(const VectorType &m)
void map_static_methods(const VectorType &m)
#define VERIFY_IS_APPROX(a, b)
#define VERIFY_IS_EQUAL(a, b)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
void test_mapped_matrix()
void map_not_aligned_on_scalar()
void check_const_correctness(const PlainObjectType &)
Expression of a diagonal/subdiagonal/superdiagonal in a matrix.
void map_class_matrix(const MatrixType &m)
Convenience specialization of Stride to specify only an outer stride See class Map for some examples...
#define EIGEN_TESTMAP_MAX_SIZE