From 20d030f207a8f92d75e8e4aca9d515b9939aa58a Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 31 Mar 2015 20:16:02 +0200 Subject: Fix vectorization of swap for non trivial expressions --- test/swap.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/swap.cpp') diff --git a/test/swap.cpp b/test/swap.cpp index dc3610085..5d6f0e6af 100644 --- a/test/swap.cpp +++ b/test/swap.cpp @@ -82,8 +82,10 @@ template void swap(const MatrixType& m) void test_swap() { + int s = internal::random(1,EIGEN_TEST_MAX_SIZE); CALL_SUBTEST_1( swap(Matrix3f()) ); // fixed size, no vectorization CALL_SUBTEST_2( swap(Matrix4d()) ); // fixed size, possible vectorization - CALL_SUBTEST_3( swap(MatrixXd(3,3)) ); // dyn size, no vectorization - CALL_SUBTEST_4( swap(MatrixXf(30,30)) ); // dyn size, possible vectorization + CALL_SUBTEST_3( swap(MatrixXd(s,s)) ); // dyn size, no vectorization + CALL_SUBTEST_4( swap(MatrixXf(s,s)) ); // dyn size, possible vectorization + TEST_SET_BUT_UNUSED_VARIABLE(s) } -- cgit v1.2.3