diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-02-28 01:51:26 -0800 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-02-28 01:51:26 -0800 |
commit | fb53384b0f8e3d2ef6e7ec9a4e51c27142ef880c (patch) | |
tree | ed34f79a8e9f5495036aeec0eb5a0756018a41c8 | |
parent | 61409d9449b02d619ae251681a2f5d3b237d9164 (diff) |
Improved the default implementation of prsqrt
-rw-r--r-- | Eigen/src/Core/GenericPacketMath.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Eigen/src/Core/GenericPacketMath.h b/Eigen/src/Core/GenericPacketMath.h index 722881215..77941c059 100644 --- a/Eigen/src/Core/GenericPacketMath.h +++ b/Eigen/src/Core/GenericPacketMath.h @@ -378,9 +378,7 @@ Packet psqrt(const Packet& a) { using std::sqrt; return sqrt(a); } /** \internal \returns the reciprocal square-root of \a a (coeff-wise) */ template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet prsqrt(const Packet& a) { - using std::sqrt; - const Packet one(1); - return one/sqrt(a); + return pdiv(pset1<Packet>(1), psqrt(a)); } /*************************************************************************** |