diff options
author | Gael Guennebaud <g.gael@free.fr> | 2015-03-31 20:16:02 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2015-03-31 20:16:02 +0200 |
commit | 20d030f207a8f92d75e8e4aca9d515b9939aa58a (patch) | |
tree | dd25a1fcb1b5820814f0a788f80da2682a360270 /test/swap.cpp | |
parent | 678207e02a35e32f2098fcb2cb8a510c9ee191e1 (diff) |
Fix vectorization of swap for non trivial expressions
Diffstat (limited to 'test/swap.cpp')
-rw-r--r-- | test/swap.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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<typename MatrixType> void swap(const MatrixType& m) void test_swap() { + int s = internal::random<int>(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) } |