From e19829c3b0802c01c942fe9d095688f8ce2dcc7b Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Thu, 25 Feb 2021 20:39:56 -0800 Subject: Fix floor/ceil for NEON fp16. Forgot to test this. Fixes bug introduced in !416. --- test/packetmath.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/packetmath.cpp b/test/packetmath.cpp index f355af491..ae7168fc8 100644 --- a/test/packetmath.cpp +++ b/test/packetmath.cpp @@ -551,7 +551,9 @@ void packetmath_real() { if (PacketTraits::HasRound || PacketTraits::HasCeil || PacketTraits::HasFloor || PacketTraits::HasRint) { typedef typename internal::make_integer::type IntType; // Start with values that cannot fit inside an integer, work down to less than one. - Scalar val = Scalar(2) * static_cast(NumTraits::highest()); + Scalar val = numext::mini( + Scalar(2) * static_cast(NumTraits::highest()), + NumTraits::highest()); std::vector values; while (val > Scalar(0.25)) { // Cover both even and odd, positive and negative cases. -- cgit v1.2.3