ReactOS 0.4.15-dev-7953-g1f49173
fvec.h File Reference
#include <xmmintrin.h>
#include <assert.h>
#include <ivec.h>
#include <crtdefs.h>
Include dependency graph for fvec.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  F32vec4
 
class  F32vec1
 

Macros

#define EXPLICIT   explicit
 
#define Fvec32s4_COMP(op)   friend F32vec4 cmp##op (const F32vec4 &a,const F32vec4 &b) { return _mm_cmp##op##_ps(a,b); }
 
#define Fvec32s4_SELECT(op)   inline F32vec4 select_##op (const F32vec4 &a,const F32vec4 &b,const F32vec4 &c,const F32vec4 &d) { F32vec4 mask = _mm_cmp##op##_ps(a,b); return((mask & c) | F32vec4((_mm_andnot_ps(mask,d)))); }
 
#define Fvec32s1_COMP(op)   friend F32vec1 cmp##op (const F32vec1 &a,const F32vec1 &b) { return _mm_cmp##op##_ss(a,b); }
 
#define Fvec32s1_SELECT(op)   inline F32vec1 select_##op (const F32vec1 &a,const F32vec1 &b,const F32vec1 &c,const F32vec1 &d) { F32vec1 mask = _mm_cmp##op##_ss(a,b); return((mask & c) | F32vec1((_mm_andnot_ps(mask,d)))); }
 

Functions

F32vec4 unpack_low (const F32vec4 &a, const F32vec4 &b)
 
F32vec4 unpack_high (const F32vec4 &a, const F32vec4 &b)
 
int move_mask (const F32vec4 &a)
 
void loadu (F32vec4 &a, float *p)
 
void storeu (float *p, const F32vec4 &a)
 
void store_nta (float *p, F32vec4 &a)
 
 Fvec32s4_SELECT (eq) Fvec32s4_SELECT(lt) Fvec32s4_SELECT(le) Fvec32s4_SELECT(gt) Fvec32s4_SELECT(ge) Fvec32s4_SELECT(neq) Fvec32s4_SELECT(nlt) Fvec32s4_SELECT(nle) Fvec32s4_SELECT(ngt) Fvec32s4_SELECT(nge) inline Is16vec4 simd_max(const Is16vec4 &a
 
Is16vec4 simd_min (const Is16vec4 &a, const Is16vec4 &b)
 
Iu8vec8 simd_max (const Iu8vec8 &a, const Iu8vec8 &b)
 
Iu8vec8 simd_min (const Iu8vec8 &a, const Iu8vec8 &b)
 
Iu16vec4 simd_avg (const Iu16vec4 &a, const Iu16vec4 &b)
 
Iu8vec8 simd_avg (const Iu8vec8 &a, const Iu8vec8 &b)
 
int move_mask (const I8vec8 &a)
 
Iu16vec4 mul_high (const Iu16vec4 &a, const Iu16vec4 &b)
 
void mask_move (const I8vec8 &a, const I8vec8 &b, char *addr)
 
void store_nta (__m64 *p, M64 &a)
 
int F32vec4ToInt (const F32vec4 &a)
 
Is32vec2 F32vec4ToIs32vec2 (const F32vec4 &a)
 
F32vec4 IntToF32vec4 (const F32vec4 &a, int i)
 
F32vec4 Is32vec2ToF32vec4 (const F32vec4 &a, const Is32vec2 &b)
 
 Fvec32s1_SELECT (eq) Fvec32s1_SELECT(lt) Fvec32s1_SELECT(le) Fvec32s1_SELECT(gt) Fvec32s1_SELECT(ge) Fvec32s1_SELECT(neq) Fvec32s1_SELECT(nlt) Fvec32s1_SELECT(nle) Fvec32s1_SELECT(ngt) Fvec32s1_SELECT(nge) inline int F32vec1ToInt(const F32vec1 &a)
 

Variables

const Is16vec4 & b { return _m_pmaxsw(a,b)
 

Macro Definition Documentation

◆ EXPLICIT

#define EXPLICIT   explicit

This file has no copyright assigned and is placed in the Public Domain. This file is part of the w64 mingw-runtime package. No warranty is given; refer to the file DISCLAIMER within this package.

Definition at line 26 of file fvec.h.

◆ Fvec32s1_COMP

#define Fvec32s1_COMP (   op)    friend F32vec1 cmp##op (const F32vec1 &a,const F32vec1 &b) { return _mm_cmp##op##_ss(a,b); }

Definition at line 198 of file fvec.h.

◆ Fvec32s1_SELECT

#define Fvec32s1_SELECT (   op)    inline F32vec1 select_##op (const F32vec1 &a,const F32vec1 &b,const F32vec1 &c,const F32vec1 &d) { F32vec1 mask = _mm_cmp##op##_ss(a,b); return((mask & c) | F32vec1((_mm_andnot_ps(mask,d)))); }

Definition at line 223 of file fvec.h.

◆ Fvec32s4_COMP

#define Fvec32s4_COMP (   op)    friend F32vec4 cmp##op (const F32vec4 &a,const F32vec4 &b) { return _mm_cmp##op##_ps(a,b); }

Definition at line 74 of file fvec.h.

◆ Fvec32s4_SELECT

#define Fvec32s4_SELECT (   op)    inline F32vec4 select_##op (const F32vec4 &a,const F32vec4 &b,const F32vec4 &c,const F32vec4 &d) { F32vec4 mask = _mm_cmp##op##_ps(a,b); return((mask & c) | F32vec4((_mm_andnot_ps(mask,d)))); }

Definition at line 119 of file fvec.h.

Function Documentation

◆ F32vec4ToInt()

int F32vec4ToInt ( const F32vec4 a)
inline

Definition at line 142 of file fvec.h.

142{ return _mm_cvtt_ss2si(a); }
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
int _mm_cvtt_ss2si(__m128 a)

◆ F32vec4ToIs32vec2()

Is32vec2 F32vec4ToIs32vec2 ( const F32vec4 a)
inline

Definition at line 143 of file fvec.h.

143 {
144 __m64 result;
145 result = _mm_cvtt_ps2pi(a);
146 return Is32vec2(result);
147}
GLuint64EXT * result
Definition: glext.h:11304

◆ Fvec32s1_SELECT()

Fvec32s1_SELECT ( eq  ) const &

Definition at line 224 of file fvec.h.

237{
238 return _mm_cvtt_ss2si(a);
239}

◆ Fvec32s4_SELECT()

Fvec32s4_SELECT ( eq  ) const &

◆ IntToF32vec4()

F32vec4 IntToF32vec4 ( const F32vec4 a,
int  i 
)
inline

Definition at line 149 of file fvec.h.

149 {
150 __m128 result;
152 return F32vec4(result);
153}
Definition: fvec.h:28
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
__m128 _mm_cvt_si2ss(__m128 a, int b)

◆ Is32vec2ToF32vec4()

F32vec4 Is32vec2ToF32vec4 ( const F32vec4 a,
const Is32vec2 &  b 
)
inline

Definition at line 155 of file fvec.h.

155 {
156 __m128 result;
157 result = _mm_cvt_pi2ps(a,b);
158 return F32vec4(result);
159}
GLboolean GLboolean GLboolean b
Definition: glext.h:6204

◆ loadu()

void loadu ( F32vec4 a,
float p 
)
inline

Definition at line 115 of file fvec.h.

115{ a = _mm_loadu_ps(p); }
GLfloat GLfloat p
Definition: glext.h:8902
__m128 _mm_loadu_ps(float const *p)
Definition: xmmintrin.h:972

◆ mask_move()

void mask_move ( const I8vec8 &  a,
const I8vec8 &  b,
char addr 
)
inline

Definition at line 140 of file fvec.h.

140{ _m_maskmovq(a,b,addr); }
GLenum const GLvoid * addr
Definition: glext.h:9621

◆ move_mask() [1/2]

int move_mask ( const F32vec4 a)
inline

Definition at line 114 of file fvec.h.

114{ return _mm_movemask_ps(a); }
int _mm_movemask_ps(__m128 a)

◆ move_mask() [2/2]

int move_mask ( const I8vec8 &  a)
inline

Definition at line 138 of file fvec.h.

138{ return _m_pmovmskb(a); }

◆ mul_high()

Iu16vec4 mul_high ( const Iu16vec4 &  a,
const Iu16vec4 &  b 
)
inline

Definition at line 139 of file fvec.h.

139{ return _m_pmulhuw(a,b); }

◆ simd_avg() [1/2]

Iu16vec4 simd_avg ( const Iu16vec4 &  a,
const Iu16vec4 &  b 
)
inline

Definition at line 136 of file fvec.h.

136{ return _m_pavgw(a,b); }

◆ simd_avg() [2/2]

Iu8vec8 simd_avg ( const Iu8vec8 &  a,
const Iu8vec8 &  b 
)
inline

Definition at line 137 of file fvec.h.

137{ return _m_pavgb(a,b); }

◆ simd_max()

Iu8vec8 simd_max ( const Iu8vec8 &  a,
const Iu8vec8 &  b 
)
inline

Definition at line 134 of file fvec.h.

134{ return _m_pmaxub(a,b); }

◆ simd_min() [1/2]

Is16vec4 simd_min ( const Is16vec4 &  a,
const Is16vec4 &  b 
)
inline

Definition at line 133 of file fvec.h.

133{ return _m_pminsw(a,b); }

◆ simd_min() [2/2]

Iu8vec8 simd_min ( const Iu8vec8 &  a,
const Iu8vec8 &  b 
)
inline

Definition at line 135 of file fvec.h.

135{ return _m_pminub(a,b); }

◆ store_nta() [1/2]

void store_nta ( __m64 *  p,
M64 &  a 
)
inline

Definition at line 141 of file fvec.h.

141{ _mm_stream_pi(p,a); }
__INTRIN_INLINE_SSE void _mm_stream_pi(__m64 *__p, __m64 __a)
Definition: xmmintrin.h:1121

◆ store_nta() [2/2]

void store_nta ( float p,
F32vec4 a 
)
inline

Definition at line 117 of file fvec.h.

117{ _mm_stream_ps(p,a); }
void _mm_stream_ps(float *p, __m128 a)
Definition: xmmintrin.h:1130

◆ storeu()

void storeu ( float p,
const F32vec4 a 
)
inline

Definition at line 116 of file fvec.h.

116{ _mm_storeu_ps(p,a); }
void _mm_storeu_ps(float *p, __m128 a)
Definition: xmmintrin.h:1057

◆ unpack_high()

F32vec4 unpack_high ( const F32vec4 a,
const F32vec4 b 
)
inline

Definition at line 113 of file fvec.h.

113{ return _mm_unpackhi_ps(a,b); }
__m128 _mm_unpackhi_ps(__m128 a, __m128 b)

◆ unpack_low()

F32vec4 unpack_low ( const F32vec4 a,
const F32vec4 b 
)
inline

Definition at line 112 of file fvec.h.

112{ return _mm_unpacklo_ps(a,b); }
__m128 _mm_unpacklo_ps(__m128 a, __m128 b)

Variable Documentation

◆ b

const Is16vec4& b { return _m_pmaxsw(a,b)

Definition at line 132 of file fvec.h.