diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2020-06-04 16:24:47 -0700 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2020-06-04 16:24:47 -0700 |
commit | c2ab36f47a34e572f37e3dd556ac8a04ab769277 (patch) | |
tree | b5cf8674e9375b6b9b98c2e5e90c96640421e672 /test/packetmath.cpp | |
parent | 537e2b322f8122126aee83c92c95ba8ab9061970 (diff) |
Fix broken packetmath test for logistic on Arm.
Diffstat (limited to 'test/packetmath.cpp')
-rw-r--r-- | test/packetmath.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/packetmath.cpp b/test/packetmath.cpp index 032c0e4c8..540cf6a86 100644 --- a/test/packetmath.cpp +++ b/test/packetmath.cpp @@ -447,18 +447,20 @@ template<typename Scalar,typename Packet> void packetmath_real() VERIFY((numext::isnan)(data2[0])); } - { + if (PacketTraits::HasExp) { internal::scalar_logistic_op<Scalar> logistic; for (int i=0; i<size; ++i) { data1[i] = internal::random<Scalar>(-20,20); } - internal::pstore(data2, logistic.packetOp(internal::pload<Packet>(data1))); + + test::packet_helper<PacketTraits::HasExp,Packet> h; + h.store(data2, logistic.packetOp(h.load(data1))); for (int i=0; i<PacketSize; ++i) { VERIFY_IS_APPROX(data2[i],logistic(data1[i])); - #ifdef EIGEN_VECTORIZE // don't check for exactness when using the i387 FPU +#ifdef EIGEN_VECTORIZE // don't check for exactness when using the i387 FPU VERIFY_IS_EQUAL(data2[i],logistic(data1[i])); - #endif +#endif } } |