aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jakub Lichman <jlichman@tachyum.com>2021-05-21 14:12:25 +0000
committerGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2021-05-21 16:42:19 +0000
commit12471fcb5d59f969c60a9b78727624dc91e5c04e (patch)
treebf92fab8157c5e3ba72d524e411cb5f9e9d2a96c
parent17200570239f23b2f0d3b434bc0269c46c409791 (diff)
predux_half_dowto4 test extended to all applicable packets
-rw-r--r--test/packetmath.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/packetmath.cpp b/test/packetmath.cpp
index 18357df5e..c81ca63c4 100644
--- a/test/packetmath.cpp
+++ b/test/packetmath.cpp
@@ -518,9 +518,7 @@ void packetmath() {
for (int i = 0; i < PacketSize; ++i) ref[0] += data1[i];
VERIFY(test::isApproxAbs(ref[0], internal::predux(internal::pload<Packet>(data1)), refvalue) && "internal::predux");
- if (PacketSize == 8 && internal::unpacket_traits<typename internal::unpacket_traits<Packet>::half>::size ==
- 4) // so far, predux_half_downto4 is only required in such a case
- {
+ if (!internal::is_same<Packet, typename internal::unpacket_traits<Packet>::half>::value) {
int HalfPacketSize = PacketSize > 4 ? PacketSize / 2 : PacketSize;
for (int i = 0; i < HalfPacketSize; ++i) ref[i] = Scalar(0);
for (int i = 0; i < PacketSize; ++i) ref[i % HalfPacketSize] += data1[i];