diff options
author | Antonio Sanchez <cantonios@google.com> | 2021-02-26 13:59:46 -0800 |
---|---|---|
committer | Antonio Sanchez <cantonios@google.com> | 2021-02-26 14:08:40 -0800 |
commit | 29ebd84cb779eae01302a9f1e40cf06ca5eeeceb (patch) | |
tree | b5f4e4991a36f234b68be6d7c2b00d62d060f8e3 /Eigen/src/Core/GenericPacketMath.h | |
parent | fe19714f8094a2b6d6dab0cdd3c32874d0ad66b9 (diff) |
Fix NEON sqrt for 32-bit, add prsqrt.
With !406, we accidentally broke arm 32-bit NEON builds, since
`vsqrt_f32` is only available for 64-bit.
Here we add back the `rsqrt` implementation for 32-bit, relying
on a `prsqrt` implementation with better handling of edge cases.
Note that several of the 32-bit NEON packet tests are currently
failing - either due to denormal handling (NEON versions flush
to zero, but scalar paths don't) or due to accuracy (e.g. sin/cos).
Diffstat (limited to 'Eigen/src/Core/GenericPacketMath.h')
-rw-r--r-- | Eigen/src/Core/GenericPacketMath.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/Core/GenericPacketMath.h b/Eigen/src/Core/GenericPacketMath.h index f8c7826db..bc0fe39a7 100644 --- a/Eigen/src/Core/GenericPacketMath.h +++ b/Eigen/src/Core/GenericPacketMath.h @@ -684,7 +684,7 @@ Packet plog2(const Packet& a) { /** \internal \returns the square-root of \a a (coeff-wise) */ template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS -Packet psqrt(const Packet& a) { EIGEN_USING_STD(sqrt); return sqrt(a); } +Packet psqrt(const Packet& a) { return numext::sqrt(a); } /** \internal \returns the reciprocal square-root of \a a (coeff-wise) */ template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS |