func_exponential_simd.inl 813 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /// @ref core
  2. /// @file glm/detail/func_exponential_simd.inl
  3. #include "../simd/exponential.h"
  4. #if GLM_ARCH & GLM_ARCH_SSE2_BIT
  5. namespace glm{
  6. namespace detail
  7. {
  8. template<qualifier Q>
  9. struct compute_sqrt<4, float, Q, true>
  10. {
  11. GLM_FUNC_QUALIFIER static vec<4, float, Q> call(vec<4, float, Q> const& v)
  12. {
  13. vec<4, float, Q> Result;
  14. Result.data = _mm_sqrt_ps(v.data);
  15. return Result;
  16. }
  17. };
  18. # if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
  19. template<>
  20. struct compute_sqrt<4, float, aligned_lowp, true>
  21. {
  22. GLM_FUNC_QUALIFIER static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const& v)
  23. {
  24. vec<4, float, aligned_lowp> Result;
  25. Result.data = glm_vec4_sqrt_lowp(v.data);
  26. return Result;
  27. }
  28. };
  29. # endif
  30. }//namespace detail
  31. }//namespace glm
  32. #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT