aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/packetmath.cpp
diff options
context:
space:
mode:
authorGravatar Ilya Tokar <tokarip@google.com>2019-12-16 16:00:35 -0500
committerGravatar Ilya Tokar <tokarip@google.com>2020-01-07 21:22:44 +0000
commit19876ced76bd1730008e02fc4c43c2228faed38a (patch)
tree22f999134e79f84f6f9dc0d19bdfa6740db416f0 /test/packetmath.cpp
parentd0ae052da4ce25a5b4306bfbb5bf8edcd010b663 (diff)
Bug #1785: Introduce numext::rint.
This provides a new op that matches std::rint and previous behavior of pround. Also adds corresponding unsupported/../Tensor op. Performance is the same as e. g. floor (tested SSE/AVX).
Diffstat (limited to 'test/packetmath.cpp')
-rw-r--r--test/packetmath.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/packetmath.cpp b/test/packetmath.cpp
index 9564bc283..ba250443a 100644
--- a/test/packetmath.cpp
+++ b/test/packetmath.cpp
@@ -518,6 +518,7 @@ template<typename Scalar,typename Packet> void packetmath_real()
CHECK_CWISE1_IF(PacketTraits::HasRound, numext::round, internal::pround);
CHECK_CWISE1_IF(PacketTraits::HasCeil, numext::ceil, internal::pceil);
CHECK_CWISE1_IF(PacketTraits::HasFloor, numext::floor, internal::pfloor);
+ CHECK_CWISE1_IF(PacketTraits::HasRint, numext::rint, internal::print);
// See bug 1785.
for (int i=0; i<size; ++i)
@@ -526,6 +527,7 @@ template<typename Scalar,typename Packet> void packetmath_real()
data2[i] = -1.5 + i;
}
CHECK_CWISE1_IF(PacketTraits::HasRound, numext::round, internal::pround);
+ CHECK_CWISE1_IF(PacketTraits::HasRint, numext::rint, internal::print);
for (int i=0; i<size; ++i)
{