aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2011-05-19 21:52:40 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2011-05-19 21:52:40 +0200
commit501bc602ece7b6081e431e0c1b69bcabd217ba08 (patch)
treed8ffd53d173c6f92b43616cde8cb0b95f7278abf /test
parentf2837aebc4179c71145545c5e5988734c7ed30b2 (diff)
fix vectorization_logic when EIGEN_GCC_AND_ARCH_DOESNT_WANT_STACK_ALIGNMENT
Diffstat (limited to 'test')
-rw-r--r--test/vectorization_logic.cpp46
1 files changed, 25 insertions, 21 deletions
diff --git a/test/vectorization_logic.cpp b/test/vectorization_logic.cpp
index b029652cf..a69a3738a 100644
--- a/test/vectorization_logic.cpp
+++ b/test/vectorization_logic.cpp
@@ -123,7 +123,8 @@ template<typename Scalar, bool Enable = internal::packet_traits<Scalar>::Vectori
(PacketSize==8 ? 4 : PacketSize==4 ? 6 : PacketSize==2 ? ((Matrix11::Flags&RowMajorBit)?2:3) : /*PacketSize==1 ?*/ 1),
(PacketSize==8 ? 6 : PacketSize==4 ? 2 : PacketSize==2 ? ((Matrix11::Flags&RowMajorBit)?3:2) : /*PacketSize==1 ?*/ 3)
> Matrix3;
-
+
+ #if !EIGEN_GCC_AND_ARCH_DOESNT_WANT_STACK_ALIGNMENT
VERIFY(test_assign(Vector1(),Vector1(),
InnerVectorizedTraversal,CompleteUnrolling));
VERIFY(test_assign(Vector1(),Vector1()+Vector1(),
@@ -173,10 +174,22 @@ template<typename Scalar, bool Enable = internal::packet_traits<Scalar>::Vectori
VERIFY(test_assign(Matrix11(),Matrix<Scalar,17,17>().template block<PacketSize,PacketSize>(2,3)+Matrix<Scalar,17,17>().template block<PacketSize,PacketSize>(10,4),
DefaultTraversal,CompleteUnrolling));
}
+
+ VERIFY(test_redux(Matrix3(),
+ LinearVectorizedTraversal,CompleteUnrolling));
- VERIFY(test_assign(MatrixXX(10,10),MatrixXX(20,20).block(10,10,2,3),
- SliceVectorizedTraversal,NoUnrolling));
+ VERIFY(test_redux(Matrix44(),
+ LinearVectorizedTraversal,NoUnrolling));
+ VERIFY(test_redux(Matrix44().template block<(Matrix1::Flags&RowMajorBit)?4:PacketSize,(Matrix1::Flags&RowMajorBit)?PacketSize:4>(1,2),
+ DefaultTraversal,CompleteUnrolling));
+
+ VERIFY(test_redux(Matrix44c().template block<2*PacketSize,1>(1,2),
+ LinearVectorizedTraversal,CompleteUnrolling));
+
+ VERIFY(test_redux(Matrix44r().template block<1,2*PacketSize>(2,1),
+ LinearVectorizedTraversal,CompleteUnrolling));
+
VERIFY((test_assign<
Map<Matrix22, Aligned, OuterStride<3*PacketSize> >,
Matrix22
@@ -188,24 +201,15 @@ template<typename Scalar, bool Enable = internal::packet_traits<Scalar>::Vectori
>(DefaultTraversal,CompleteUnrolling)));
VERIFY((test_assign(Matrix11(), Matrix11()*Matrix11(), InnerVectorizedTraversal, CompleteUnrolling)));
+ #endif
- VERIFY(test_redux(VectorX(10),
- LinearVectorizedTraversal,NoUnrolling));
-
- VERIFY(test_redux(Matrix3(),
- LinearVectorizedTraversal,CompleteUnrolling));
+ VERIFY(test_assign(MatrixXX(10,10),MatrixXX(20,20).block(10,10,2,3),
+ SliceVectorizedTraversal,NoUnrolling));
- VERIFY(test_redux(Matrix44(),
+ VERIFY(test_redux(VectorX(10),
LinearVectorizedTraversal,NoUnrolling));
- VERIFY(test_redux(Matrix44().template block<(Matrix1::Flags&RowMajorBit)?4:PacketSize,(Matrix1::Flags&RowMajorBit)?PacketSize:4>(1,2),
- DefaultTraversal,CompleteUnrolling));
-
- VERIFY(test_redux(Matrix44c().template block<2*PacketSize,1>(1,2),
- LinearVectorizedTraversal,CompleteUnrolling));
-
- VERIFY(test_redux(Matrix44r().template block<1,2*PacketSize>(2,1),
- LinearVectorizedTraversal,CompleteUnrolling));
+
}
};
@@ -219,10 +223,10 @@ void test_vectorization_logic()
#ifdef EIGEN_VECTORIZE
- vectorization_logic<float>::run();
- vectorization_logic<double>::run();
- vectorization_logic<std::complex<float> >::run();
- vectorization_logic<std::complex<double> >::run();
+ CALL_SUBTEST( vectorization_logic<float>::run() );
+ CALL_SUBTEST( vectorization_logic<double>::run() );
+ CALL_SUBTEST( vectorization_logic<std::complex<float> >::run() );
+ CALL_SUBTEST( vectorization_logic<std::complex<double> >::run() );
if(internal::packet_traits<float>::Vectorizable)
{