|
|
|
@ -1,11 +1,11 @@ |
|
|
|
|
#if GLM_ARCH & GLM_ARCH_SSE2_BIT |
|
|
|
|
|
|
|
|
|
namespace glm{ |
|
|
|
|
namespace detail |
|
|
|
|
{ |
|
|
|
|
namespace glm { |
|
|
|
|
namespace detail |
|
|
|
|
{ |
|
|
|
|
# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR |
|
|
|
|
template<qualifier Q, int E0, int E1, int E2, int E3> |
|
|
|
|
struct _swizzle_base1<4, float, Q, E0,E1,E2,E3, true> : public _swizzle_base0<float, 4> |
|
|
|
|
struct _swizzle_base1<4, float, Q, E0, E1, E2, E3, true> : public _swizzle_base0<float, 4> |
|
|
|
|
{ |
|
|
|
|
GLM_FUNC_QUALIFIER vec<4, float, Q> operator ()() const |
|
|
|
|
{ |
|
|
|
@ -22,7 +22,7 @@ namespace detail |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
template<qualifier Q, int E0, int E1, int E2, int E3> |
|
|
|
|
struct _swizzle_base1<4, int, Q, E0,E1,E2,E3, true> : public _swizzle_base0<int, 4> |
|
|
|
|
struct _swizzle_base1<4, int, Q, E0, E1, E2, E3, true> : public _swizzle_base0<int, 4> |
|
|
|
|
{ |
|
|
|
|
GLM_FUNC_QUALIFIER vec<4, int, Q> operator ()() const |
|
|
|
|
{ |
|
|
|
@ -35,7 +35,7 @@ namespace detail |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
template<qualifier Q, int E0, int E1, int E2, int E3> |
|
|
|
|
struct _swizzle_base1<4, uint, Q, E0,E1,E2,E3, true> : public _swizzle_base0<uint, 4> |
|
|
|
|
struct _swizzle_base1<4, uint, Q, E0, E1, E2, E3, true> : public _swizzle_base0<uint, 4> |
|
|
|
|
{ |
|
|
|
|
GLM_FUNC_QUALIFIER vec<4, uint, Q> operator ()() const |
|
|
|
|
{ |
|
|
|
@ -156,7 +156,7 @@ namespace detail |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
template<typename T, qualifier Q> |
|
|
|
|
struct compute_vec4_and<uint, Q, true, 32, true> |
|
|
|
|
struct compute_vec4_and<T, Q, true, 32, true> |
|
|
|
|
{ |
|
|
|
|
static vec<4, T, Q> call(vec<4, T, Q> const& a, vec<4, T, Q> const& b) |
|
|
|
|
{ |
|
|
|
@ -180,7 +180,7 @@ namespace detail |
|
|
|
|
# endif |
|
|
|
|
|
|
|
|
|
template<typename T, qualifier Q> |
|
|
|
|
struct compute_vec4_or<int, Q, true, 32, true> |
|
|
|
|
struct compute_vec4_or<T, Q, true, 32, true> |
|
|
|
|
{ |
|
|
|
|
static vec<4, T, Q> call(vec<4, T, Q> const& a, vec<4, T, Q> const& b) |
|
|
|
|
{ |
|
|
|
@ -191,19 +191,8 @@ namespace detail |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
# if GLM_ARCH & GLM_ARCH_AVX2_BIT |
|
|
|
|
template<qualifier Q> |
|
|
|
|
struct compute_vec4_or<int64, Q, true, 64, true> |
|
|
|
|
{ |
|
|
|
|
GLM_FUNC_QUALIFIER static vec<4, int64, Q> call(vec<4, int64, Q> const& a, vec<4, int64, Q> const& b) |
|
|
|
|
{ |
|
|
|
|
vec<4, int64, Q> Result; |
|
|
|
|
Result.data = _mm256_or_si256(a.data, b.data); |
|
|
|
|
return Result; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
template<typename T, qualifier Q> |
|
|
|
|
struct compute_vec4_or<uint64, Q, true, 64, true> |
|
|
|
|
struct compute_vec4_or<T, Q, true, 64, true> |
|
|
|
|
{ |
|
|
|
|
static vec<4, T, Q> call(vec<4, T, Q> const& a, vec<4, T, Q> const& b) |
|
|
|
|
{ |
|
|
|
@ -215,7 +204,7 @@ namespace detail |
|
|
|
|
# endif |
|
|
|
|
|
|
|
|
|
template<typename T, qualifier Q> |
|
|
|
|
struct compute_vec4_xor<int, Q, true, 32, true> |
|
|
|
|
struct compute_vec4_xor<T, Q, true, 32, true> |
|
|
|
|
{ |
|
|
|
|
static vec<4, T, Q> call(vec<4, T, Q> const& a, vec<4, T, Q> const& b) |
|
|
|
|
{ |
|
|
|
@ -274,17 +263,6 @@ namespace detail |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
# if GLM_ARCH & GLM_ARCH_AVX2_BIT |
|
|
|
|
template<typename T, qualifier Q> |
|
|
|
|
struct compute_vec4_shift_right<int64, Q, true, 64, true> |
|
|
|
|
{ |
|
|
|
|
GLM_FUNC_QUALIFIER static vec<4, int64, Q> call(vec<4, int64, Q> const& a, vec<4, int64, Q> const& b) |
|
|
|
|
{ |
|
|
|
|
vec<4, int64, Q> Result; |
|
|
|
|
Result.data = _mm256_srl_epi64(a.data, b.data); |
|
|
|
|
return Result; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
template<typename T, qualifier Q> |
|
|
|
|
struct compute_vec4_shift_right<T, Q, true, 64, true> |
|
|
|
|
{ |
|
|
|
@ -364,7 +342,7 @@ namespace detail |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
# endif |
|
|
|
|
}//namespace detail |
|
|
|
|
}//namespace detail |
|
|
|
|
|
|
|
|
|
template<> |
|
|
|
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, float, aligned_lowp>::vec(float _s) : |
|
|
|
@ -486,7 +464,7 @@ namespace detail |
|
|
|
|
|
|
|
|
|
#if GLM_ARCH & GLM_ARCH_NEON_BIT |
|
|
|
|
namespace glm { |
|
|
|
|
namespace detail { |
|
|
|
|
namespace detail { |
|
|
|
|
|
|
|
|
|
template<qualifier Q> |
|
|
|
|
struct compute_vec4_add<float, Q, true> |
|
|
|
@ -701,7 +679,7 @@ namespace detail { |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
}//namespace detail |
|
|
|
|
}//namespace detail |
|
|
|
|
|
|
|
|
|
#if !GLM_CONFIG_XYZW_ONLY |
|
|
|
|
template<> |
|
|
|
|