aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2008-09-03 14:42:36 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2008-09-03 14:42:36 +0000
commit3bbd1b3114e2afbac07e3f6c53be4ee7b203c67e (patch)
treefaf661e6b3de0b8264ef17e9647723dcc04b5948 /test
parent75649551c26b7fb6cff4933aaa7b31303163aaa7 (diff)
Bugfix regarding alignent in Assign.h (updated map unit test to detect this bug)
Anyway: LinearVectorization+CompleteUnrolling actually uses the InnerVectorization unrollers, so these two cases could be merged to a single one...
Diffstat (limited to 'test')
-rw-r--r--test/map.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/map.cpp b/test/map.cpp
index e7c1cf03d..705a74c3a 100644
--- a/test/map.cpp
+++ b/test/map.cpp
@@ -33,13 +33,21 @@ template<typename VectorType> void tmap(const VectorType& m)
// test Map.h
Scalar* array1 = ei_aligned_malloc<Scalar>(size);
Scalar* array2 = ei_aligned_malloc<Scalar>(size);
+ Scalar* array3 = new Scalar[size+1];
+ Scalar* array3unaligned = size_t(array3)%16 == 0 ? array3+1 : array3;
+
Map<VectorType, Aligned>(array1, size) = VectorType::Random(size);
Map<VectorType>(array2, size) = Map<VectorType>(array1, size);
+ Map<VectorType>(array3unaligned, size) = Map<VectorType>(array1, size);
VectorType ma1 = Map<VectorType>(array1, size);
VectorType ma2 = Map<VectorType, Aligned>(array2, size);
+ VectorType ma3 = Map<VectorType>(array3unaligned, size);
VERIFY_IS_APPROX(ma1, ma2);
+ VERIFY_IS_APPROX(ma1, ma3);
+
ei_aligned_free(array1);
ei_aligned_free(array2);
+ delete[] array3;
}
void test_map()