mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 10:14:35 +00:00
Completed SQRT SIMD implementations
This commit is contained in:
parent
c07a33334b
commit
a53acffaf4
@ -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…
Reference in New Issue
Block a user