From 45a4aad572605f7db3348b1089801e0b8ea7cfd8 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 17 Apr 2014 16:27:22 +0200 Subject: [PATCH] add unit tests for ploadquad and predux4, and split packetmath unit test wrt real/complex --- test/packetmath.cpp | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/test/packetmath.cpp b/test/packetmath.cpp index 08566faf8..9ee2cad21 100644 --- a/test/packetmath.cpp +++ b/test/packetmath.cpp @@ -183,11 +183,30 @@ template void packetmath() VERIFY(areApprox(ref, data2, PacketSize) && "ploaddup"); } } + if(PacketSize>2) + { + for(int offset=0;offset<4;++offset) + { + for(int i=0;i(data1+offset)); + VERIFY(areApprox(ref, data2, PacketSize) && "ploadquad"); + } + } ref[0] = 0; for (int i=0; i(data1)), refvalue) && "internal::predux"); + + { + for (int i=0; i<4; ++i) + ref[i] = 0; + for (int i=0; i(data1))); + VERIFY(areApprox(ref, data2, PacketSize>4?PacketSize/2:PacketSize) && "internal::predux4"); + } ref[0] = 1; for (int i=0; i() ); CALL_SUBTEST_2( packetmath() ); CALL_SUBTEST_3( packetmath() ); - CALL_SUBTEST_1( packetmath >() ); - CALL_SUBTEST_2( packetmath >() ); + CALL_SUBTEST_4( packetmath >() ); + CALL_SUBTEST_5( packetmath >() ); CALL_SUBTEST_1( packetmath_notcomplex() ); CALL_SUBTEST_2( packetmath_notcomplex() ); @@ -406,13 +425,13 @@ void test_packetmath() CALL_SUBTEST_1( packetmath_real() ); CALL_SUBTEST_2( packetmath_real() ); - CALL_SUBTEST_1( packetmath_complex >() ); - CALL_SUBTEST_2( packetmath_complex >() ); + CALL_SUBTEST_4( packetmath_complex >() ); + CALL_SUBTEST_5( packetmath_complex >() ); CALL_SUBTEST_1( packetmath_scatter_gather() ); CALL_SUBTEST_2( packetmath_scatter_gather() ); CALL_SUBTEST_3( packetmath_scatter_gather() ); - CALL_SUBTEST_3( packetmath_scatter_gather >() ); - CALL_SUBTEST_3( packetmath_scatter_gather >() ); + CALL_SUBTEST_4( packetmath_scatter_gather >() ); + CALL_SUBTEST_5( packetmath_scatter_gather >() ); } }