diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/map.cpp | 8 |
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() |