func_exponential_simd.inl 758 B

1234567891011121314151617181920212223242526272829303132333435
  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, P, true>
  10. {
  11. GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, Q> const& v)
  12. {
  13. vec<4, float, P> Result;
  14. Result.data = _mm_sqrt_ps(v.data);
  15. return Result;
  16. }
  17. };
  18. template<>
  19. struct compute_sqrt<4, float, aligned_lowp, true>
  20. {
  21. GLM_FUNC_QUALIFIER static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const& v)
  22. {
  23. vec<4, float, aligned_lowp> Result;
  24. Result.data = glm_vec4_sqrt_lowp(v.data);
  25. return Result;
  26. }
  27. };
  28. }//namespace detail
  29. }//namespace glm
  30. #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT