|
|
@@ -20,34 +20,34 @@ namespace glm
|
|
|
//////////////////////////////////////
|
|
|
// Implicit basic constructors
|
|
|
|
|
|
- inline fvec4SIMD::fvec4SIMD()
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD()
|
|
|
{}
|
|
|
|
|
|
- inline fvec4SIMD::fvec4SIMD(__m128 const & Data) :
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(__m128 const & Data) :
|
|
|
Data(Data)
|
|
|
{}
|
|
|
|
|
|
- inline fvec4SIMD::fvec4SIMD(fvec4SIMD const & v) :
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(fvec4SIMD const & v) :
|
|
|
Data(v.Data)
|
|
|
{}
|
|
|
|
|
|
- inline fvec4SIMD::fvec4SIMD(tvec4<float> const & v) :
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(tvec4<float> const & v) :
|
|
|
Data(_mm_set_ps(v.w, v.z, v.y, v.x))
|
|
|
{}
|
|
|
|
|
|
//////////////////////////////////////
|
|
|
// Explicit basic constructors
|
|
|
|
|
|
- inline fvec4SIMD::fvec4SIMD(float const & s) :
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s) :
|
|
|
Data(_mm_set1_ps(s))
|
|
|
{}
|
|
|
|
|
|
- inline fvec4SIMD::fvec4SIMD(float const & x, float const & y, float const & z, float const & w) :
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & x, float const & y, float const & z, float const & w) :
|
|
|
// Data(_mm_setr_ps(x, y, z, w))
|
|
|
Data(_mm_set_ps(w, z, y, x))
|
|
|
{}
|
|
|
/*
|
|
|
- inline fvec4SIMD::fvec4SIMD(float const v[4]) :
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const v[4]) :
|
|
|
Data(_mm_load_ps(v))
|
|
|
{}
|
|
|
*/
|
|
|
@@ -59,98 +59,98 @@ namespace glm
|
|
|
//////////////////////////////////////
|
|
|
// Convertion vector constructors
|
|
|
|
|
|
- inline fvec4SIMD::fvec4SIMD(vec2 const & v, float const & s1, float const & s2) :
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec2 const & v, float const & s1, float const & s2) :
|
|
|
Data(_mm_set_ps(s2, s1, v.y, v.x))
|
|
|
{}
|
|
|
|
|
|
- inline fvec4SIMD::fvec4SIMD(float const & s1, vec2 const & v, float const & s2) :
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s1, vec2 const & v, float const & s2) :
|
|
|
Data(_mm_set_ps(s2, v.y, v.x, s1))
|
|
|
{}
|
|
|
|
|
|
- inline fvec4SIMD::fvec4SIMD(float const & s1, float const & s2, vec2 const & v) :
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s1, float const & s2, vec2 const & v) :
|
|
|
Data(_mm_set_ps(v.y, v.x, s2, s1))
|
|
|
{}
|
|
|
|
|
|
- inline fvec4SIMD::fvec4SIMD(vec3 const & v, float const & s) :
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec3 const & v, float const & s) :
|
|
|
Data(_mm_set_ps(s, v.z, v.y, v.x))
|
|
|
{}
|
|
|
|
|
|
- inline fvec4SIMD::fvec4SIMD(float const & s, vec3 const & v) :
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s, vec3 const & v) :
|
|
|
Data(_mm_set_ps(v.z, v.y, v.x, s))
|
|
|
{}
|
|
|
|
|
|
- inline fvec4SIMD::fvec4SIMD(vec2 const & v1, vec2 const & v2) :
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec2 const & v1, vec2 const & v2) :
|
|
|
Data(_mm_set_ps(v2.y, v2.x, v1.y, v1.x))
|
|
|
{}
|
|
|
|
|
|
- //inline fvec4SIMD::fvec4SIMD(ivec4SIMD const & v) :
|
|
|
+ //GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(ivec4SIMD const & v) :
|
|
|
// Data(_mm_cvtepi32_ps(v.Data))
|
|
|
//{}
|
|
|
|
|
|
//////////////////////////////////////
|
|
|
// Unary arithmetic operators
|
|
|
|
|
|
- inline fvec4SIMD& fvec4SIMD::operator=(fvec4SIMD const & v)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator=(fvec4SIMD const & v)
|
|
|
{
|
|
|
this->Data = v.Data;
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
- inline fvec4SIMD& fvec4SIMD::operator+=(float const & s)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator+=(float const & s)
|
|
|
{
|
|
|
this->Data = _mm_add_ps(Data, _mm_set_ps1(s));
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
- inline fvec4SIMD& fvec4SIMD::operator+=(fvec4SIMD const & v)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator+=(fvec4SIMD const & v)
|
|
|
{
|
|
|
this->Data = _mm_add_ps(this->Data , v.Data);
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
- inline fvec4SIMD& fvec4SIMD::operator-=(float const & s)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator-=(float const & s)
|
|
|
{
|
|
|
this->Data = _mm_sub_ps(Data, _mm_set_ps1(s));
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
- inline fvec4SIMD& fvec4SIMD::operator-=(fvec4SIMD const & v)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator-=(fvec4SIMD const & v)
|
|
|
{
|
|
|
this->Data = _mm_sub_ps(this->Data , v.Data);
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
- inline fvec4SIMD& fvec4SIMD::operator*=(float const & s)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator*=(float const & s)
|
|
|
{
|
|
|
this->Data = _mm_mul_ps(this->Data, _mm_set_ps1(s));
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
- inline fvec4SIMD& fvec4SIMD::operator*=(fvec4SIMD const & v)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator*=(fvec4SIMD const & v)
|
|
|
{
|
|
|
this->Data = _mm_mul_ps(this->Data , v.Data);
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
- inline fvec4SIMD& fvec4SIMD::operator/=(float const & s)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator/=(float const & s)
|
|
|
{
|
|
|
this->Data = _mm_div_ps(Data, _mm_set1_ps(s));
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
- inline fvec4SIMD& fvec4SIMD::operator/=(fvec4SIMD const & v)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator/=(fvec4SIMD const & v)
|
|
|
{
|
|
|
this->Data = _mm_div_ps(this->Data , v.Data);
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
- inline fvec4SIMD& fvec4SIMD::operator++()
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator++()
|
|
|
{
|
|
|
this->Data = _mm_add_ps(this->Data , glm::detail::one);
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
- inline fvec4SIMD& fvec4SIMD::operator--()
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator--()
|
|
|
{
|
|
|
this->Data = _mm_sub_ps(this->Data, glm::detail::one);
|
|
|
return *this;
|
|
|
@@ -160,7 +160,7 @@ namespace glm
|
|
|
// Swizzle operators
|
|
|
|
|
|
template <comp X, comp Y, comp Z, comp W>
|
|
|
- inline fvec4SIMD fvec4SIMD::swizzle() const
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD fvec4SIMD::swizzle() const
|
|
|
{
|
|
|
__m128 Data = _mm_shuffle_ps(
|
|
|
this->Data, this->Data,
|
|
|
@@ -169,7 +169,7 @@ namespace glm
|
|
|
}
|
|
|
|
|
|
template <comp X, comp Y, comp Z, comp W>
|
|
|
- inline fvec4SIMD& fvec4SIMD::swizzle()
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::swizzle()
|
|
|
{
|
|
|
this->Data = _mm_shuffle_ps(
|
|
|
this->Data, this->Data,
|
|
|
@@ -178,89 +178,89 @@ namespace glm
|
|
|
}
|
|
|
|
|
|
// operator+
|
|
|
- inline fvec4SIMD operator+ (fvec4SIMD const & v, float s)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD operator+ (fvec4SIMD const & v, float s)
|
|
|
{
|
|
|
return fvec4SIMD(_mm_add_ps(v.Data, _mm_set1_ps(s)));
|
|
|
}
|
|
|
|
|
|
- inline fvec4SIMD operator+ (float s, fvec4SIMD const & v)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD operator+ (float s, fvec4SIMD const & v)
|
|
|
{
|
|
|
return fvec4SIMD(_mm_add_ps(_mm_set1_ps(s), v.Data));
|
|
|
}
|
|
|
|
|
|
- inline fvec4SIMD operator+ (fvec4SIMD const & v1, fvec4SIMD const & v2)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD operator+ (fvec4SIMD const & v1, fvec4SIMD const & v2)
|
|
|
{
|
|
|
return fvec4SIMD(_mm_add_ps(v1.Data, v2.Data));
|
|
|
}
|
|
|
|
|
|
//operator-
|
|
|
- inline fvec4SIMD operator- (fvec4SIMD const & v, float s)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v, float s)
|
|
|
{
|
|
|
return fvec4SIMD(_mm_sub_ps(v.Data, _mm_set1_ps(s)));
|
|
|
}
|
|
|
|
|
|
- inline fvec4SIMD operator- (float s, fvec4SIMD const & v)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD operator- (float s, fvec4SIMD const & v)
|
|
|
{
|
|
|
return fvec4SIMD(_mm_sub_ps(_mm_set1_ps(s), v.Data));
|
|
|
}
|
|
|
|
|
|
- inline fvec4SIMD operator- (fvec4SIMD const & v1, fvec4SIMD const & v2)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v1, fvec4SIMD const & v2)
|
|
|
{
|
|
|
return fvec4SIMD(_mm_sub_ps(v1.Data, v2.Data));
|
|
|
}
|
|
|
|
|
|
//operator*
|
|
|
- inline fvec4SIMD operator* (fvec4SIMD const & v, float s)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v, float s)
|
|
|
{
|
|
|
__m128 par0 = v.Data;
|
|
|
__m128 par1 = _mm_set1_ps(s);
|
|
|
return fvec4SIMD(_mm_mul_ps(par0, par1));
|
|
|
}
|
|
|
|
|
|
- inline fvec4SIMD operator* (float s, fvec4SIMD const & v)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD operator* (float s, fvec4SIMD const & v)
|
|
|
{
|
|
|
__m128 par0 = _mm_set1_ps(s);
|
|
|
__m128 par1 = v.Data;
|
|
|
return fvec4SIMD(_mm_mul_ps(par0, par1));
|
|
|
}
|
|
|
|
|
|
- inline fvec4SIMD operator* (fvec4SIMD const & v1, fvec4SIMD const & v2)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v1, fvec4SIMD const & v2)
|
|
|
{
|
|
|
return fvec4SIMD(_mm_mul_ps(v1.Data, v2.Data));
|
|
|
}
|
|
|
|
|
|
//operator/
|
|
|
- inline fvec4SIMD operator/ (fvec4SIMD const & v, float s)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD operator/ (fvec4SIMD const & v, float s)
|
|
|
{
|
|
|
__m128 par0 = v.Data;
|
|
|
__m128 par1 = _mm_set1_ps(s);
|
|
|
return fvec4SIMD(_mm_div_ps(par0, par1));
|
|
|
}
|
|
|
|
|
|
- inline fvec4SIMD operator/ (float s, fvec4SIMD const & v)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD operator/ (float s, fvec4SIMD const & v)
|
|
|
{
|
|
|
__m128 par0 = _mm_set1_ps(s);
|
|
|
__m128 par1 = v.Data;
|
|
|
return fvec4SIMD(_mm_div_ps(par0, par1));
|
|
|
}
|
|
|
|
|
|
- inline fvec4SIMD operator/ (fvec4SIMD const & v1, fvec4SIMD const & v2)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD operator/ (fvec4SIMD const & v1, fvec4SIMD const & v2)
|
|
|
{
|
|
|
return fvec4SIMD(_mm_div_ps(v1.Data, v2.Data));
|
|
|
}
|
|
|
|
|
|
// Unary constant operators
|
|
|
- inline fvec4SIMD operator- (fvec4SIMD const & v)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v)
|
|
|
{
|
|
|
return fvec4SIMD(_mm_sub_ps(_mm_setzero_ps(), v.Data));
|
|
|
}
|
|
|
|
|
|
- inline fvec4SIMD operator++ (fvec4SIMD const & v, int)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD operator++ (fvec4SIMD const & v, int)
|
|
|
{
|
|
|
return fvec4SIMD(_mm_add_ps(v.Data, glm::detail::one));
|
|
|
}
|
|
|
|
|
|
- inline fvec4SIMD operator-- (fvec4SIMD const & v, int)
|
|
|
+ GLM_FUNC_QUALIFIER fvec4SIMD operator-- (fvec4SIMD const & v, int)
|
|
|
{
|
|
|
return fvec4SIMD(_mm_sub_ps(v.Data, glm::detail::one));
|
|
|
}
|
|
|
@@ -270,7 +270,7 @@ namespace glm
|
|
|
namespace gtx{
|
|
|
namespace simd_vec4
|
|
|
{
|
|
|
- inline detail::tvec4<float> vec4_cast
|
|
|
+ GLM_FUNC_QUALIFIER detail::tvec4<float> vec4_cast
|
|
|
(
|
|
|
detail::fvec4SIMD const & x
|
|
|
)
|
|
|
@@ -285,7 +285,7 @@ namespace glm
|
|
|
//{
|
|
|
// return max(-a, a);
|
|
|
//}
|
|
|
- inline detail::fvec4SIMD abs
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD abs
|
|
|
(
|
|
|
detail::fvec4SIMD const & x
|
|
|
)
|
|
|
@@ -293,7 +293,7 @@ namespace glm
|
|
|
return detail::sse_abs_ps(x.Data);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD sign
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD sign
|
|
|
(
|
|
|
detail::fvec4SIMD const & x
|
|
|
)
|
|
|
@@ -301,7 +301,7 @@ namespace glm
|
|
|
return detail::sse_sgn_ps(x.Data);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD floor
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD floor
|
|
|
(
|
|
|
detail::fvec4SIMD const & x
|
|
|
)
|
|
|
@@ -309,7 +309,7 @@ namespace glm
|
|
|
return detail::sse_flr_ps(x.Data);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD trunc
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD trunc
|
|
|
(
|
|
|
detail::fvec4SIMD const & x
|
|
|
)
|
|
|
@@ -327,7 +327,7 @@ namespace glm
|
|
|
return _mm_or_ps(And0, And1);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD round
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD round
|
|
|
(
|
|
|
detail::fvec4SIMD const & x
|
|
|
)
|
|
|
@@ -335,7 +335,7 @@ namespace glm
|
|
|
return detail::sse_rnd_ps(x.Data);
|
|
|
}
|
|
|
|
|
|
- //inline detail::fvec4SIMD roundEven
|
|
|
+ //GLM_FUNC_QUALIFIER detail::fvec4SIMD roundEven
|
|
|
//(
|
|
|
// detail::fvec4SIMD const & x
|
|
|
//)
|
|
|
@@ -343,7 +343,7 @@ namespace glm
|
|
|
|
|
|
//}
|
|
|
|
|
|
- inline detail::fvec4SIMD ceil
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD ceil
|
|
|
(
|
|
|
detail::fvec4SIMD const & x
|
|
|
)
|
|
|
@@ -351,7 +351,7 @@ namespace glm
|
|
|
return detail::sse_ceil_ps(x.Data);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD fract
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD fract
|
|
|
(
|
|
|
detail::fvec4SIMD const & x
|
|
|
)
|
|
|
@@ -359,7 +359,7 @@ namespace glm
|
|
|
return detail::sse_frc_ps(x.Data);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD mod
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD mod
|
|
|
(
|
|
|
detail::fvec4SIMD const & x,
|
|
|
detail::fvec4SIMD const & y
|
|
|
@@ -368,7 +368,7 @@ namespace glm
|
|
|
return detail::sse_mod_ps(x.Data, y.Data);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD mod
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD mod
|
|
|
(
|
|
|
detail::fvec4SIMD const & x,
|
|
|
float const & y
|
|
|
@@ -377,7 +377,7 @@ namespace glm
|
|
|
return detail::sse_mod_ps(x.Data, _mm_set1_ps(y));
|
|
|
}
|
|
|
|
|
|
- //inline detail::fvec4SIMD modf
|
|
|
+ //GLM_FUNC_QUALIFIER detail::fvec4SIMD modf
|
|
|
//(
|
|
|
// detail::fvec4SIMD const & x,
|
|
|
// detail::fvec4SIMD & i
|
|
|
@@ -386,7 +386,7 @@ namespace glm
|
|
|
|
|
|
//}
|
|
|
|
|
|
- inline detail::fvec4SIMD min
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD min
|
|
|
(
|
|
|
detail::fvec4SIMD const & x,
|
|
|
detail::fvec4SIMD const & y
|
|
|
@@ -395,7 +395,7 @@ namespace glm
|
|
|
return _mm_min_ps(x.Data, y.Data);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD min
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD min
|
|
|
(
|
|
|
detail::fvec4SIMD const & x,
|
|
|
float const & y
|
|
|
@@ -404,7 +404,7 @@ namespace glm
|
|
|
return _mm_min_ps(x.Data, _mm_set1_ps(y));
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD max
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD max
|
|
|
(
|
|
|
detail::fvec4SIMD const & x,
|
|
|
detail::fvec4SIMD const & y
|
|
|
@@ -413,7 +413,7 @@ namespace glm
|
|
|
return _mm_max_ps(x.Data, y.Data);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD max
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD max
|
|
|
(
|
|
|
detail::fvec4SIMD const & x,
|
|
|
float const & y
|
|
|
@@ -422,7 +422,7 @@ namespace glm
|
|
|
return _mm_max_ps(x.Data, _mm_set1_ps(y));
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD clamp
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD clamp
|
|
|
(
|
|
|
detail::fvec4SIMD const & x,
|
|
|
detail::fvec4SIMD const & minVal,
|
|
|
@@ -432,7 +432,7 @@ namespace glm
|
|
|
return detail::sse_clp_ps(x.Data, minVal.Data, maxVal.Data);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD clamp
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD clamp
|
|
|
(
|
|
|
detail::fvec4SIMD const & x,
|
|
|
float const & minVal,
|
|
|
@@ -442,7 +442,7 @@ namespace glm
|
|
|
return detail::sse_clp_ps(x.Data, _mm_set1_ps(minVal), _mm_set1_ps(maxVal));
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD mix
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD mix
|
|
|
(
|
|
|
detail::fvec4SIMD const & x,
|
|
|
detail::fvec4SIMD const & y,
|
|
|
@@ -454,7 +454,7 @@ namespace glm
|
|
|
return _mm_mul_ps(x.Data, Mul0);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD step
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD step
|
|
|
(
|
|
|
detail::fvec4SIMD const & edge,
|
|
|
detail::fvec4SIMD const & x
|
|
|
@@ -464,7 +464,7 @@ namespace glm
|
|
|
return _mm_max_ps(_mm_min_ps(cmp0, _mm_setzero_ps()), detail::one);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD step
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD step
|
|
|
(
|
|
|
float const & edge,
|
|
|
detail::fvec4SIMD const & x
|
|
|
@@ -474,7 +474,7 @@ namespace glm
|
|
|
return _mm_max_ps(_mm_min_ps(cmp0, _mm_setzero_ps()), detail::one);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD smoothstep
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD smoothstep
|
|
|
(
|
|
|
detail::fvec4SIMD const & edge0,
|
|
|
detail::fvec4SIMD const & edge1,
|
|
|
@@ -484,7 +484,7 @@ namespace glm
|
|
|
return detail::sse_ssp_ps(edge0.Data, edge1.Data, x.Data);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD smoothstep
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD smoothstep
|
|
|
(
|
|
|
float const & edge0,
|
|
|
float const & edge1,
|
|
|
@@ -494,17 +494,17 @@ namespace glm
|
|
|
return detail::sse_ssp_ps(_mm_set1_ps(edge0), _mm_set1_ps(edge1), x.Data);
|
|
|
}
|
|
|
|
|
|
- //inline bvec4 isnan(detail::fvec4SIMD const & x)
|
|
|
+ //GLM_FUNC_QUALIFIER bvec4 isnan(detail::fvec4SIMD const & x)
|
|
|
//{
|
|
|
|
|
|
//}
|
|
|
|
|
|
- //inline bvec4 isinf(detail::fvec4SIMD const & x)
|
|
|
+ //GLM_FUNC_QUALIFIER bvec4 isinf(detail::fvec4SIMD const & x)
|
|
|
//{
|
|
|
|
|
|
//}
|
|
|
|
|
|
- //inline detail::ivec4SIMD floatBitsToInt
|
|
|
+ //GLM_FUNC_QUALIFIER detail::ivec4SIMD floatBitsToInt
|
|
|
//(
|
|
|
// detail::fvec4SIMD const & value
|
|
|
//)
|
|
|
@@ -512,7 +512,7 @@ namespace glm
|
|
|
|
|
|
//}
|
|
|
|
|
|
- //inline detail::fvec4SIMD intBitsToFloat
|
|
|
+ //GLM_FUNC_QUALIFIER detail::fvec4SIMD intBitsToFloat
|
|
|
//(
|
|
|
// detail::ivec4SIMD const & value
|
|
|
//)
|
|
|
@@ -520,7 +520,7 @@ namespace glm
|
|
|
|
|
|
//}
|
|
|
|
|
|
- inline detail::fvec4SIMD fma
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD fma
|
|
|
(
|
|
|
detail::fvec4SIMD const & a,
|
|
|
detail::fvec4SIMD const & b,
|
|
|
@@ -530,7 +530,7 @@ namespace glm
|
|
|
return _mm_add_ps(_mm_mul_ps(a.Data, b.Data), c.Data);
|
|
|
}
|
|
|
|
|
|
- inline float length
|
|
|
+ GLM_FUNC_QUALIFIER float length
|
|
|
(
|
|
|
detail::fvec4SIMD const & x
|
|
|
)
|
|
|
@@ -542,7 +542,7 @@ namespace glm
|
|
|
return Result;
|
|
|
}
|
|
|
|
|
|
- inline float fastLength
|
|
|
+ GLM_FUNC_QUALIFIER float fastLength
|
|
|
(
|
|
|
detail::fvec4SIMD const & x
|
|
|
)
|
|
|
@@ -554,7 +554,7 @@ namespace glm
|
|
|
return Result;
|
|
|
}
|
|
|
|
|
|
- inline float niceLength
|
|
|
+ GLM_FUNC_QUALIFIER float niceLength
|
|
|
(
|
|
|
detail::fvec4SIMD const & x
|
|
|
)
|
|
|
@@ -566,7 +566,7 @@ namespace glm
|
|
|
return Result;
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD length4
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD length4
|
|
|
(
|
|
|
detail::fvec4SIMD const & x
|
|
|
)
|
|
|
@@ -574,7 +574,7 @@ namespace glm
|
|
|
return sqrt(dot4(x, x));
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD fastLength4
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD fastLength4
|
|
|
(
|
|
|
detail::fvec4SIMD const & x
|
|
|
)
|
|
|
@@ -582,7 +582,7 @@ namespace glm
|
|
|
return fastSqrt(dot4(x, x));
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD niceLength4
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD niceLength4
|
|
|
(
|
|
|
detail::fvec4SIMD const & x
|
|
|
)
|
|
|
@@ -590,7 +590,7 @@ namespace glm
|
|
|
return niceSqrt(dot4(x, x));
|
|
|
}
|
|
|
|
|
|
- inline float distance
|
|
|
+ GLM_FUNC_QUALIFIER float distance
|
|
|
(
|
|
|
detail::fvec4SIMD const & p0,
|
|
|
detail::fvec4SIMD const & p1
|
|
|
@@ -601,7 +601,7 @@ namespace glm
|
|
|
return Result;
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD distance4
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD distance4
|
|
|
(
|
|
|
detail::fvec4SIMD const & p0,
|
|
|
detail::fvec4SIMD const & p1
|
|
|
@@ -610,7 +610,7 @@ namespace glm
|
|
|
return detail::sse_dst_ps(p0.Data, p1.Data);
|
|
|
}
|
|
|
|
|
|
- inline float dot
|
|
|
+ GLM_FUNC_QUALIFIER float dot
|
|
|
(
|
|
|
detail::fvec4SIMD const & x,
|
|
|
detail::fvec4SIMD const & y
|
|
|
@@ -621,7 +621,7 @@ namespace glm
|
|
|
return Result;
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD dot4
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD dot4
|
|
|
(
|
|
|
detail::fvec4SIMD const & x,
|
|
|
detail::fvec4SIMD const & y
|
|
|
@@ -630,7 +630,7 @@ namespace glm
|
|
|
return detail::sse_dot_ps(x.Data, y.Data);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD cross
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD cross
|
|
|
(
|
|
|
detail::fvec4SIMD const & x,
|
|
|
detail::fvec4SIMD const & y
|
|
|
@@ -639,7 +639,7 @@ namespace glm
|
|
|
return detail::sse_xpd_ps(x.Data, y.Data);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD normalize
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD normalize
|
|
|
(
|
|
|
detail::fvec4SIMD const & x
|
|
|
)
|
|
|
@@ -650,7 +650,7 @@ namespace glm
|
|
|
return mul0;
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD fastNormalize
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD fastNormalize
|
|
|
(
|
|
|
detail::fvec4SIMD const & x
|
|
|
)
|
|
|
@@ -661,7 +661,7 @@ namespace glm
|
|
|
return mul0;
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD faceforward
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD faceforward
|
|
|
(
|
|
|
detail::fvec4SIMD const & N,
|
|
|
detail::fvec4SIMD const & I,
|
|
|
@@ -671,7 +671,7 @@ namespace glm
|
|
|
return detail::sse_ffd_ps(N.Data, I.Data, Nref.Data);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD reflect
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD reflect
|
|
|
(
|
|
|
detail::fvec4SIMD const & I,
|
|
|
detail::fvec4SIMD const & N
|
|
|
@@ -680,7 +680,7 @@ namespace glm
|
|
|
return detail::sse_rfe_ps(I.Data, N.Data);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD refract
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD refract
|
|
|
(
|
|
|
detail::fvec4SIMD const & I,
|
|
|
detail::fvec4SIMD const & N,
|
|
|
@@ -690,24 +690,24 @@ namespace glm
|
|
|
return detail::sse_rfa_ps(I.Data, N.Data, _mm_set1_ps(eta));
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD sqrt(detail::fvec4SIMD const & x)
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD sqrt(detail::fvec4SIMD const & x)
|
|
|
{
|
|
|
return _mm_mul_ps(inversesqrt(x.Data).Data, x.Data);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD niceSqrt(detail::fvec4SIMD const & x)
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD niceSqrt(detail::fvec4SIMD const & x)
|
|
|
{
|
|
|
return _mm_sqrt_ps(x.Data);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD fastSqrt(detail::fvec4SIMD const & x)
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD fastSqrt(detail::fvec4SIMD const & x)
|
|
|
{
|
|
|
return _mm_mul_ps(fastInversesqrt(x.Data).Data, x.Data);
|
|
|
}
|
|
|
|
|
|
// SSE scalar reciprocal sqrt using rsqrt op, plus one Newton-Rhaphson iteration
|
|
|
// By Elan Ruskin, http://assemblyrequired.crashworks.org/
|
|
|
- inline detail::fvec4SIMD inversesqrt(detail::fvec4SIMD const & x)
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD inversesqrt(detail::fvec4SIMD const & x)
|
|
|
{
|
|
|
GLM_ALIGN(4) static const __m128 three = {3, 3, 3, 3}; // aligned consts for fast load
|
|
|
GLM_ALIGN(4) static const __m128 half = {0.5,0.5,0.5,0.5};
|
|
|
@@ -718,7 +718,7 @@ namespace glm
|
|
|
return _mm_mul_ps(halfrecip, threeminus_xrr);
|
|
|
}
|
|
|
|
|
|
- inline detail::fvec4SIMD fastInversesqrt(detail::fvec4SIMD const & x)
|
|
|
+ GLM_FUNC_QUALIFIER detail::fvec4SIMD fastInversesqrt(detail::fvec4SIMD const & x)
|
|
|
{
|
|
|
return _mm_rsqrt_ps(x.Data);
|
|
|
}
|