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();
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();
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();
143 template<
typename PlainObjectType>
152 ptr = internal::aligned_new<float>(1000);
153 for(
int i = 0;
i < 1000;
i++) ptr[
i] =
float(
i);