mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-23 10:09:36 +08:00
Improved the default implementation of prsqrt
This commit is contained in:
parent
61409d9449
commit
fb53384b0f
@ -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));
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
|
Loading…
x
Reference in New Issue
Block a user