16 const float *const_ptr;
19 template<
typename PlainObjectType,
20 bool IsDynamicSize = PlainObjectType::SizeAtCompileTime ==
Dynamic,
21 bool IsVector = PlainObjectType::IsVectorAtCompileTime
25 template<
typename PlainObjectType,
bool IsVector>
28 static void run(
const PlainObjectType&
m)
32 int i = internal::random<int>(2,5),
j = internal::random<int>(2,5);
34 PlainObjectType::Map(ptr).setZero();
35 PlainObjectType::MapAligned(ptr).setZero();
36 PlainObjectType::Map(const_ptr).sum();
37 PlainObjectType::MapAligned(const_ptr).sum();
42 PlainObjectType::MapAligned(const_ptr,
InnerStride<>(i)).sum();
52 PlainObjectType::MapAligned(const_ptr,
OuterStride<>(i)).sum();
65 PlainObjectType::MapAligned(ptr,
Stride<3,4>()).setZero();
66 PlainObjectType::Map(const_ptr,
Stride<2,4>()).sum();
67 PlainObjectType::MapAligned(const_ptr,
Stride<5,3>()).sum();
71 template<
typename PlainObjectType>
74 static void run(
const PlainObjectType&
m)
78 int i = internal::random<int>(2,5),
j = internal::random<int>(2,5);
80 PlainObjectType::Map(ptr, rows,
cols).setZero();
81 PlainObjectType::MapAligned(ptr, rows,
cols).setZero();
82 PlainObjectType::Map(const_ptr, rows,
cols).sum();
83 PlainObjectType::MapAligned(const_ptr, rows,
cols).sum();
113 PlainObjectType::MapAligned(const_ptr, rows,
cols,
Stride<5,3>()).sum();
117 template<
typename PlainObjectType>
120 static void run(
const PlainObjectType&
v)
124 int i = internal::random<int>(2,5);
126 PlainObjectType::Map(ptr, size).setZero();
127 PlainObjectType::MapAligned(ptr, size).setZero();
128 PlainObjectType::Map(const_ptr, size).sum();
129 PlainObjectType::MapAligned(const_ptr, size).sum();
132 PlainObjectType::MapAligned(ptr, size,
InnerStride<>(i)).setZero();
133 PlainObjectType::Map(const_ptr, size,
InnerStride<>(i)).sum();
134 PlainObjectType::MapAligned(const_ptr, size,
InnerStride<>(i)).sum();
137 PlainObjectType::MapAligned(ptr, size,
InnerStride<3>()).setZero();
139 PlainObjectType::MapAligned(const_ptr, size,
InnerStride<5>()).sum();
143 template<
typename PlainObjectType>
152 ptr = internal::aligned_new<float>(1000);
153 for(
int i = 0;
i < 1000;
i++) ptr[
i] =
float(
i);
#define CALL_SUBTEST_6(FUNC)
#define CALL_SUBTEST_4(FUNC)
#define CALL_SUBTEST_3(FUNC)
#define CALL_SUBTEST_7(FUNC)
EIGEN_DEVICE_FUNC void aligned_delete(T *ptr, std::size_t size)
Holds strides information for Map.
static void run(const PlainObjectType &v)
static void run(const PlainObjectType &m)
#define CALL_SUBTEST_1(FUNC)
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.
Array< int, Dynamic, 1 > v
#define CALL_SUBTEST_8(FUNC)
EIGEN_DECLARE_TEST(mapstaticmethods)
#define CALL_SUBTEST_5(FUNC)
static void run(const PlainObjectType &m)
#define CALL_SUBTEST_2(FUNC)
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 mapstaticmethods(const PlainObjectType &m)