aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2009-10-23 14:26:14 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2009-10-23 14:26:14 +0200
commita382963b04d4b847c6b0ef0611511fb6a8e11718 (patch)
treead12bedf1d6537b14219889c49b82773a9bc8fab /test
parent83a7b7c44c4842e1cfa89179624f4448d39a9e5b (diff)
* extend Map to allow the user to specify whether the mapped data
is aligned or not. This is done using the Aligned constant: Map<MatrixType,Aligned>::Map(data); * rename ForceAligned to EnforceAlignedAccess, and update its doc, and emphasize this is mainly an internal stuff.
Diffstat (limited to 'test')
-rw-r--r--test/map.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/map.cpp b/test/map.cpp
index 62e727304..fbff647f6 100644
--- a/test/map.cpp
+++ b/test/map.cpp
@@ -37,14 +37,15 @@ template<typename VectorType> void map_class(const VectorType& m)
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, Aligned>(array2, size) = Map<VectorType,Aligned>(array1, size);
Map<VectorType>(array3unaligned, size) = Map<VectorType>(array1, size);
- VectorType ma1 = Map<VectorType>(array1, size);
+ VectorType ma1 = Map<VectorType, Aligned>(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);
-
+ VERIFY_RAISES_ASSERT((Map<VectorType,Aligned>(array3unaligned, size)));
+
ei_aligned_delete(array1, size);
ei_aligned_delete(array2, size);
delete[] array3;