aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Antonio Sanchez <cantonios@google.com>2021-02-25 20:39:56 -0800
committerGravatar Antonio Sanchez <cantonios@google.com>2021-02-25 20:39:56 -0800
commite19829c3b0802c01c942fe9d095688f8ce2dcc7b (patch)
tree35b2298f0800a573a156b20cbfcb480943583e24 /test
parent5529db7524b93208f3d97f5fadc53aff1de70190 (diff)
Fix floor/ceil for NEON fp16.
Forgot to test this. Fixes bug introduced in !416.
Diffstat (limited to 'test')
-rw-r--r--test/packetmath.cpp4
1 files changed, 3 insertions, 1 deletions
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<Scalar>::type IntType;
// Start with values that cannot fit inside an integer, work down to less than one.
- Scalar val = Scalar(2) * static_cast<Scalar>(NumTraits<IntType>::highest());
+ Scalar val = numext::mini(
+ Scalar(2) * static_cast<Scalar>(NumTraits<IntType>::highest()),
+ NumTraits<Scalar>::highest());
std::vector<Scalar> values;
while (val > Scalar(0.25)) {
// Cover both even and odd, positive and negative cases.