Mudbox/SSE.h File Reference

SSE.h File Reference
#include "mudbox.h"

Classes

struct  HWVector
 This class represents a four dimensional vector stored in the SSE registers. More...
 
struct  HWMatrix
 This class represents a four by four matrix stored in the SSE registers. More...
 

Functions

mudbox::Vectoroperator<< (mudbox::Vector &v, const HWVector &r)
 
bool MBDLL_DECL hasSSE3 ()
 Query if SSE3 is available. Present on Prescott, Core2 and later. More...
 
bool MBDLL_DECL hasSSE41 ()
 Query if SSE4.1 is available. Present on Penryn (later Core 2) More...
 
bool MBDLL_DECL hasSSE42 ()
 Query if SSE4.2 is available. Present on Nehalem (Core i5, Corei7) More...
 
bool MBDLL_DECL hasAVX256 ()
 Query if AVX is available. present on Sandybridge. More...
 

Function Documentation

mudbox::Vector& operator<< ( mudbox::Vector v,
const HWVector r 
)
inline
+ Examples:

Definition at line 245 of file SSE.h.

246 {
247  __m128 t = _mm_shuffle_ps( r.v, r.v, _MM_SHUFFLE(2,1,0,3) );
248  _mm_store_ss( &v.x, t );
249  t = _mm_shuffle_ps( t, t, _MM_SHUFFLE(2,1,0,3) );
250  _mm_store_ss( &v.y, t );
251  t = _mm_shuffle_ps( t, t, _MM_SHUFFLE(2,1,0,3) );
252  _mm_store_ss( &v.z, t );
253  return v;
254 
256  //__m128 t = _mm_shuffle_ps( r.v, r.v, _MM_SHUFFLE(0,1,2,3) );
257  //int a = ((int *)&v)[3];
258  //_mm_storeu_ps( &v.x, t );
259  //((int *)&v)[3] = a;
260  //return v;
261 };
float z
Definition: math.h:340
float y
Definition: math.h:340
const GLdouble * v
Definition: GLee.h:1174
GLdouble GLdouble t
Definition: GLee.h:1181
float x
Definition: math.h:340
bool MBDLL_DECL hasSSE3 ( )

Query if SSE3 is available. Present on Prescott, Core2 and later.

bool MBDLL_DECL hasSSE41 ( )

Query if SSE4.1 is available. Present on Penryn (later Core 2)

bool MBDLL_DECL hasSSE42 ( )

Query if SSE4.2 is available. Present on Nehalem (Core i5, Corei7)

bool MBDLL_DECL hasAVX256 ( )

Query if AVX is available. present on Sandybridge.

Go to the source code of this file.