exponential.h 397 B

123456789101112131415161718192021
  1. /// @ref simd
  2. /// @file glm/simd/experimental.h
  3. #pragma once
  4. #include "platform.h"
  5. #if GLM_ARCH & GLM_ARCH_SSE2_BIT
  6. GLM_FUNC_QUALIFIER glm_f32vec4 glm_vec1_sqrt_lowp(glm_f32vec4 x)
  7. {
  8. return _mm_mul_ss(_mm_rsqrt_ss(x), x);
  9. }
  10. GLM_FUNC_QUALIFIER glm_f32vec4 glm_vec4_sqrt_lowp(glm_f32vec4 x)
  11. {
  12. return _mm_mul_ps(_mm_rsqrt_ps(x), x);
  13. }
  14. #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT