aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/dynalloc.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2015-11-30 22:36:14 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2015-11-30 22:36:14 +0100
commit844561939f931643df7d6e2387288bb0fe7b600f (patch)
tree0027ee5e1fd69fbdc818e88e095fa6e52af036c5 /test/dynalloc.cpp
parent1d906d883df54c87d7a6c8418b6aa282be0f8556 (diff)
Do not check NeedsToAlign if no static alignment
Diffstat (limited to 'test/dynalloc.cpp')
-rw-r--r--test/dynalloc.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/test/dynalloc.cpp b/test/dynalloc.cpp
index 3d895f2e0..6f22e1ab4 100644
--- a/test/dynalloc.cpp
+++ b/test/dynalloc.cpp
@@ -129,13 +129,6 @@ void test_dynalloc()
for (int i=0; i<g_repeat*100; ++i)
{
- CALL_SUBTEST(check_dynaligned<Vector4f>() );
- CALL_SUBTEST(check_dynaligned<Vector2d>() );
- CALL_SUBTEST(check_dynaligned<Matrix4f>() );
- CALL_SUBTEST(check_dynaligned<Vector4d>() );
- CALL_SUBTEST(check_dynaligned<Vector4i>() );
- CALL_SUBTEST(check_dynaligned<Vector8f>() );
-
CALL_SUBTEST( check_custom_new_delete<Vector4f>() );
CALL_SUBTEST( check_custom_new_delete<Vector2f>() );
CALL_SUBTEST( check_custom_new_delete<Matrix4f>() );
@@ -144,6 +137,16 @@ void test_dynalloc()
// check static allocation, who knows ?
#if EIGEN_MAX_STATIC_ALIGN_BYTES
+ for (int i=0; i<g_repeat*100; ++i)
+ {
+ CALL_SUBTEST(check_dynaligned<Vector4f>() );
+ CALL_SUBTEST(check_dynaligned<Vector2d>() );
+ CALL_SUBTEST(check_dynaligned<Matrix4f>() );
+ CALL_SUBTEST(check_dynaligned<Vector4d>() );
+ CALL_SUBTEST(check_dynaligned<Vector4i>() );
+ CALL_SUBTEST(check_dynaligned<Vector8f>() );
+ }
+
{
MyStruct foo0; VERIFY(size_t(foo0.avec.data())%ALIGNMENT==0);
MyClassA fooA; VERIFY(size_t(fooA.avec.data())%ALIGNMENT==0);