Blender  V3.3
avxi.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: Apache-2.0
2  * Copyright 2009-2013 Intel Corporation */
3 
4 #ifndef __UTIL_AVXI_H__
5 #define __UTIL_AVXI_H__
6 
8 
9 struct avxb;
10 
11 struct avxi {
12  typedef avxb Mask; // mask type for us
13  enum { size = 8 }; // number of SIMD elements
14  union { // data
15  __m256i m256;
16 #if !defined(__KERNEL_AVX2__)
17  struct {
18  __m128i l, h;
19  };
20 #endif
21  int32_t v[8];
22  };
23 
27 
29  {
30  }
32  {
33  m256 = a.m256;
34  }
36  {
37  m256 = a.m256;
38  return *this;
39  }
40 
41  __forceinline avxi(const __m256i a) : m256(a)
42  {
43  }
44  __forceinline operator const __m256i &(void) const
45  {
46  return m256;
47  }
48  __forceinline operator __m256i &(void)
49  {
50  return m256;
51  }
52 
53  __forceinline explicit avxi(const ssei &a)
54  : m256(_mm256_insertf128_si256(_mm256_castsi128_si256(a), a, 1))
55  {
56  }
57  __forceinline avxi(const ssei &a, const ssei &b)
58  : m256(_mm256_insertf128_si256(_mm256_castsi128_si256(a), b, 1))
59  {
60  }
61 #if defined(__KERNEL_AVX2__)
62  __forceinline avxi(const __m128i &a, const __m128i &b)
63  : m256(_mm256_insertf128_si256(_mm256_castsi128_si256(a), b, 1))
64  {
65  }
66 #else
67  __forceinline avxi(const __m128i &a, const __m128i &b) : l(a), h(b)
68  {
69  }
70 #endif
71  __forceinline explicit avxi(const int32_t *const a)
72  : m256(_mm256_castps_si256(_mm256_loadu_ps((const float *)a)))
73  {
74  }
75  __forceinline avxi(int32_t a) : m256(_mm256_set1_epi32(a))
76  {
77  }
78  __forceinline avxi(int32_t a, int32_t b) : m256(_mm256_set_epi32(b, a, b, a, b, a, b, a))
79  {
80  }
82  : m256(_mm256_set_epi32(d, c, b, a, d, c, b, a))
83  {
84  }
87  : m256(_mm256_set_epi32(h, g, f, e, d, c, b, a))
88  {
89  }
90 
91  __forceinline explicit avxi(const __m256 a) : m256(_mm256_cvtps_epi32(a))
92  {
93  }
94 
98 
99  __forceinline avxi(ZeroTy) : m256(_mm256_setzero_si256())
100  {
101  }
102 #if defined(__KERNEL_AVX2__)
103  __forceinline avxi(OneTy) : m256(_mm256_set1_epi32(1))
104  {
105  }
106  __forceinline avxi(PosInfTy) : m256(_mm256_set1_epi32(pos_inf))
107  {
108  }
109  __forceinline avxi(NegInfTy) : m256(_mm256_set1_epi32(neg_inf))
110  {
111  }
112 #else
113  __forceinline avxi(OneTy) : m256(_mm256_set_epi32(1, 1, 1, 1, 1, 1, 1, 1))
114  {
115  }
116  __forceinline avxi(PosInfTy)
117  : m256(_mm256_set_epi32(
118  pos_inf, pos_inf, pos_inf, pos_inf, pos_inf, pos_inf, pos_inf, pos_inf))
119  {
120  }
121  __forceinline avxi(NegInfTy)
122  : m256(_mm256_set_epi32(
123  neg_inf, neg_inf, neg_inf, neg_inf, neg_inf, neg_inf, neg_inf, neg_inf))
124  {
125  }
126 #endif
127  __forceinline avxi(StepTy) : m256(_mm256_set_epi32(7, 6, 5, 4, 3, 2, 1, 0))
128  {
129  }
130 
134 
135  __forceinline const int32_t &operator[](const size_t i) const
136  {
137  assert(i < 8);
138  return v[i];
139  }
141  {
142  assert(i < 8);
143  return v[i];
144  }
145 };
146 
150 
151 __forceinline const avxi cast(const __m256 &a)
152 {
153  return _mm256_castps_si256(a);
154 }
156 {
157  return a;
158 }
159 #if defined(__KERNEL_AVX2__)
160 __forceinline const avxi operator-(const avxi &a)
161 {
162  return _mm256_sub_epi32(_mm256_setzero_si256(), a.m256);
163 }
164 __forceinline const avxi abs(const avxi &a)
165 {
166  return _mm256_abs_epi32(a.m256);
167 }
168 #else
170 {
171  return avxi(_mm_sub_epi32(_mm_setzero_si128(), a.l), _mm_sub_epi32(_mm_setzero_si128(), a.h));
172 }
173 __forceinline const avxi abs(const avxi &a)
174 {
175  return avxi(_mm_abs_epi32(a.l), _mm_abs_epi32(a.h));
176 }
177 #endif
178 
182 
183 #if defined(__KERNEL_AVX2__)
184 __forceinline const avxi operator+(const avxi &a, const avxi &b)
185 {
186  return _mm256_add_epi32(a.m256, b.m256);
187 }
188 #else
189 __forceinline const avxi operator+(const avxi &a, const avxi &b)
190 {
191  return avxi(_mm_add_epi32(a.l, b.l), _mm_add_epi32(a.h, b.h));
192 }
193 #endif
194 __forceinline const avxi operator+(const avxi &a, const int32_t b)
195 {
196  return a + avxi(b);
197 }
198 __forceinline const avxi operator+(const int32_t a, const avxi &b)
199 {
200  return avxi(a) + b;
201 }
202 
203 #if defined(__KERNEL_AVX2__)
204 __forceinline const avxi operator-(const avxi &a, const avxi &b)
205 {
206  return _mm256_sub_epi32(a.m256, b.m256);
207 }
208 #else
209 __forceinline const avxi operator-(const avxi &a, const avxi &b)
210 {
211  return avxi(_mm_sub_epi32(a.l, b.l), _mm_sub_epi32(a.h, b.h));
212 }
213 #endif
214 __forceinline const avxi operator-(const avxi &a, const int32_t b)
215 {
216  return a - avxi(b);
217 }
218 __forceinline const avxi operator-(const int32_t a, const avxi &b)
219 {
220  return avxi(a) - b;
221 }
222 
223 #if defined(__KERNEL_AVX2__)
224 __forceinline const avxi operator*(const avxi &a, const avxi &b)
225 {
226  return _mm256_mullo_epi32(a.m256, b.m256);
227 }
228 #else
229 __forceinline const avxi operator*(const avxi &a, const avxi &b)
230 {
231  return avxi(_mm_mullo_epi32(a.l, b.l), _mm_mullo_epi32(a.h, b.h));
232 }
233 #endif
234 __forceinline const avxi operator*(const avxi &a, const int32_t b)
235 {
236  return a * avxi(b);
237 }
238 __forceinline const avxi operator*(const int32_t a, const avxi &b)
239 {
240  return avxi(a) * b;
241 }
242 
243 #if defined(__KERNEL_AVX2__)
244 __forceinline const avxi operator&(const avxi &a, const avxi &b)
245 {
246  return _mm256_and_si256(a.m256, b.m256);
247 }
248 #else
249 __forceinline const avxi operator&(const avxi &a, const avxi &b)
250 {
251  return _mm256_castps_si256(_mm256_and_ps(_mm256_castsi256_ps(a), _mm256_castsi256_ps(b)));
252 }
253 #endif
254 __forceinline const avxi operator&(const avxi &a, const int32_t b)
255 {
256  return a & avxi(b);
257 }
258 __forceinline const avxi operator&(const int32_t a, const avxi &b)
259 {
260  return avxi(a) & b;
261 }
262 
263 #if defined(__KERNEL_AVX2__)
264 __forceinline const avxi operator|(const avxi &a, const avxi &b)
265 {
266  return _mm256_or_si256(a.m256, b.m256);
267 }
268 #else
269 __forceinline const avxi operator|(const avxi &a, const avxi &b)
270 {
271  return _mm256_castps_si256(_mm256_or_ps(_mm256_castsi256_ps(a), _mm256_castsi256_ps(b)));
272 }
273 #endif
274 __forceinline const avxi operator|(const avxi &a, const int32_t b)
275 {
276  return a | avxi(b);
277 }
278 __forceinline const avxi operator|(const int32_t a, const avxi &b)
279 {
280  return avxi(a) | b;
281 }
282 
283 #if defined(__KERNEL_AVX2__)
284 __forceinline const avxi operator^(const avxi &a, const avxi &b)
285 {
286  return _mm256_xor_si256(a.m256, b.m256);
287 }
288 #else
289 __forceinline const avxi operator^(const avxi &a, const avxi &b)
290 {
291  return _mm256_castps_si256(_mm256_xor_ps(_mm256_castsi256_ps(a), _mm256_castsi256_ps(b)));
292 }
293 #endif
294 __forceinline const avxi operator^(const avxi &a, const int32_t b)
295 {
296  return a ^ avxi(b);
297 }
298 __forceinline const avxi operator^(const int32_t a, const avxi &b)
299 {
300  return avxi(a) ^ b;
301 }
302 
303 #if defined(__KERNEL_AVX2__)
304 __forceinline const avxi operator<<(const avxi &a, const int32_t n)
305 {
306  return _mm256_slli_epi32(a.m256, n);
307 }
308 __forceinline const avxi operator>>(const avxi &a, const int32_t n)
309 {
310  return _mm256_srai_epi32(a.m256, n);
311 }
312 
313 __forceinline const avxi sra(const avxi &a, const int32_t b)
314 {
315  return _mm256_srai_epi32(a.m256, b);
316 }
317 __forceinline const avxi srl(const avxi &a, const int32_t b)
318 {
319  return _mm256_srli_epi32(a.m256, b);
320 }
321 #else
322 __forceinline const avxi operator<<(const avxi &a, const int32_t n)
323 {
324  return avxi(_mm_slli_epi32(a.l, n), _mm_slli_epi32(a.h, n));
325 }
326 __forceinline const avxi operator>>(const avxi &a, const int32_t n)
327 {
328  return avxi(_mm_srai_epi32(a.l, n), _mm_srai_epi32(a.h, n));
329 }
330 
331 __forceinline const avxi sra(const avxi &a, const int32_t b)
332 {
333  return avxi(_mm_srai_epi32(a.l, b), _mm_srai_epi32(a.h, b));
334 }
335 __forceinline const avxi srl(const avxi &a, const int32_t b)
336 {
337  return avxi(_mm_srli_epi32(a.l, b), _mm_srli_epi32(a.h, b));
338 }
339 #endif
340 
341 #if defined(__KERNEL_AVX2__)
342 __forceinline const avxi min(const avxi &a, const avxi &b)
343 {
344  return _mm256_min_epi32(a.m256, b.m256);
345 }
346 #else
347 __forceinline const avxi min(const avxi &a, const avxi &b)
348 {
349  return avxi(_mm_min_epi32(a.l, b.l), _mm_min_epi32(a.h, b.h));
350 }
351 #endif
352 __forceinline const avxi min(const avxi &a, const int32_t b)
353 {
354  return min(a, avxi(b));
355 }
356 __forceinline const avxi min(const int32_t a, const avxi &b)
357 {
358  return min(avxi(a), b);
359 }
360 
361 #if defined(__KERNEL_AVX2__)
362 __forceinline const avxi max(const avxi &a, const avxi &b)
363 {
364  return _mm256_max_epi32(a.m256, b.m256);
365 }
366 #else
367 __forceinline const avxi max(const avxi &a, const avxi &b)
368 {
369  return avxi(_mm_max_epi32(a.l, b.l), _mm_max_epi32(a.h, b.h));
370 }
371 #endif
372 __forceinline const avxi max(const avxi &a, const int32_t b)
373 {
374  return max(a, avxi(b));
375 }
376 __forceinline const avxi max(const int32_t a, const avxi &b)
377 {
378  return max(avxi(a), b);
379 }
380 
384 
386 {
387  return a = a + b;
388 }
390 {
391  return a = a + b;
392 }
393 
395 {
396  return a = a - b;
397 }
399 {
400  return a = a - b;
401 }
402 
404 {
405  return a = a * b;
406 }
408 {
409  return a = a * b;
410 }
411 
413 {
414  return a = a & b;
415 }
417 {
418  return a = a & b;
419 }
420 
422 {
423  return a = a | b;
424 }
426 {
427  return a = a | b;
428 }
429 
431 {
432  return a = a ^ b;
433 }
435 {
436  return a = a ^ b;
437 }
438 
440 {
441  return a = a << b;
442 }
444 {
445  return a = a >> b;
446 }
447 
451 
452 #if defined(__KERNEL_AVX2__)
453 __forceinline const avxb operator==(const avxi &a, const avxi &b)
454 {
455  return _mm256_castsi256_ps(_mm256_cmpeq_epi32(a.m256, b.m256));
456 }
457 #else
458 __forceinline const avxb operator==(const avxi &a, const avxi &b)
459 {
460  return avxb(_mm_castsi128_ps(_mm_cmpeq_epi32(a.l, b.l)),
461  _mm_castsi128_ps(_mm_cmpeq_epi32(a.h, b.h)));
462 }
463 #endif
465 {
466  return a == avxi(b);
467 }
469 {
470  return avxi(a) == b;
471 }
472 
473 __forceinline const avxb operator!=(const avxi &a, const avxi &b)
474 {
475  return !(a == b);
476 }
478 {
479  return a != avxi(b);
480 }
482 {
483  return avxi(a) != b;
484 }
485 
486 #if defined(__KERNEL_AVX2__)
487 __forceinline const avxb operator<(const avxi &a, const avxi &b)
488 {
489  return _mm256_castsi256_ps(_mm256_cmpgt_epi32(b.m256, a.m256));
490 }
491 #else
492 __forceinline const avxb operator<(const avxi &a, const avxi &b)
493 {
494  return avxb(_mm_castsi128_ps(_mm_cmplt_epi32(a.l, b.l)),
495  _mm_castsi128_ps(_mm_cmplt_epi32(a.h, b.h)));
496 }
497 #endif
498 __forceinline const avxb operator<(const avxi &a, const int32_t b)
499 {
500  return a < avxi(b);
501 }
502 __forceinline const avxb operator<(const int32_t a, const avxi &b)
503 {
504  return avxi(a) < b;
505 }
506 
507 __forceinline const avxb operator>=(const avxi &a, const avxi &b)
508 {
509  return !(a < b);
510 }
512 {
513  return a >= avxi(b);
514 }
516 {
517  return avxi(a) >= b;
518 }
519 
520 #if defined(__KERNEL_AVX2__)
521 __forceinline const avxb operator>(const avxi &a, const avxi &b)
522 {
523  return _mm256_castsi256_ps(_mm256_cmpgt_epi32(a.m256, b.m256));
524 }
525 #else
526 __forceinline const avxb operator>(const avxi &a, const avxi &b)
527 {
528  return avxb(_mm_castsi128_ps(_mm_cmpgt_epi32(a.l, b.l)),
529  _mm_castsi128_ps(_mm_cmpgt_epi32(a.h, b.h)));
530 }
531 #endif
532 __forceinline const avxb operator>(const avxi &a, const int32_t b)
533 {
534  return a > avxi(b);
535 }
536 __forceinline const avxb operator>(const int32_t a, const avxi &b)
537 {
538  return avxi(a) > b;
539 }
540 
541 __forceinline const avxb operator<=(const avxi &a, const avxi &b)
542 {
543  return !(a > b);
544 }
546 {
547  return a <= avxi(b);
548 }
550 {
551  return avxi(a) <= b;
552 }
553 
554 __forceinline const avxi select(const avxb &m, const avxi &t, const avxi &f)
555 {
556  return _mm256_castps_si256(_mm256_blendv_ps(_mm256_castsi256_ps(f), _mm256_castsi256_ps(t), m));
557 }
558 
562 
563 #if defined(__KERNEL_AVX2__)
564 __forceinline avxi unpacklo(const avxi &a, const avxi &b)
565 {
566  return _mm256_unpacklo_epi32(a.m256, b.m256);
567 }
568 __forceinline avxi unpackhi(const avxi &a, const avxi &b)
569 {
570  return _mm256_unpackhi_epi32(a.m256, b.m256);
571 }
572 #else
574 {
575  return _mm256_castps_si256(_mm256_unpacklo_ps(_mm256_castsi256_ps(a), _mm256_castsi256_ps(b)));
576 }
578 {
579  return _mm256_castps_si256(_mm256_unpackhi_ps(_mm256_castsi256_ps(a), _mm256_castsi256_ps(b)));
580 }
581 #endif
582 
583 template<size_t i> __forceinline const avxi shuffle(const avxi &a)
584 {
585  return _mm256_castps_si256(_mm256_permute_ps(_mm256_castsi256_ps(a), _MM_SHUFFLE(i, i, i, i)));
586 }
587 
588 template<size_t i0, size_t i1> __forceinline const avxi shuffle(const avxi &a)
589 {
590  return _mm256_permute2f128_si256(a, a, (i1 << 4) | (i0 << 0));
591 }
592 
593 template<size_t i0, size_t i1> __forceinline const avxi shuffle(const avxi &a, const avxi &b)
594 {
595  return _mm256_permute2f128_si256(a, b, (i1 << 4) | (i0 << 0));
596 }
597 
598 template<size_t i0, size_t i1, size_t i2, size_t i3>
600 {
601  return _mm256_castps_si256(
602  _mm256_permute_ps(_mm256_castsi256_ps(a), _MM_SHUFFLE(i3, i2, i1, i0)));
603 }
604 
605 template<size_t i0, size_t i1, size_t i2, size_t i3>
606 __forceinline const avxi shuffle(const avxi &a, const avxi &b)
607 {
608  return _mm256_castps_si256(_mm256_shuffle_ps(
609  _mm256_castsi256_ps(a), _mm256_castsi256_ps(b), _MM_SHUFFLE(i3, i2, i1, i0)));
610 }
611 
612 template<> __forceinline const avxi shuffle<0, 0, 2, 2>(const avxi &b)
613 {
614  return _mm256_castps_si256(_mm256_moveldup_ps(_mm256_castsi256_ps(b)));
615 }
616 template<> __forceinline const avxi shuffle<1, 1, 3, 3>(const avxi &b)
617 {
618  return _mm256_castps_si256(_mm256_movehdup_ps(_mm256_castsi256_ps(b)));
619 }
620 template<> __forceinline const avxi shuffle<0, 1, 0, 1>(const avxi &b)
621 {
622  return _mm256_castps_si256(
623  _mm256_castpd_ps(_mm256_movedup_pd(_mm256_castps_pd(_mm256_castsi256_ps(b)))));
624 }
625 
626 __forceinline const avxi broadcast(const int *ptr)
627 {
628  return _mm256_castps_si256(_mm256_broadcast_ss((const float *)ptr));
629 }
630 template<size_t i> __forceinline const avxi insert(const avxi &a, const ssei &b)
631 {
632  return _mm256_insertf128_si256(a, b, i);
633 }
634 template<size_t i> __forceinline const ssei extract(const avxi &a)
635 {
636  return _mm256_extractf128_si256(a, i);
637 }
638 
642 
644 {
645  return min(v, shuffle<1, 0, 3, 2>(v));
646 }
648 {
649  avxi v1 = vreduce_min2(v);
650  return min(v1, shuffle<2, 3, 0, 1>(v1));
651 }
653 {
654  avxi v1 = vreduce_min4(v);
655  return min(v1, shuffle<1, 0>(v1));
656 }
657 
659 {
660  return max(v, shuffle<1, 0, 3, 2>(v));
661 }
663 {
664  avxi v1 = vreduce_max2(v);
665  return max(v1, shuffle<2, 3, 0, 1>(v1));
666 }
668 {
669  avxi v1 = vreduce_max4(v);
670  return max(v1, shuffle<1, 0>(v1));
671 }
672 
674 {
675  return v + shuffle<1, 0, 3, 2>(v);
676 }
678 {
679  avxi v1 = vreduce_add2(v);
680  return v1 + shuffle<2, 3, 0, 1>(v1);
681 }
683 {
684  avxi v1 = vreduce_add4(v);
685  return v1 + shuffle<1, 0>(v1);
686 }
687 
689 {
691 }
693 {
695 }
697 {
699 }
700 
702 {
703  return __bsf(movemask(v == vreduce_min(v)));
704 }
706 {
707  return __bsf(movemask(v == vreduce_max(v)));
708 }
709 
711 {
712  const avxi a = select(valid, v, avxi(pos_inf));
713  return __bsf(movemask(valid & (a == vreduce_min(a))));
714 }
716 {
717  const avxi a = select(valid, v, avxi(neg_inf));
718  return __bsf(movemask(valid & (a == vreduce_max(a))));
719 }
720 
724 
725 ccl_device_inline void print_avxi(const char *label, const avxi &a)
726 {
727  printf("%s: %d %d %d %d %d %d %d %d\n", label, a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7]);
728 }
729 
731 
732 #endif
typedef float(TangentPoint)[2]
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint i1
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
__forceinline uint32_t movemask(const avxb &a)
Definition: avxb.h:214
__forceinline float extract< 0 >(const avxf &a)
Definition: avxf.h:259
__forceinline const avxi vreduce_min2(const avxi &v)
Reductions.
Definition: avxi.h:643
__forceinline const avxi max(const avxi &a, const avxi &b)
Definition: avxi.h:367
__forceinline const avxb operator>(const avxi &a, const avxi &b)
Definition: avxi.h:526
ccl_device_inline void print_avxi(const char *label, const avxi &a)
Output Operators.
Definition: avxi.h:725
__forceinline const avxi operator&(const avxi &a, const avxi &b)
Definition: avxi.h:249
__forceinline const avxb operator!=(const avxi &a, const avxi &b)
Definition: avxi.h:473
__forceinline const avxi vreduce_min4(const avxi &v)
Definition: avxi.h:647
__forceinline const avxi operator<<(const avxi &a, const int32_t n)
Definition: avxi.h:322
__forceinline const ssei extract(const avxi &a)
Definition: avxi.h:634
__forceinline avxi unpackhi(const avxi &a, const avxi &b)
Definition: avxi.h:577
__forceinline const avxi shuffle< 0, 0, 2, 2 >(const avxi &b)
Definition: avxi.h:612
__forceinline avxi & operator-=(avxi &a, const avxi &b)
Definition: avxi.h:394
__forceinline const avxb operator>=(const avxi &a, const avxi &b)
Definition: avxi.h:507
__forceinline const avxi shuffle< 0, 1, 0, 1 >(const avxi &b)
Definition: avxi.h:620
__forceinline int reduce_max(const avxi &v)
Definition: avxi.h:692
__forceinline const avxi vreduce_add2(const avxi &v)
Definition: avxi.h:673
__forceinline const avxi vreduce_add4(const avxi &v)
Definition: avxi.h:677
__forceinline avxi & operator<<=(avxi &a, const int32_t b)
Definition: avxi.h:439
__forceinline uint32_t select_max(const avxi &v)
Definition: avxi.h:705
__forceinline const avxi min(const avxi &a, const avxi &b)
Definition: avxi.h:347
__forceinline const avxi vreduce_add(const avxi &v)
Definition: avxi.h:682
__forceinline const avxi shuffle(const avxi &a)
Definition: avxi.h:583
__forceinline avxi & operator|=(avxi &a, const avxi &b)
Definition: avxi.h:421
__forceinline const avxi abs(const avxi &a)
Definition: avxi.h:173
__forceinline const avxb operator<=(const avxi &a, const avxi &b)
Definition: avxi.h:541
__forceinline int reduce_min(const avxi &v)
Definition: avxi.h:688
__forceinline const avxi vreduce_max4(const avxi &v)
Definition: avxi.h:662
__forceinline const avxi shuffle< 1, 1, 3, 3 >(const avxi &b)
Definition: avxi.h:616
__forceinline const avxi operator>>(const avxi &a, const int32_t n)
Definition: avxi.h:326
__forceinline const avxi vreduce_min(const avxi &v)
Definition: avxi.h:652
__forceinline const avxi broadcast(const int *ptr)
Definition: avxi.h:626
__forceinline avxi & operator>>=(avxi &a, const int32_t b)
Definition: avxi.h:443
__forceinline const avxb operator==(const avxi &a, const avxi &b)
Comparison Operators + Select.
Definition: avxi.h:458
__forceinline const avxi operator|(const avxi &a, const avxi &b)
Definition: avxi.h:269
__forceinline const avxb operator<(const avxi &a, const avxi &b)
Definition: avxi.h:492
__forceinline avxi & operator+=(avxi &a, const avxi &b)
Assignment Operators.
Definition: avxi.h:385
__forceinline const avxi operator^(const avxi &a, const avxi &b)
Definition: avxi.h:289
__forceinline const avxi vreduce_max(const avxi &v)
Definition: avxi.h:667
__forceinline const avxi srl(const avxi &a, const int32_t b)
Definition: avxi.h:335
__forceinline const avxi vreduce_max2(const avxi &v)
Definition: avxi.h:658
__forceinline const avxi insert(const avxi &a, const ssei &b)
Definition: avxi.h:630
__forceinline avxi unpacklo(const avxi &a, const avxi &b)
Movement/Shifting/Shuffling Functions.
Definition: avxi.h:573
__forceinline const avxi select(const avxb &m, const avxi &t, const avxi &f)
Definition: avxi.h:554
__forceinline avxi & operator^=(avxi &a, const avxi &b)
Definition: avxi.h:430
__forceinline const avxi operator+(const avxi &a)
Definition: avxi.h:155
__forceinline int reduce_add(const avxi &v)
Definition: avxi.h:696
__forceinline uint32_t select_min(const avxi &v)
Definition: avxi.h:701
__forceinline const avxi sra(const avxi &a, const int32_t b)
Definition: avxi.h:331
__forceinline const avxi operator-(const avxi &a)
Definition: avxi.h:169
__forceinline avxi & operator*=(avxi &a, const avxi &b)
Definition: avxi.h:403
__forceinline avxi & operator&=(avxi &a, const avxi &b)
Definition: avxi.h:412
__forceinline const avxi cast(const __m256 &a)
Unary Operators.
Definition: avxi.h:151
__forceinline const avxi operator*(const avxi &a, const avxi &b)
Definition: avxi.h:229
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
#define ccl_device_inline
Definition: cuda/compat.h:34
#define CCL_NAMESPACE_END
Definition: cuda/compat.h:9
const char * label
SyclQueue void void size_t num_bytes void
static unsigned c
Definition: RandGen.cpp:83
static unsigned a[3]
Definition: RandGen.cpp:78
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static const pxr::TfToken g("g", pxr::TfToken::Immortal)
#define __forceinline
CCL_NAMESPACE_BEGIN __forceinline uint32_t __bsf(const uint32_t x)
Definition: simd.h:377
unsigned int uint32_t
Definition: stdint.h:80
signed int int32_t
Definition: stdint.h:77
Definition: avxb.h:13
Definition: avxi.h:11
avxb Mask
Definition: avxi.h:12
__m256i m256
Definition: avxi.h:15
__forceinline avxi(const __m128i &a, const __m128i &b)
Definition: avxi.h:67
__forceinline avxi(ZeroTy)
Constants.
Definition: avxi.h:99
__forceinline avxi(NegInfTy)
Definition: avxi.h:121
__forceinline avxi()
Constructors, Assignment & Cast Operators.
Definition: avxi.h:28
__m128i l
Definition: avxi.h:18
__forceinline avxi(const __m256 a)
Definition: avxi.h:91
__forceinline avxi(int32_t a, int32_t b, int32_t c, int32_t d)
Definition: avxi.h:81
__forceinline avxi(const __m256i a)
Definition: avxi.h:41
__forceinline avxi(StepTy)
Definition: avxi.h:127
@ size
Definition: avxi.h:13
__forceinline avxi(const ssei &a)
Definition: avxi.h:53
__forceinline avxi(OneTy)
Definition: avxi.h:113
__forceinline avxi(const ssei &a, const ssei &b)
Definition: avxi.h:57
__forceinline avxi(PosInfTy)
Definition: avxi.h:116
__forceinline const int32_t & operator[](const size_t i) const
Array Access.
Definition: avxi.h:135
__forceinline avxi(const int32_t *const a)
Definition: avxi.h:71
__forceinline avxi(int32_t a)
Definition: avxi.h:75
__m128i h
Definition: avxi.h:18
__forceinline avxi(const avxi &a)
Definition: avxi.h:31
__forceinline avxi(int32_t a, int32_t b)
Definition: avxi.h:78
__forceinline avxi(int32_t a, int32_t b, int32_t c, int32_t d, int32_t e, int32_t f, int32_t g, int32_t h)
Definition: avxi.h:85
__forceinline int32_t & operator[](const size_t i)
Definition: avxi.h:140
int32_t v[8]
Definition: avxi.h:21
__forceinline avxi & operator=(const avxi &a)
Definition: avxi.h:35
PointerRNA * ptr
Definition: wm_files.c:3480