diff --git a/glm/detail/type_vec4_simd.inl b/glm/detail/type_vec4_simd.inl index 4a2e497e..c31551f0 100644 --- a/glm/detail/type_vec4_simd.inl +++ b/glm/detail/type_vec4_simd.inl @@ -7,14 +7,14 @@ namespace glm{ namespace detail { # if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED - template - struct _swizzle_base1<4, float, P, E0,E1,E2,E3, true> : public _swizzle_base0 + template + struct _swizzle_base1<4, float, Q, E0,E1,E2,E3, true> : public _swizzle_base0 { - GLM_FUNC_QUALIFIER vec<4, float, P> operator ()() const + GLM_FUNC_QUALIFIER vec<4, float, Q> operator ()() const { __m128 data = *reinterpret_cast<__m128 const*>(&this->_buffer); - vec<4, float, P> Result; + vec<4, float, Q> Result; # if GLM_ARCH & GLM_ARCH_AVX_BIT Result.data = _mm_permute_ps(data, _MM_SHUFFLE(E3, E2, E1, E0)); # else @@ -24,27 +24,27 @@ namespace detail } }; - template - struct _swizzle_base1<4, int32, P, E0,E1,E2,E3, true> : public _swizzle_base0 + template + struct _swizzle_base1<4, int32, Q, E0,E1,E2,E3, true> : public _swizzle_base0 { - GLM_FUNC_QUALIFIER vec<4, int32, P> operator ()() const + GLM_FUNC_QUALIFIER vec<4, int32, Q> operator ()() const { __m128i data = *reinterpret_cast<__m128i const*>(&this->_buffer); - vec<4, int32, P> Result; + vec<4, int32, Q> Result; Result.data = _mm_shuffle_epi32(data, _MM_SHUFFLE(E3, E2, E1, E0)); return Result; } }; - template - struct _swizzle_base1<4, uint32, P, E0,E1,E2,E3, true> : public _swizzle_base0 + template + struct _swizzle_base1<4, uint32, Q, E0,E1,E2,E3, true> : public _swizzle_base0 { - GLM_FUNC_QUALIFIER vec<4, uint32, P> operator ()() const + GLM_FUNC_QUALIFIER vec<4, uint32, Q> operator ()() const { __m128i data = *reinterpret_cast<__m128i const*>(&this->_buffer); - vec<4, uint32, P> Result; + vec<4, uint32, Q> Result; Result.data = _mm_shuffle_epi32(data, _MM_SHUFFLE(E3, E2, E1, E0)); return Result; } @@ -52,11 +52,11 @@ namespace detail # endif// GLM_SWIZZLE == GLM_SWIZZLE_ENABLED template - struct compute_vec4_add + struct compute_vec4_add { - static vec<4, float, P> call(vec<4, float, Q> const& a, vec<4, float, Q> const& b) + static vec<4, float, Q> call(vec<4, float, Q> const& a, vec<4, float, Q> const& b) { - vec<4, float, P> Result; + vec<4, float, Q> Result; Result.data = _mm_add_ps(a.data, b.data); return Result; } @@ -64,11 +64,11 @@ namespace detail # if GLM_ARCH & GLM_ARCH_AVX_BIT template - struct compute_vec4_add + struct compute_vec4_add { - static vec<4, double, P> call(vec<4, double, Q> const& a, vec<4, double, Q> const& b) + static vec<4, double, Q> call(vec<4, double, Q> const& a, vec<4, double, Q> const& b) { - vec<4, double, P> Result; + vec<4, double, Q> Result; Result.data = _mm256_add_pd(a.data, b.data); return Result; } @@ -76,11 +76,11 @@ namespace detail # endif template - struct compute_vec4_sub + struct compute_vec4_sub { - static vec<4, float, P> call(vec<4, float, Q> const& a, vec<4, float, Q> const& b) + static vec<4, float, Q> call(vec<4, float, Q> const& a, vec<4, float, Q> const& b) { - vec<4, float, P> Result; + vec<4, float, Q> Result; Result.data = _mm_sub_ps(a.data, b.data); return Result; } @@ -88,11 +88,11 @@ namespace detail # if GLM_ARCH & GLM_ARCH_AVX_BIT template - struct compute_vec4_sub + struct compute_vec4_sub { - static vec<4, double, P> call(vec<4, double, Q> const& a, vec<4, double, Q> const& b) + static vec<4, double, Q> call(vec<4, double, Q> const& a, vec<4, double, Q> const& b) { - vec<4, double, P> Result; + vec<4, double, Q> Result; Result.data = _mm256_sub_pd(a.data, b.data); return Result; } @@ -100,11 +100,11 @@ namespace detail # endif template - struct compute_vec4_mul + struct compute_vec4_mul { - static vec<4, float, P> call(vec<4, float, Q> const& a, vec<4, float, Q> const& b) + static vec<4, float, Q> call(vec<4, float, Q> const& a, vec<4, float, Q> const& b) { - vec<4, float, P> Result; + vec<4, float, Q> Result; Result.data = _mm_mul_ps(a.data, b.data); return Result; } @@ -112,11 +112,11 @@ namespace detail # if GLM_ARCH & GLM_ARCH_AVX_BIT template - struct compute_vec4_mul + struct compute_vec4_mul { - static vec<4, double, P> call(vec<4, double, Q> const& a, vec<4, double, Q> const& b) + static vec<4, double, Q> call(vec<4, double, Q> const& a, vec<4, double, Q> const& b) { - vec<4, double, P> Result; + vec<4, double, Q> Result; Result.data = _mm256_mul_pd(a.data, b.data); return Result; } @@ -124,11 +124,11 @@ namespace detail # endif template - struct compute_vec4_div + struct compute_vec4_div { - static vec<4, float, P> call(vec<4, float, Q> const& a, vec<4, float, Q> const& b) + static vec<4, float, Q> call(vec<4, float, Q> const& a, vec<4, float, Q> const& b) { - vec<4, float, P> Result; + vec<4, float, Q> Result; Result.data = _mm_div_ps(a.data, b.data); return Result; } @@ -136,11 +136,11 @@ namespace detail # if GLM_ARCH & GLM_ARCH_AVX_BIT template - struct compute_vec4_div + struct compute_vec4_div { - static vec<4, double, P> call(vec<4, double, Q> const& a, vec<4, double, Q> const& b) + static vec<4, double, Q> call(vec<4, double, Q> const& a, vec<4, double, Q> const& b) { - vec<4, double, P> Result; + vec<4, double, Q> Result; Result.data = _mm256_div_pd(a.data, b.data); return Result; } @@ -303,7 +303,7 @@ namespace detail # endif template - struct compute_vec4_equal + struct compute_vec4_equal { static bool call(vec<4, float, Q> const& v1, vec<4, float, Q> const& v2) { @@ -312,7 +312,7 @@ namespace detail }; template - struct compute_vec4_equal + struct compute_vec4_equal { static bool call(vec<4, int32, Q> const& v1, vec<4, int32, Q> const& v2) { @@ -321,7 +321,7 @@ namespace detail }; template - struct compute_vec4_nequal + struct compute_vec4_nequal { static bool call(vec<4, float, Q> const& v1, vec<4, float, Q> const& v2) { @@ -330,7 +330,7 @@ namespace detail }; template - struct compute_vec4_nequal + struct compute_vec4_nequal { static bool call(vec<4, int32, Q> const& v1, vec<4, int32, Q> const& v2) {