Completed SQRT SIMD implementations

master
Christophe Riccio ago%!(EXTRA string=14 years)
parent c07a33334b
commit a53acffaf4
  1. 7
      glm/gtx/simd_vec4.hpp
  2. 7
      glm/gtx/simd_vec4.inl

@ -407,7 +407,12 @@ namespace glm
detail::fvec4SIMD simdSqrt(
detail::fvec4SIMD const & x);
//! Returns the positive square root of x with an accuracy slight lower or equal than simdSqrt but much faster.
//! Returns the positive square root of x with the nicest quality but very slow
//! (From GLM_GTX_simd_vec4 extension, exponential function)
detail::fvec4SIMD simdNiceSqrt(
detail::fvec4SIMD const & x);
//! Returns the positive square root of x but less accurate than simdSqrt but much faster.
//! (From GLM_GTX_simd_vec4 extension, exponential function)
detail::fvec4SIMD simdFastSqrt(
detail::fvec4SIMD const & x);

@ -635,13 +635,18 @@ namespace glm
}
inline detail::fvec4SIMD simdSqrt(detail::fvec4SIMD const & x)
{
return _mm_mul_ps(simdInversesqrt(x.Data), x.Data);
}
inline detail::fvec4SIMD simdNiceSqrt(detail::fvec4SIMD const & x)
{
return _mm_sqrt_ps(x.Data);
}
inline detail::fvec4SIMD simdFastSqrt(detail::fvec4SIMD const & x)
{
return _mm_mul_ps(simdFastInversesqrt(x.Data), x.Data);
}
// SSE scalar reciprocal sqrt using rsqrt op, plus one Newton-Rhaphson iteration

Loading…
Cancel
Save