Updated SIMD operations
This commit is contained in:
parent
b3816c2ccd
commit
7ba75dff4b
@ -41,7 +41,7 @@ namespace glm
|
|||||||
static size_type row_size();
|
static size_type row_size();
|
||||||
static bool is_matrix();
|
static bool is_matrix();
|
||||||
|
|
||||||
fvec4SIMD Data[4];
|
fvec4SIMD value[4];
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Constructors
|
// Constructors
|
||||||
|
@ -22,16 +22,23 @@ namespace glm
|
|||||||
{
|
{
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
GLM_ALIGN(4) struct fvec4SIMD
|
GLM_ALIGN(4) union fvec4SIMD
|
||||||
{
|
{
|
||||||
|
enum ctor{null};
|
||||||
|
typedef float value_type;
|
||||||
|
typedef std::size_t size_type;
|
||||||
|
static size_type value_size();
|
||||||
|
|
||||||
|
typedef fvec4SIMD type;
|
||||||
|
typedef tvec4<bool> bool_type;
|
||||||
|
|
||||||
static __m128 one;
|
static __m128 one;
|
||||||
|
|
||||||
union
|
__m128 Data;
|
||||||
{
|
float Array[4];
|
||||||
__m128 Data;
|
struct{float x, y, z, w;};
|
||||||
struct{float x, y, z, w;};
|
struct{float r, g, b, a;};
|
||||||
float array[4];
|
struct{float s, t, q, p;};
|
||||||
};
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Implicit basic constructors
|
// Implicit basic constructors
|
||||||
@ -44,9 +51,15 @@ namespace glm
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Explicit basic constructors
|
// Explicit basic constructors
|
||||||
|
|
||||||
fvec4SIMD(float const & s);
|
explicit fvec4SIMD(
|
||||||
fvec4SIMD(float const & x, float const & y, float const & z, float const & w);
|
ctor);
|
||||||
fvec4SIMD(float const v[4]);
|
explicit fvec4SIMD(
|
||||||
|
float const & s);
|
||||||
|
explicit fvec4SIMD(
|
||||||
|
float const & x,
|
||||||
|
float const & y,
|
||||||
|
float const & z,
|
||||||
|
float const & w);
|
||||||
|
|
||||||
////////////////////////////////////////
|
////////////////////////////////////////
|
||||||
//// Swizzle constructors
|
//// Swizzle constructors
|
||||||
@ -81,22 +94,6 @@ namespace glm
|
|||||||
fvec4SIMD& operator++();
|
fvec4SIMD& operator++();
|
||||||
fvec4SIMD& operator--();
|
fvec4SIMD& operator--();
|
||||||
|
|
||||||
////////////////////////////////////////
|
|
||||||
//// Unary bit operators
|
|
||||||
|
|
||||||
//fvec4SIMD& operator%= (float s);
|
|
||||||
//fvec4SIMD& operator%= (fvec4SIMD const & v);
|
|
||||||
//fvec4SIMD& operator&= (float s);
|
|
||||||
//fvec4SIMD& operator&= (fvec4SIMD const & v);
|
|
||||||
//fvec4SIMD& operator|= (float s);
|
|
||||||
//fvec4SIMD& operator|= (fvec4SIMD const & v);
|
|
||||||
//fvec4SIMD& operator^= (float s);
|
|
||||||
//fvec4SIMD& operator^= (fvec4SIMD const & v);
|
|
||||||
//fvec4SIMD& operator<<=(float s);
|
|
||||||
//fvec4SIMD& operator<<=(fvec4SIMD const & v);
|
|
||||||
//fvec4SIMD& operator>>=(float s);
|
|
||||||
//fvec4SIMD& operator>>=(fvec4SIMD const & v);
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Swizzle operators
|
// Swizzle operators
|
||||||
|
|
||||||
|
@ -42,11 +42,11 @@ namespace glm
|
|||||||
// Data(_mm_setr_ps(x, y, z, w))
|
// Data(_mm_setr_ps(x, y, z, w))
|
||||||
Data(_mm_set_ps(w, z, y, x))
|
Data(_mm_set_ps(w, z, y, x))
|
||||||
{}
|
{}
|
||||||
|
/*
|
||||||
inline fvec4SIMD::fvec4SIMD(float const v[4]) :
|
inline fvec4SIMD::fvec4SIMD(float const v[4]) :
|
||||||
Data(_mm_load_ps(v))
|
Data(_mm_load_ps(v))
|
||||||
{}
|
{}
|
||||||
|
*/
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Swizzle constructors
|
// Swizzle constructors
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user