mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-19 16:19:37 +08:00
predux_half_dowto4 test extended to all applicable packets
This commit is contained in:
parent
1720057023
commit
12471fcb5d
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user