- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- File List
- File Members

Classes | Functions

# SSE.h File Reference

`#include "mudbox.h"`

Go to the source code of this file.

## 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::Vector & | operator<< (mudbox::Vector &v, const HWVector &r)
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.

## Function Documentation

mudbox::Vector& operator<< | ( | mudbox::Vector & | v,
|  | const HWVector & | r
| ) |  | `[inline]`

Examples:
  PtexExtractor/ptex/Ptexture.h, PtexExtractor/ptex/PtexUtils.cpp, PtexImporter/ptex/Ptexture.h, and PtexImporter/ptex/PtexUtils.cpp.

Definition at line 234 of file SSE.h.

    {
        __m128 t = _mm_shuffle_ps( r.v, r.v, _MM_SHUFFLE(2,1,0,3) );
        _mm_store_ss( &v.x, t );
        t = _mm_shuffle_ps( t, t, _MM_SHUFFLE(2,1,0,3) );
        _mm_store_ss( &v.y, t );
        t = _mm_shuffle_ps( t, t, _MM_SHUFFLE(2,1,0,3) );
        _mm_store_ss( &v.z, t );
        return v;

        //__m128 t = _mm_shuffle_ps( r.v, r.v, _MM_SHUFFLE(0,1,2,3) );
        //int a = ((int *)&v)[3];
        //_mm_storeu_ps( &v.x, t );
        //((int *)&v)[3] = a;
        //return v;
    };

bool MBDLL_DECL hasSSE3 | ( |  | ) |

Search for all occurrences

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

bool MBDLL_DECL hasSSE41 | ( |  | ) |

Search for all occurrences

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

bool MBDLL_DECL hasSSE42 | ( |  | ) |

Search for all occurrences

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

bool MBDLL_DECL hasAVX256 | ( |  | ) |

Search for all occurrences

Query if AVX is available. present on Sandybridge.