38 #ifndef GLM_GTX_simd_vec4
39 #define GLM_GTX_simd_vec4 GLM_VERSION
44 #if(GLM_ARCH != GLM_ARCH_PURE)
46 #if(GLM_ARCH & GLM_ARCH_SSE2)
47 # include "../core/intrinsic_common.hpp"
48 # include "../core/intrinsic_geometric.hpp"
50 # error "GLM: GLM_GTX_simd_vec4 requires compiler support of SSE2 through intrinsics"
53 #if(defined(GLM_MESSAGES) && !defined(glm_ext))
54 # pragma message("GLM: GLM_GTX_simd_vec4 extension included")
59 #if (GLM_COMPILER & GLM_COMPILER_VC)
60 # pragma warning(push)
61 # pragma warning(disable:4201) // warning C4201: nonstandard extension used : nameless struct/union
73 typedef __m128 value_type;
74 typedef std::size_t size_type;
75 static size_type value_size();
77 typedef fvec4SIMD type;
78 typedef tvec4<bool> bool_type;
80 #ifdef GLM_SIMD_ENABLE_XYZW_UNION
84 struct {
float x, y, z, w;};
94 fvec4SIMD(__m128
const & Data);
95 fvec4SIMD(fvec4SIMD
const & v);
110 tvec4<float>
const & v);
115 fvec4SIMD(
vec2 const & v,
float const & s1,
float const & s2);
116 fvec4SIMD(
float const & s1,
vec2 const & v,
float const & s2);
117 fvec4SIMD(
float const & s1,
float const & s2,
vec2 const & v);
118 fvec4SIMD(
vec3 const & v,
float const & s);
119 fvec4SIMD(
float const & s,
vec3 const & v);
120 fvec4SIMD(
vec2 const & v1,
vec2 const & v2);
126 fvec4SIMD& operator= (fvec4SIMD
const & v);
127 fvec4SIMD& operator+=(fvec4SIMD
const & v);
128 fvec4SIMD& operator-=(fvec4SIMD
const & v);
129 fvec4SIMD& operator*=(fvec4SIMD
const & v);
130 fvec4SIMD& operator/=(fvec4SIMD
const & v);
132 fvec4SIMD& operator+=(
float const & s);
133 fvec4SIMD& operator-=(
float const & s);
134 fvec4SIMD& operator*=(
float const & s);
135 fvec4SIMD& operator/=(
float const & s);
143 template <comp X, comp Y, comp Z, comp W>
145 template <comp X, comp Y, comp Z, comp W>
147 template <comp X, comp Y, comp Z>
149 template <comp X, comp Y>
156 typedef glm::detail::fvec4SIMD simdVec4;
164 detail::fvec4SIMD
const & x);
168 detail::fvec4SIMD
abs(detail::fvec4SIMD
const & x);
172 detail::fvec4SIMD
sign(detail::fvec4SIMD
const & x);
176 detail::fvec4SIMD
floor(detail::fvec4SIMD
const & x);
181 detail::fvec4SIMD
trunc(detail::fvec4SIMD
const & x);
189 detail::fvec4SIMD
round(detail::fvec4SIMD
const & x);
200 detail::fvec4SIMD
ceil(detail::fvec4SIMD
const & x);
204 detail::fvec4SIMD
fract(detail::fvec4SIMD
const & x);
209 detail::fvec4SIMD
mod(
210 detail::fvec4SIMD
const & x,
211 detail::fvec4SIMD
const & y);
216 detail::fvec4SIMD
mod(
217 detail::fvec4SIMD
const & x,
231 detail::fvec4SIMD
min(
232 detail::fvec4SIMD
const & x,
233 detail::fvec4SIMD
const & y);
235 detail::fvec4SIMD
min(
236 detail::fvec4SIMD
const & x,
241 detail::fvec4SIMD
max(
242 detail::fvec4SIMD
const & x,
243 detail::fvec4SIMD
const & y);
245 detail::fvec4SIMD
max(
246 detail::fvec4SIMD
const & x,
252 detail::fvec4SIMD
clamp(
253 detail::fvec4SIMD
const & x,
254 detail::fvec4SIMD
const & minVal,
255 detail::fvec4SIMD
const & maxVal);
257 detail::fvec4SIMD
clamp(
258 detail::fvec4SIMD
const & x,
259 float const & minVal,
260 float const & maxVal);
287 detail::fvec4SIMD
mix(
288 detail::fvec4SIMD
const & x,
289 detail::fvec4SIMD
const & y,
290 detail::fvec4SIMD
const & a);
294 detail::fvec4SIMD
step(
295 detail::fvec4SIMD
const & edge,
296 detail::fvec4SIMD
const & x);
298 detail::fvec4SIMD
step(
300 detail::fvec4SIMD
const & x);
313 detail::fvec4SIMD
const & edge0,
314 detail::fvec4SIMD
const & edge1,
315 detail::fvec4SIMD
const & x);
320 detail::fvec4SIMD
const & x);
354 detail::fvec4SIMD
fma(
355 detail::fvec4SIMD
const & a,
356 detail::fvec4SIMD
const & b,
357 detail::fvec4SIMD
const & c);
381 detail::fvec4SIMD
const & x);
387 detail::fvec4SIMD
const & x);
393 detail::fvec4SIMD
const & x);
398 detail::fvec4SIMD
const & x);
404 detail::fvec4SIMD
const & x);
410 detail::fvec4SIMD
const & x);
415 detail::fvec4SIMD
const & p0,
416 detail::fvec4SIMD
const & p1);
421 detail::fvec4SIMD
const & p0,
422 detail::fvec4SIMD
const & p1);
427 detail::fvec4SIMD
const & x,
428 detail::fvec4SIMD
const & y);
432 detail::fvec4SIMD
dot4(
433 detail::fvec4SIMD
const & x,
434 detail::fvec4SIMD
const & y);
438 detail::fvec4SIMD
cross(
439 detail::fvec4SIMD
const & x,
440 detail::fvec4SIMD
const & y);
445 detail::fvec4SIMD
const & x);
451 detail::fvec4SIMD
const & x);
455 detail::fvec4SIMD simdFaceforward(
456 detail::fvec4SIMD
const & N,
457 detail::fvec4SIMD
const & I,
458 detail::fvec4SIMD
const & Nref);
464 detail::fvec4SIMD
const & I,
465 detail::fvec4SIMD
const & N);
472 detail::fvec4SIMD
const & I,
473 detail::fvec4SIMD
const & N,
478 detail::fvec4SIMD
sqrt(
479 detail::fvec4SIMD
const & x);
485 detail::fvec4SIMD
const & x);
491 detail::fvec4SIMD
const & x);
496 detail::fvec4SIMD
const & x);
502 detail::fvec4SIMD
const & x);
510 #if (GLM_COMPILER & GLM_COMPILER_VC)
511 # pragma warning(pop)
515 #endif//(GLM_ARCH != GLM_ARCH_PURE)
517 #endif//GLM_GTX_simd_vec4
GLM_FUNC_QUALIFIER detail::fvec4SIMD dot4(detail::fvec4SIMD const &x, detail::fvec4SIMD const &y)
Definition: simd_vec4.inl:626
GLM_FUNC_DECL half operator--(half const &s, int)
Definition: type_half.inl:356
GLM_FUNC_QUALIFIER detail::fvec4SIMD distance4(detail::fvec4SIMD const &p0, detail::fvec4SIMD const &p1)
Definition: simd_vec4.inl:606
GLM_FUNC_DECL genType round(genType const &x)
Definition: func_common.inl:126
GLM_FUNC_DECL genType min(genType const &x, genType const &y)
Definition: func_common.inl:286
#define GLM_ALIGNED_STRUCT(x)
Definition: _detail.hpp:476
GLM_FUNC_DECL genType refract(genType const &I, genType const &N, typename genType::value_type const &eta)
Definition: func_geometric.inl:304
GLM_FUNC_DECL genType mod(genType const &x, genType const &y)
Definition: func_common.inl:210
GLM_FUNC_DECL genType reflect(genType const &I, genType const &N)
Definition: func_geometric.inl:274
GLM_FUNC_DECL genType trunc(genType const &x)
Definition: func_common.inl:116
Definition: _detail.hpp:38
GLM_FUNC_QUALIFIER detail::fvec4SIMD fastInversesqrt(detail::fvec4SIMD const &x)
Definition: simd_vec4.inl:722
GLM_FUNC_DECL genType::value_type distance(genType const &p0, genType const &p1)
Definition: func_geometric.inl:83
mediump_vec2 vec2
Definition: type.hpp:104
GLM_FUNC_QUALIFIER detail::fvec4SIMD fastLength4(detail::fvec4SIMD const &x)
Definition: simd_vec4.inl:579
GLM_FUNC_DECL genType step(genType const &edge, genType const &x)
Definition: func_common.inl:652
GLM_FUNC_DECL genType sign(genType const &x)
GLM_FUNC_QUALIFIER float niceLength(detail::fvec4SIMD const &x)
Definition: simd_vec4.inl:559
GLM_FUNC_DECL genType fract(genType const &x)
Definition: func_common.inl:196
GLM_FUNC_DECL genType normalize(genType const &x)
Definition: func_geometric.inl:213
GLM_FUNC_DECL half operator++(half const &s, int)
Definition: type_half.inl:361
GLM_FUNC_DECL genType floor(genType const &x)
Definition: func_common.inl:105
GLM_FUNC_DECL genType abs(genType const &x)
GLM_FUNC_DECL genType clamp(genType const &x, genType const &minVal, genType const &maxVal)
GLM_FUNC_QUALIFIER detail::fvec4SIMD niceSqrt(detail::fvec4SIMD const &x)
Definition: simd_vec4.inl:699
GLM_FUNC_QUALIFIER detail::tvec4< float > vec4_cast(detail::fvec4SIMD const &x)
Definition: simd_vec4.inl:273
genType fastNormalize(genType const &x)
Definition: fast_square_root.inl:100
genType fastSqrt(genType const &x)
Definition: fast_square_root.inl:15
GLM_FUNC_DECL genType max(genType const &x, genType const &y)
Definition: func_common.inl:305
GLM_FUNC_DECL genType inversesqrt(genType const &x)
Definition: func_exponential.inl:144
mediump_vec3 vec3
Definition: type.hpp:109
GLM_FUNC_DECL genType sqrt(genType const &x)
Definition: func_exponential.inl:131
GLM_FUNC_DECL genTypeT mix(genTypeT const &x, genTypeT const &y, genTypeU const &a)
GLM_FUNC_DECL genType::value_type length(genType const &x)
Definition: func_geometric.inl:34
T const & swizzle(vecType< T > const &v, comp x)
Definition: swizzle.inl:33
genType::value_type fastLength(genType const &x)
Definition: fast_square_root.inl:49
GLM_FUNC_DECL detail::tvec3< valType > cross(detail::tvec3< valType > const &x, detail::tvec3< valType > const &y)
GLM_FUNC_DECL genType fma(genType const &a, genType const &b, genType const &c)
Definition: func_common.inl:1137
GLM_FUNC_DECL genType ceil(genType const &x)
Definition: func_common.inl:184
GLM_FUNC_QUALIFIER detail::fvec4SIMD niceLength4(detail::fvec4SIMD const &x)
Definition: simd_vec4.inl:587
GLM_FUNC_DECL genType smoothstep(genType const &edge0, genType const &edge1, genType const &x)
Definition: func_common.inl:743
GLM_FUNC_QUALIFIER detail::fvec4SIMD length4(detail::fvec4SIMD const &x)
Definition: simd_vec4.inl:571