From 4e4d3f32d168ed9ce09d950f099a60ddcd11240f Mon Sep 17 00:00:00 2001 From: Rasmus Munk Larsen Date: Fri, 9 Oct 2020 20:05:49 +0000 Subject: Clean up packetmath tests and fix various bugs to make bfloat16 pass (almost) all packetmath tests with SSE, AVX, and AVX512. --- test/packetmath_test_shared.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/packetmath_test_shared.h') diff --git a/test/packetmath_test_shared.h b/test/packetmath_test_shared.h index 7b8caedcb..f8dc3711c 100644 --- a/test/packetmath_test_shared.h +++ b/test/packetmath_test_shared.h @@ -156,7 +156,7 @@ struct packet_helper #define CHECK_CWISE1_IF(COND, REFOP, POP) if(COND) { \ test::packet_helper h; \ for (int i=0; i #define CHECK_CWISE2_IF(COND, REFOP, POP) if(COND) { \ test::packet_helper h; \ for (int i=0; i #define CHECK_CWISE3_IF(COND, REFOP, POP) if (COND) { \ test::packet_helper h; \ for (int i = 0; i < PacketSize; ++i) \ - ref[i] = \ - REFOP(data1[i], data1[i + PacketSize], data1[i + 2 * PacketSize]); \ + ref[i] = Scalar(REFOP(data1[i], data1[i + PacketSize], \ + data1[i + 2 * PacketSize])); \ h.store(data2, POP(h.load(data1), h.load(data1 + PacketSize), \ h.load(data1 + 2 * PacketSize))); \ VERIFY(test::areApprox(ref, data2, PacketSize) && #POP); \ -- cgit v1.2.3