All the vec4 geometry functions have SIMD optimizations

master
Christophe Riccio ago%!(EXTRA string=9 years)
parent b5521ca7c2
commit 449c7ccedf
  1. 18
      glm/detail/func_geometric_simd.inl

@ -5,6 +5,24 @@
namespace glm{
namespace detail
{
template <precision P>
struct compute_length<tvec4, float, P>
{
GLM_FUNC_QUALIFIER static float call(tvec4<float, P> const & v)
{
return _mm_cvtss_f32(glm_f32v4_len(v.data));
}
};
template <precision P>
struct compute_distance<tvec4, float, P>
{
GLM_FUNC_QUALIFIER static float call(tvec4<float, P> const & p0, tvec4<float, P> const & p1)
{
return _mm_cvtss_f32(glm_f32v4_dst(p0.data, p1.data));
}
};
template <precision P>
struct compute_dot<tvec4, float, P>
{

Loading…
Cancel
Save