HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
VM_SIMD.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: VM_SIMD.C ( VM Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __VM_SIMD__
12 #define __VM_SIMD__
13 
14 #include <SYS/SYS_Visibility.h>
15 #include <SYS/SYS_Inline.h>
16 #include <SYS/SYS_Math.h>
17 #include <cstdint>
18 
19 //#define FORCE_NON_SIMD
20 
21 // Some older versions of glibc don't correctly align the stack for extra
22 // threads (this problem should have been fixed in 2.3.4 - see
23 // http://sources.redhat.com/bugzilla/show_bug.cgi?id=723). Instead of
24 // checking the glibc version, check the compiler version and assume newer
25 // compilers are used with newer glibc.
26 
27 #if defined(FORCE_NON_SIMD)
28  #include "VM_BasicFunc.h"
29 #else
30  #if defined(CELLRSX) || defined(PPC)
31  #include "VM_AltivecFunc.h"
32  #elif defined(LINUX) && SYS_IS_GCC_GE(3, 4) && defined(__SSE2__)
33  #include "VM_SSEFunc.h"
34  #elif defined(WIN32)
35  #include "VM_SSEFunc.h"
36  #elif defined(MBSD_INTEL)
37  #include "VM_SSEFunc.h"
38  #else
39  #include "VM_BasicFunc.h"
40  #endif
41 #endif
42 
43 class v4uf;
44 
45 class v4uu {
46 public:
48  SYS_FORCE_INLINE v4uu(const v4si &v) : vector(v) {}
51  explicit SYS_FORCE_INLINE v4uu(const int32 v[4])
52  { vector = VM_LOAD(v); }
54  { vector = VM_SPLATS(a, b, c, d); }
55 
56  // Assignment
58  { vector = v4uu(v).vector; return *this; }
60  { vector = v; return *this; }
62  { vector = v.vector; return *this; }
63 
64  SYS_FORCE_INLINE void condAssign(const v4uu &val, const v4uu &c)
65  { *this = (c & val) | ((!c) & *this); }
66 
67  // Comparison
69  { return v4uu(VM_ICMPEQ(vector, v.vector)); }
71  { return ~(*this == v); }
73  { return v4uu(VM_ICMPGT(vector, v.vector)); }
75  { return v4uu(VM_ICMPLT(vector, v.vector)); }
77  { return ~(*this < v); }
79  { return ~(*this > v); }
80 
81  SYS_FORCE_INLINE v4uu operator == (int32 v) const { return *this == v4uu(v); }
82  SYS_FORCE_INLINE v4uu operator != (int32 v) const { return *this != v4uu(v); }
83  SYS_FORCE_INLINE v4uu operator > (int32 v) const { return *this > v4uu(v); }
84  SYS_FORCE_INLINE v4uu operator < (int32 v) const { return *this < v4uu(v); }
85  SYS_FORCE_INLINE v4uu operator >= (int32 v) const { return *this >= v4uu(v); }
86  SYS_FORCE_INLINE v4uu operator <= (int32 v) const { return *this <= v4uu(v); }
87 
88  // Basic math
90  { return v4uu(VM_IADD(vector, r.vector)); }
92  { return v4uu(VM_ISUB(vector, r.vector)); }
93  SYS_FORCE_INLINE v4uu operator+=(const v4uu &r) { return (*this = *this + r); }
94  SYS_FORCE_INLINE v4uu operator-=(const v4uu &r) { return (*this = *this - r); }
95  SYS_FORCE_INLINE v4uu operator+(int32 r) const { return *this + v4uu(r); }
96  SYS_FORCE_INLINE v4uu operator-(int32 r) const { return *this - v4uu(r); }
97  SYS_FORCE_INLINE v4uu operator+=(int32 r) { return (*this = *this + r); }
98  SYS_FORCE_INLINE v4uu operator-=(int32 r) { return (*this = *this - r); }
99 
100  // logical/bitwise
101 
103  { return v4uu(VM_OR(vector, r.vector)); }
105  { return v4uu(VM_AND(vector, r.vector)); }
107  { return v4uu(VM_XOR(vector, r.vector)); }
109  { return *this == v4uu(0); }
110 
111  SYS_FORCE_INLINE v4uu operator|(const v4uu &r) const { return *this || r; }
112  SYS_FORCE_INLINE v4uu operator&(const v4uu &r) const { return *this && r; }
114  { return *this ^ v4uu(0xFFFFFFFF); }
115 
116  // component
117  SYS_FORCE_INLINE int32 operator[](int idx) const { return VM_EXTRACT(vector, idx); }
118  SYS_FORCE_INLINE void setComp(int idx, int32 v) { vector = VM_INSERT(vector, v, idx); }
119 
120  v4uf toFloat() const;
121 
122 public:
124 };
125 
126 class v4uf {
127 public:
131  explicit SYS_FORCE_INLINE v4uf(float v) { vector = VM_SPLATS(v); }
132  explicit SYS_FORCE_INLINE v4uf(const float v[4])
133  { vector = VM_LOAD(v); }
134  SYS_FORCE_INLINE v4uf(float a, float b, float c, float d)
135  { vector = VM_SPLATS(a, b, c, d); }
136 
137  // Assignment
139  { vector = v4uf(v).vector; return *this; }
141  { vector = v; return *this; }
143  { vector = v.vector; return *this; }
144 
145  SYS_FORCE_INLINE void condAssign(const v4uf &val, const v4uu &c)
146  { *this = (val & c) | (*this & ~c); }
147 
148  // Comparison
150  { return v4uu(VM_CMPEQ(vector, v.vector)); }
152  { return v4uu(VM_CMPNE(vector, v.vector)); }
154  { return v4uu(VM_CMPGT(vector, v.vector)); }
156  { return v4uu(VM_CMPLT(vector, v.vector)); }
158  { return v4uu(VM_CMPGE(vector, v.vector)); }
160  { return v4uu(VM_CMPLE(vector, v.vector)); }
161 
162  SYS_FORCE_INLINE v4uu operator == (float v) const { return *this == v4uf(v); }
163  SYS_FORCE_INLINE v4uu operator != (float v) const { return *this != v4uf(v); }
164  SYS_FORCE_INLINE v4uu operator > (float v) const { return *this > v4uf(v); }
165  SYS_FORCE_INLINE v4uu operator < (float v) const { return *this < v4uf(v); }
166  SYS_FORCE_INLINE v4uu operator >= (float v) const { return *this >= v4uf(v); }
167  SYS_FORCE_INLINE v4uu operator <= (float v) const { return *this <= v4uf(v); }
168 
169 
170  // Basic math
172  { return v4uf(VM_ADD(vector, r.vector)); }
174  { return v4uf(VM_SUB(vector, r.vector)); }
176  { return v4uf(VM_NEG(vector)); }
178  { return v4uf(VM_MUL(vector, r.vector)); }
180  { return v4uf(VM_DIV(vector, r.vector)); }
181 
182  SYS_FORCE_INLINE v4uf operator+=(const v4uf &r) { return (*this = *this + r); }
183  SYS_FORCE_INLINE v4uf operator-=(const v4uf &r) { return (*this = *this - r); }
184  SYS_FORCE_INLINE v4uf operator*=(const v4uf &r) { return (*this = *this * r); }
185  SYS_FORCE_INLINE v4uf operator/=(const v4uf &r) { return (*this = *this / r); }
186 
187  SYS_FORCE_INLINE v4uf operator+(float r) const { return *this + v4uf(r); }
188  SYS_FORCE_INLINE v4uf operator-(float r) const { return *this - v4uf(r); }
189  SYS_FORCE_INLINE v4uf operator*(float r) const { return *this * v4uf(r); }
190  SYS_FORCE_INLINE v4uf operator/(float r) const { return *this / v4uf(r); }
191  SYS_FORCE_INLINE v4uf operator+=(float r) { return (*this = *this + r); }
192  SYS_FORCE_INLINE v4uf operator-=(float r) { return (*this = *this - r); }
193  SYS_FORCE_INLINE v4uf operator*=(float r) { return (*this = *this * r); }
194  SYS_FORCE_INLINE v4uf operator/=(float r) { return (*this = *this / r); }
195 
196  // logical/bitwise
197 
199  { return v4uf(V4SF(VM_OR(V4SI(vector), r.vector))); }
201  { return v4uf(V4SF(VM_AND(V4SI(vector), r.vector))); }
203  { return v4uf(V4SF(VM_XOR(V4SI(vector), r.vector))); }
205  { return v4uf(V4SF((*this == v4uf(0.0F)).vector)); }
206 
208  { return v4uf(V4SF(VM_OR(V4SI(vector), V4SI(r.vector)))); }
210  { return v4uf(V4SF(VM_AND(V4SI(vector), V4SI(r.vector)))); }
212  { return v4uf(V4SF(VM_XOR(V4SI(vector), V4SI(r.vector)))); }
213 
214  SYS_FORCE_INLINE v4uf operator|(const v4uu &r) const { return *this || r; }
215  SYS_FORCE_INLINE v4uf operator&(const v4uu &r) const { return *this && r; }
217  { return *this ^ v4uu(0xFFFFFFFF); }
218 
219  SYS_FORCE_INLINE v4uf operator|(const v4uf &r) const { return *this || r; }
220  SYS_FORCE_INLINE v4uf operator&(const v4uf &r) const { return *this && r; }
221 
222  // component
223  SYS_FORCE_INLINE float operator[](int idx) const { return VM_EXTRACT(vector, idx); }
224  SYS_FORCE_INLINE void setComp(int idx, float v) { vector = VM_INSERT(vector, v, idx); }
225 
226  // more math
227  SYS_FORCE_INLINE v4uf abs() const { return v4uf(VM_ABS(vector)); }
228  SYS_FORCE_INLINE v4uf clamp(const v4uf &low, const v4uf &high) const
229  { return v4uf(
230  VM_MIN(VM_MAX(vector, low.vector), high.vector)); }
231  SYS_FORCE_INLINE v4uf clamp(float low, float high) const
232  { return v4uf(VM_MIN(VM_MAX(vector,
233  v4uf(low).vector), v4uf(high).vector)); }
235 
236  /// This is a lie, it is a signed int.
239 
240  v4uu floor() const
241  {
242  VM_P_FLOOR();
243  v4uu result = VM_FLOOR(vector);
244  VM_E_FLOOR();
245  return result;
246  }
247 
248  /// Returns the integer part of this float, this becomes the
249  /// 0..1 fractional component.
251  {
252  v4uu base = toSignedInt();
253  *this -= base.toFloat();
254  return base;
255  }
256 
257  template <int A, int B, int C, int D>
259  {
260  return VM_SHUFFLE<A,B,C,D>(vector);
261  }
262 
264  {
265  // If the exponent is the maximum value, it's either infinite or NaN.
266  const v4si mask = VM_SPLATS(0x7F800000);
267  return ~v4uu(VM_ICMPEQ(VM_AND(V4SI(vector), mask), mask));
268  }
269 
270 public:
272 };
273 
276 {
277  return v4uf(VM_IFLOAT(vector));
278 }
279 
280 //
281 // Custom vector operations
282 //
283 
284 static SYS_FORCE_INLINE v4uf
285 sqrt(const v4uf &a)
286 {
287  return v4uf(VM_SQRT(a.vector));
288 }
289 
290 static SYS_FORCE_INLINE v4uf
291 fabs(const v4uf &a)
292 {
293  return a.abs();
294 }
295 
296 // Use this operation to mask disabled values to 0
297 // rval = !a ? b : 0;
298 
299 static SYS_FORCE_INLINE v4uf
300 andn(const v4uu &a, const v4uf &b)
301 {
302  return v4uf(V4SF(VM_ANDNOT(a.vector, V4SI(b.vector))));
303 }
304 
305 static SYS_FORCE_INLINE v4uu
306 andn(const v4uu &a, const v4uu &b)
307 {
308  return v4uu(VM_ANDNOT(a.vector, b.vector));
309 }
310 
311 // rval = a ? b : c;
312 static SYS_FORCE_INLINE v4uf
313 ternary(const v4uu &a, const v4uf &b, const v4uf &c)
314 {
315  return (b & a) | andn(a, c);
316 }
317 
318 static SYS_FORCE_INLINE v4uu
319 ternary(const v4uu &a, const v4uu &b, const v4uu &c)
320 {
321  return (b & a) | andn(a, c);
322 }
323 
324 // rval = !(a && b)
325 static SYS_FORCE_INLINE v4uu
326 nand(const v4uu &a, const v4uu &b)
327 {
328  return !v4uu(VM_AND(a.vector, b.vector));
329 }
330 
331 static SYS_FORCE_INLINE v4uf
332 vmin(const v4uf &a, const v4uf &b)
333 {
334  return v4uf(VM_MIN(a.vector, b.vector));
335 }
336 
337 static SYS_FORCE_INLINE v4uf
338 vmax(const v4uf &a, const v4uf &b)
339 {
340  return v4uf(VM_MAX(a.vector, b.vector));
341 }
342 
343 static SYS_FORCE_INLINE v4uf
344 clamp(const v4uf &a, const v4uf &b, const v4uf &c)
345 {
346  return vmax(vmin(a, c), b);
347 }
348 
349 static SYS_FORCE_INLINE v4uf
350 clamp(const v4uf &a, float b, float c)
351 {
352  return vmax(vmin(a, v4uf(c)), v4uf(b));
353 }
354 
355 static SYS_FORCE_INLINE bool
356 allbits(const v4uu &a)
357 {
358  return vm_allbits(a.vector);
359 }
360 
361 static SYS_FORCE_INLINE bool
362 anybits(const v4uu &a)
363 {
364  return !allbits(~a);
365 }
366 
367 static SYS_FORCE_INLINE v4uf
368 madd(const v4uf &v, const v4uf &f, const v4uf &a)
369 {
370  return v4uf(VM_MADD(v.vector, f.vector, a.vector));
371 }
372 
373 static SYS_FORCE_INLINE v4uf
374 madd(const v4uf &v, float f, float a)
375 {
376  return v4uf(VM_MADD(v.vector, v4uf(f).vector, v4uf(a).vector));
377 }
378 
379 static SYS_FORCE_INLINE v4uf
380 madd(const v4uf &v, float f, const v4uf &a)
381 {
382  return v4uf(VM_MADD(v.vector, v4uf(f).vector, a.vector));
383 }
384 
385 static SYS_FORCE_INLINE v4uf
386 msub(const v4uf &v, const v4uf &f, const v4uf &s)
387 {
388  return madd(v, f, -s);
389 }
390 
391 static SYS_FORCE_INLINE v4uf
392 msub(const v4uf &v, float f, float s)
393 {
394  return madd(v, f, -s);
395 }
396 
397 static SYS_FORCE_INLINE v4uf
398 lerp(const v4uf &a, const v4uf &b, const v4uf &w)
399 {
400  v4uf w1 = v4uf(1.0F) - w;
401  return madd(a, w1, b*w);
402 }
403 
404 static SYS_FORCE_INLINE v4uf
405 luminance(const v4uf &r, const v4uf &g, const v4uf &b,
406  float rw, float gw, float bw)
407 {
408  return v4uf(madd(r, v4uf(rw), madd(g, v4uf(gw), b * bw)));
409 }
410 
411 static SYS_FORCE_INLINE float
412 dot3(const v4uf &a, const v4uf &b)
413 {
414  v4uf res = a*b;
415  return res[0] + res[1] + res[2];
416 }
417 
418 static SYS_FORCE_INLINE float
419 dot4(const v4uf &a, const v4uf &b)
420 {
421  v4uf res = a*b;
422  return res[0] + res[1] + res[2] + res[3];
423 }
424 
425 static SYS_FORCE_INLINE float
426 length(const v4uf &a)
427 {
428  return SYSsqrt(dot3(a, a));
429 }
430 
431 static SYS_FORCE_INLINE v4uf
432 normalize(const v4uf &a)
433 {
434  return a / length(a);
435 }
436 
437 static SYS_FORCE_INLINE v4uf
438 cross(const v4uf &a, const v4uf &b)
439 {
440  return v4uf(a[1]*b[2] - a[2]*b[1],
441  a[2]*b[0] - a[0]*b[2],
442  a[0]*b[1] - a[1]*b[0], 0);
443 }
444 
445 // Currently there is no specific support for signed integers
446 typedef v4uu v4ui;
447 
448 // Assuming that ptr is an array of elements of type STYPE, this operation
449 // will return the index of the first element that is aligned to (1<<ASIZE)
450 // bytes.
451 #define VM_ALIGN(ptr, ASIZE, STYPE) \
452  ((((1<<ASIZE)-(intptr_t)ptr)&((1<<ASIZE)-1))/sizeof(STYPE))
453 
454 #endif
SYS_FORCE_INLINE v4uf operator/(float r) const
Definition: VM_SIMD.h:190
SYS_FORCE_INLINE v4uu operator=(const v4uu &v)
Definition: VM_SIMD.h:61
SYS_FORCE_INLINE v4uf operator+=(float r)
Definition: VM_SIMD.h:191
SYS_FORCE_INLINE v4uf operator=(const v4uf &v)
Definition: VM_SIMD.h:142
SYS_FORCE_INLINE v4uf operator&&(const v4uf &r) const
Definition: VM_SIMD.h:209
v4uu v4ui
Definition: VM_SIMD.h:446
#define VM_FLOOR
SYS_FORCE_INLINE v4uu operator>=(const v4uu &v) const
Definition: VM_SIMD.h:76
SYS_FORCE_INLINE v4uu operator=(v4si v)
Definition: VM_SIMD.h:59
SYS_FORCE_INLINE v4uf operator^(const v4uu &r) const
Definition: VM_SIMD.h:202
#define VM_NEG
#define VM_CMPGT
#define V4SI(A)
SYS_FORCE_INLINE v4uu operator||(const v4uu &r) const
Definition: VM_SIMD.h:102
SYS_FORCE_INLINE v4uf operator-() const
Definition: VM_SIMD.h:175
#define VM_ISUB
const GLdouble * v
Definition: glcorearb.h:836
SYS_FORCE_INLINE v4uu operator&&(const v4uu &r) const
Definition: VM_SIMD.h:104
SYS_FORCE_INLINE v4uu operator-(const v4uu &r) const
Definition: VM_SIMD.h:91
#define VM_CMPLE
virtual bool lerp(GA_AttributeOperand &d, GA_AttributeOperand &a, GA_AttributeOperand &b, GA_AttributeOperand &t) const
d = SYSlerp(a, b, t);
SYS_FORCE_INLINE v4uu toUnsignedInt() const
This is a lie, it is a signed int.
Definition: VM_SIMD.h:237
GLboolean GLboolean g
Definition: glcorearb.h:1221
#define VM_CMPGE
SYS_FORCE_INLINE v4uu(const int32 v[4])
Definition: VM_SIMD.h:51
SYS_FORCE_INLINE v4uf(const v4sf &v)
Definition: VM_SIMD.h:129
SYS_FORCE_INLINE v4uu operator+(const v4uu &r) const
Definition: VM_SIMD.h:89
#define VM_INSERT
Definition: VM_BasicFunc.h:325
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
GLint GLuint mask
Definition: glcorearb.h:123
SYS_FORCE_INLINE v4uf operator=(float v)
Definition: VM_SIMD.h:138
SYS_FORCE_INLINE v4uu operator==(const v4uu &v) const
Definition: VM_SIMD.h:68
SYS_FORCE_INLINE v4uu operator<(const v4uu &v) const
Definition: VM_SIMD.h:74
SYS_FORCE_INLINE v4uu(int32 v)
Definition: VM_SIMD.h:50
#define VM_ICMPGT
SYS_FORCE_INLINE void condAssign(const v4uu &val, const v4uu &c)
Definition: VM_SIMD.h:64
SYS_FORCE_INLINE v4uu operator!() const
Definition: VM_SIMD.h:108
SYS_FORCE_INLINE v4uf operator-(float r) const
Definition: VM_SIMD.h:188
#define VM_SQRT
SYS_FORCE_INLINE v4uu operator+=(int32 r)
Definition: VM_SIMD.h:97
SYS_FORCE_INLINE v4uf abs() const
Definition: VM_SIMD.h:227
#define VM_ICMPLT
v4uu floor() const
Definition: VM_SIMD.h:240
SYS_FORCE_INLINE v4uf operator|(const v4uf &r) const
Definition: VM_SIMD.h:219
#define VM_EXTRACT
Definition: VM_BasicFunc.h:324
SYS_FORCE_INLINE v4uf operator*=(float r)
Definition: VM_SIMD.h:193
#define VM_MIN
SYS_FORCE_INLINE v4uf operator=(v4sf v)
Definition: VM_SIMD.h:140
GLfloat f
Definition: glcorearb.h:1925
SYS_FORCE_INLINE v4uf operator/(const v4uf &r) const
Definition: VM_SIMD.h:179
SYS_FORCE_INLINE v4uf(float a, float b, float c, float d)
Definition: VM_SIMD.h:134
SYS_FORCE_INLINE v4uf()
Definition: VM_SIMD.h:128
SYS_FORCE_INLINE v4uf recip() const
Definition: VM_SIMD.h:234
SYS_FORCE_INLINE v4uu operator&(const v4uu &r) const
Definition: VM_SIMD.h:112
SYS_FORCE_INLINE v4uu operator+=(const v4uu &r)
Definition: VM_SIMD.h:93
SYS_FORCE_INLINE v4uu operator^(const v4uu &r) const
Definition: VM_SIMD.h:106
SYS_FORCE_INLINE v4uu operator=(int32 v)
Definition: VM_SIMD.h:57
SYS_FORCE_INLINE v4uu(const v4si &v)
Definition: VM_SIMD.h:48
Definition: VM_SIMD.h:45
SYS_FORCE_INLINE v4uu toSignedInt() const
Definition: VM_SIMD.h:238
SYS_FORCE_INLINE v4uf operator&(const v4uf &r) const
Definition: VM_SIMD.h:220
#define VM_CMPLT
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
SYS_FORCE_INLINE v4uu operator<=(const v4uf &v) const
Definition: VM_SIMD.h:159
SYS_FORCE_INLINE v4uf operator!() const
Definition: VM_SIMD.h:204
#define VM_MUL
SYS_FORCE_INLINE v4uf operator||(const v4uf &r) const
Definition: VM_SIMD.h:207
Definition: VM_SIMD.h:126
SYS_FORCE_INLINE v4uu operator>(const v4uf &v) const
Definition: VM_SIMD.h:153
#define V4SF(A)
SYS_FORCE_INLINE void setComp(int idx, float v)
Definition: VM_SIMD.h:224
SYS_FORCE_INLINE v4uf(const float v[4])
Definition: VM_SIMD.h:132
#define VM_SPLATS
SYS_FORCE_INLINE v4uf clamp(float low, float high) const
Definition: VM_SIMD.h:231
SYS_FORCE_INLINE v4uu operator==(const v4uf &v) const
Definition: VM_SIMD.h:149
#define VM_ABS
SYS_FORCE_INLINE v4uu operator-=(int32 r)
Definition: VM_SIMD.h:98
SYS_FORCE_INLINE v4uf operator^(const v4uf &r) const
Definition: VM_SIMD.h:211
SYS_FORCE_INLINE v4uu operator-(int32 r) const
Definition: VM_SIMD.h:96
SYS_FORCE_INLINE float operator[](int idx) const
Definition: VM_SIMD.h:223
SYS_FORCE_INLINE v4uu()
Definition: VM_SIMD.h:47
int int32
Definition: SYS_Types.h:34
SYS_FORCE_INLINE void condAssign(const v4uf &val, const v4uu &c)
Definition: VM_SIMD.h:145
GridType::Ptr normalize(const GridType &grid, bool threaded, InterruptT *interrupt)
Normalize the vectors of the given vector-valued grid.
SYS_FORCE_INLINE v4uu operator<(const v4uf &v) const
Definition: VM_SIMD.h:155
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
SYS_FORCE_INLINE v4uu operator!=(const v4uu &v) const
Definition: VM_SIMD.h:70
#define VM_CMPNE
SYS_FORCE_INLINE v4uf operator*(float r) const
Definition: VM_SIMD.h:189
#define VM_SUB
SYS_FORCE_INLINE v4uf(const v4uf &v)
Definition: VM_SIMD.h:130
SYS_FORCE_INLINE v4uu operator>=(const v4uf &v) const
Definition: VM_SIMD.h:157
SYS_FORCE_INLINE v4uu operator|(const v4uu &r) const
Definition: VM_SIMD.h:111
#define VM_IFLOAT
SYS_FORCE_INLINE v4uf operator*(const v4uf &r) const
Definition: VM_SIMD.h:177
SYS_FORCE_INLINE v4uf operator-(const v4uf &r) const
Definition: VM_SIMD.h:173
SYS_FORCE_INLINE void setComp(int idx, int32 v)
Definition: VM_SIMD.h:118
SYS_FORCE_INLINE v4uf operator&(const v4uu &r) const
Definition: VM_SIMD.h:215
SYS_FORCE_INLINE v4uu operator-=(const v4uu &r)
Definition: VM_SIMD.h:94
#define VM_MADD
#define VM_P_FLOOR()
SYS_FORCE_INLINE v4uu operator<=(const v4uu &v) const
Definition: VM_SIMD.h:78
SYS_FORCE_INLINE v4uu operator>(const v4uu &v) const
Definition: VM_SIMD.h:72
SYS_FORCE_INLINE v4uf operator&&(const v4uu &r) const
Definition: VM_SIMD.h:200
#define VM_INT
v4si vector
Definition: VM_SIMD.h:123
v4uu splitFloat()
Definition: VM_SIMD.h:250
GLuint GLfloat * val
Definition: glcorearb.h:1607
SYS_FORCE_INLINE v4uf clamp(const v4uf &low, const v4uf &high) const
Definition: VM_SIMD.h:228
SYS_FORCE_INLINE v4uu(int32 a, int32 b, int32 c, int32 d)
Definition: VM_SIMD.h:53
#define VM_ICMPEQ
#define VM_OR
#define VM_DIV
#define VM_ANDNOT
SYS_FORCE_INLINE v4uf swizzle() const
Definition: VM_SIMD.h:258
#define VM_MAX
#define VM_IADD
#define VM_CMPEQ
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:856
SYS_FORCE_INLINE int32 operator[](int idx) const
Definition: VM_SIMD.h:117
SYS_FORCE_INLINE v4uu operator+(int32 r) const
Definition: VM_SIMD.h:95
SYS_FORCE_INLINE v4uf operator/=(float r)
Definition: VM_SIMD.h:194
#define VM_ADD
SYS_FORCE_INLINE v4uf(float v)
Definition: VM_SIMD.h:131
SYS_FORCE_INLINE v4uu operator!=(const v4uf &v) const
Definition: VM_SIMD.h:151
GLboolean r
Definition: glcorearb.h:1221
SYS_FORCE_INLINE v4uf operator-=(const v4uf &r)
Definition: VM_SIMD.h:183
SYS_FORCE_INLINE v4uf operator~() const
Definition: VM_SIMD.h:216
#define VM_LOAD
Definition: VM_BasicFunc.h:327
SYS_FORCE_INLINE v4uf operator||(const v4uu &r) const
Definition: VM_SIMD.h:198
SYS_FORCE_INLINE v4uf operator+(float r) const
Definition: VM_SIMD.h:187
SYS_FORCE_INLINE v4uf operator*=(const v4uf &r)
Definition: VM_SIMD.h:184
SYS_FORCE_INLINE v4uf operator+=(const v4uf &r)
Definition: VM_SIMD.h:182
SYS_FORCE_INLINE v4uf operator/=(const v4uf &r)
Definition: VM_SIMD.h:185
#define VM_AND
SYS_FORCE_INLINE v4uf operator-=(float r)
Definition: VM_SIMD.h:192
SYS_FORCE_INLINE v4uu(const v4uu &v)
Definition: VM_SIMD.h:49
SYS_FORCE_INLINE v4uf operator+(const v4uf &r) const
Definition: VM_SIMD.h:171
SYS_FORCE_INLINE v4uu operator~() const
Definition: VM_SIMD.h:113
SIM_DerVector3 cross(const SIM_DerVector3 &lhs, const SIM_DerVector3 &rhs)
v4sf vector
Definition: VM_SIMD.h:271
v4uf toFloat() const
Definition: VM_SIMD.h:275
SYS_FORCE_INLINE v4uu isFinite() const
Definition: VM_SIMD.h:263
#define VM_E_FLOOR()
GLenum clamp
Definition: glcorearb.h:1233
#define VM_XOR
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:794
SYS_FORCE_INLINE v4uf operator|(const v4uu &r) const
Definition: VM_SIMD.h:214
#define VM_INVERT