Fix broken packetmath test for logistic on Arm.

This commit is contained in:
Rasmus Munk Larsen
2020-06-04 16:24:47 -07:00
parent 537e2b322f
commit c2ab36f47a
2 changed files with 8 additions and 5 deletions

View File

@@ -524,7 +524,8 @@ template<typename Packet> EIGEN_DEVICE_FUNC inline bool predux_any(const Packet&
// - bits full of ones (NaN for floats),
// - or first bit equals to 1 (1 for ints, smallest denormal for floats).
// For all these cases, taking the sum is just fine, and this boils down to a no-op for scalars.
return bool(numext::not_equal_strict(predux(a), pzero(a)));
typedef typename unpacket_traits<Packet>::type Scalar;
return numext::not_equal_strict(predux(a), Scalar(0));
}
/** \internal \returns the reversed elements of \a a*/