Do not check NeedsToAlign if no static alignment

This commit is contained in:
Gael Guennebaud 2015-11-30 22:36:35 +01:00
parent e8559eaed6
commit 0d807dce07

View File

@ -95,6 +95,8 @@ void test_dynalloc()
CALL_SUBTEST(check_aligned_new());
CALL_SUBTEST(check_aligned_stack_alloc());
// check static allocation, who knows ?
#if EIGEN_ALIGN_STATICALLY
for (int i=0; i<g_repeat*100; ++i)
{
CALL_SUBTEST(check_dynaligned<Vector4f>() );
@ -104,8 +106,6 @@ void test_dynalloc()
CALL_SUBTEST(check_dynaligned<Vector4i>() );
}
// check static allocation, who knows ?
#if EIGEN_ALIGN_STATICALLY
{
MyStruct foo0; VERIFY(size_t(foo0.avec.data())%ALIGNMENT==0);
MyClassA fooA; VERIFY(size_t(fooA.avec.data())%ALIGNMENT==0);