Blender  V2.93
util_simd.h
Go to the documentation of this file.
1 /*
2  * Copyright 2011-2013 Intel Corporation
3  * Modifications Copyright 2014, Blender Foundation.
4  *
5  * Licensed under the Apache License, Version 2.0(the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef __UTIL_SIMD_TYPES_H__
19 #define __UTIL_SIMD_TYPES_H__
20 
21 #include <limits>
22 #include <stdint.h>
23 
24 #include "util/util_defines.h"
25 
26 /* SSE Intrinsics includes
27  *
28  * We assume __KERNEL_SSEX__ flags to have been defined at this point.
29  *
30  * MinGW64 has conflicting declarations for these SSE headers in <windows.h>.
31  * Since we can't avoid including <windows.h>, better only include that */
32 #if defined(FREE_WINDOWS64)
33 # include "util/util_windows.h"
34 #elif defined(_MSC_VER)
35 # include <intrin.h>
36 #elif (defined(__x86_64__) || defined(__i386__))
37 # include <x86intrin.h>
38 #elif defined(__KERNEL_NEON__)
39 # define SSE2NEON_PRECISE_MINMAX 1
40 # include <sse2neon.h>
41 #endif
42 
43 /* Floating Point Control, for Embree. */
44 #if defined(__x86_64__) || defined(_M_X64)
45 # define SIMD_SET_FLUSH_TO_ZERO \
46  _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); \
47  _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
48 #else
49 # define SIMD_SET_FLUSH_TO_ZERO
50 #endif
51 
53 
54 /* Data structures used by SSE classes. */
55 #ifdef __KERNEL_SSE2__
56 
57 extern const __m128 _mm_lookupmask_ps[16];
58 
59 static struct TrueTy {
60  __forceinline operator bool() const
61  {
62  return true;
63  }
64 } True ccl_maybe_unused;
65 
66 static struct FalseTy {
67  __forceinline operator bool() const
68  {
69  return false;
70  }
71 } False ccl_maybe_unused;
72 
73 static struct ZeroTy {
74  __forceinline operator float() const
75  {
76  return 0;
77  }
78  __forceinline operator int() const
79  {
80  return 0;
81  }
82 } zero ccl_maybe_unused;
83 
84 static struct OneTy {
85  __forceinline operator float() const
86  {
87  return 1;
88  }
89  __forceinline operator int() const
90  {
91  return 1;
92  }
93 } one ccl_maybe_unused;
94 
95 static struct NegInfTy {
96  __forceinline operator float() const
97  {
98  return -std::numeric_limits<float>::infinity();
99  }
100  __forceinline operator int() const
101  {
103  }
104 } neg_inf ccl_maybe_unused;
105 
106 static struct PosInfTy {
107  __forceinline operator float() const
108  {
109  return std::numeric_limits<float>::infinity();
110  }
111  __forceinline operator int() const
112  {
114  }
115 } inf ccl_maybe_unused, pos_inf ccl_maybe_unused;
116 
117 static struct StepTy {
118 } step ccl_maybe_unused;
119 
120 #endif
121 
122 /* Utilities used by Neon */
123 #if defined(__KERNEL_NEON__)
124 template<class type, int i0, int i1, int i2, int i3> type shuffle_neon(const type &a)
125 {
126  if (i0 == i1 && i0 == i2 && i0 == i3) {
127  return vdupq_laneq_s32(a, i0);
128  }
129  static const uint8_t tbl[16] = {(i0 * 4) + 0,
130  (i0 * 4) + 1,
131  (i0 * 4) + 2,
132  (i0 * 4) + 3,
133  (i1 * 4) + 0,
134  (i1 * 4) + 1,
135  (i1 * 4) + 2,
136  (i1 * 4) + 3,
137  (i2 * 4) + 0,
138  (i2 * 4) + 1,
139  (i2 * 4) + 2,
140  (i2 * 4) + 3,
141  (i3 * 4) + 0,
142  (i3 * 4) + 1,
143  (i3 * 4) + 2,
144  (i3 * 4) + 3};
145 
146  return vqtbl1q_s8(int8x16_t(a), *(int8x16_t *)tbl);
147 }
148 
149 template<class type, int i0, int i1, int i2, int i3>
150 type shuffle_neon(const type &a, const type &b)
151 {
152  if (&a == &b) {
153  static const uint8_t tbl[16] = {(i0 * 4) + 0,
154  (i0 * 4) + 1,
155  (i0 * 4) + 2,
156  (i0 * 4) + 3,
157  (i1 * 4) + 0,
158  (i1 * 4) + 1,
159  (i1 * 4) + 2,
160  (i1 * 4) + 3,
161  (i2 * 4) + 0,
162  (i2 * 4) + 1,
163  (i2 * 4) + 2,
164  (i2 * 4) + 3,
165  (i3 * 4) + 0,
166  (i3 * 4) + 1,
167  (i3 * 4) + 2,
168  (i3 * 4) + 3};
169 
170  return vqtbl1q_s8(int8x16_t(b), *(int8x16_t *)tbl);
171  }
172  else {
173 
174  static const uint8_t tbl[16] = {(i0 * 4) + 0,
175  (i0 * 4) + 1,
176  (i0 * 4) + 2,
177  (i0 * 4) + 3,
178  (i1 * 4) + 0,
179  (i1 * 4) + 1,
180  (i1 * 4) + 2,
181  (i1 * 4) + 3,
182  (i2 * 4) + 0 + 16,
183  (i2 * 4) + 1 + 16,
184  (i2 * 4) + 2 + 16,
185  (i2 * 4) + 3 + 16,
186  (i3 * 4) + 0 + 16,
187  (i3 * 4) + 1 + 16,
188  (i3 * 4) + 2 + 16,
189  (i3 * 4) + 3 + 16};
190 
191  return vqtbl2q_s8((int8x16x2_t){a, b}, *(int8x16_t *)tbl);
192  }
193 }
194 #endif /* __KERNEL_NEON */
195 
196 /* Intrinsics Functions
197  *
198  * For fast bit operations. */
199 
200 #if defined(__BMI__) && defined(__GNUC__)
201 # ifndef _tzcnt_u32
202 # define _tzcnt_u32 __tzcnt_u32
203 # endif
204 # ifndef _tzcnt_u64
205 # define _tzcnt_u64 __tzcnt_u64
206 # endif
207 #endif
208 
209 #if defined(__LZCNT__)
210 # define _lzcnt_u32 __lzcnt32
211 # define _lzcnt_u64 __lzcnt64
212 #endif
213 
214 #if defined(_WIN32) && !defined(__MINGW32__) && !defined(__clang__)
215 /* Intrinsic functions on Windows. */
217 {
218 # if defined(__KERNEL_AVX2__)
219  return _tzcnt_u32(v);
220 # else
221  unsigned long r = 0;
222  _BitScanForward(&r, v);
223  return r;
224 # endif
225 }
226 
228 {
229  unsigned long r = 0;
230  _BitScanReverse(&r, v);
231  return r;
232 }
233 
235 {
236  long r = v;
237  _bittestandcomplement(&r, i);
238  return r;
239 }
240 
242 {
243 # if defined(__KERNEL_AVX2__)
244  return _tzcnt_u32(v);
245 # else
246  return __bsf(v);
247 # endif
248 }
249 
250 # if defined(__KERNEL_64_BIT__)
251 
253 {
254 # if defined(__KERNEL_AVX2__)
255  return _tzcnt_u64(v);
256 # else
257  unsigned long r = 0;
258  _BitScanForward64(&r, v);
259  return r;
260 # endif
261 }
262 
264 {
265  unsigned long r = 0;
266  _BitScanReverse64(&r, v);
267  return r;
268 }
269 
271 {
272  uint64_t r = v;
273  _bittestandcomplement64((__int64 *)&r, i);
274  return r;
275 }
276 
278 {
279 # if defined(__KERNEL_AVX2__)
280 # if defined(__KERNEL_64_BIT__)
281  return _tzcnt_u64(v);
282 # else
283  return _tzcnt_u32(v);
284 # endif
285 # else
286  return __bsf(v);
287 # endif
288 }
289 
290 # endif /* __KERNEL_64_BIT__ */
291 
292 #elif (defined(__x86_64__) || defined(__i386__)) && defined(__KERNEL_SSE2__)
293 /* Intrinsic functions with x86 SSE. */
294 
296 {
297  uint32_t r = 0;
298  asm("bsf %1,%0" : "=r"(r) : "r"(v));
299  return r;
300 }
301 
303 {
304  uint32_t r = 0;
305  asm("bsr %1,%0" : "=r"(r) : "r"(v));
306  return r;
307 }
308 
310 {
311  uint32_t r = 0;
312  asm("btc %1,%0" : "=r"(r) : "r"(i), "0"(v) : "flags");
313  return r;
314 }
315 
316 # if (defined(__KERNEL_64_BIT__) || defined(__APPLE__)) && \
317  !(defined(__ILP32__) && defined(__x86_64__))
319 {
320  uint64_t r = 0;
321  asm("bsf %1,%0" : "=r"(r) : "r"(v));
322  return r;
323 }
324 # endif
325 
327 {
328  uint64_t r = 0;
329  asm("bsr %1,%0" : "=r"(r) : "r"(v));
330  return r;
331 }
332 
334 {
335  uint64_t r = 0;
336  asm("btc %1,%0" : "=r"(r) : "r"(i), "0"(v) : "flags");
337  return r;
338 }
339 
341 {
342 # if defined(__KERNEL_AVX2__)
343  return _tzcnt_u32(v);
344 # else
345  return __bsf(v);
346 # endif
347 }
348 
349 # if (defined(__KERNEL_64_BIT__) || defined(__APPLE__)) && \
350  !(defined(__ILP32__) && defined(__x86_64__))
352 {
353 # if defined(__KERNEL_AVX2__)
354 # if defined(__KERNEL_64_BIT__)
355  return _tzcnt_u64(v);
356 # else
357  return _tzcnt_u32(v);
358 # endif
359 # else
360  return __bsf(v);
361 # endif
362 }
363 # endif
364 
365 #else
366 /* Intrinsic functions fallback for arbitrary processor. */
368 {
369  for (int i = 0; i < 32; i++) {
370  if (x & (1U << i))
371  return i;
372  }
373  return 32;
374 }
375 
377 {
378  for (int i = 0; i < 32; i++) {
379  if (x & (1U << (31 - i)))
380  return (31 - i);
381  }
382  return 32;
383 }
384 
386 {
387  uint32_t mask = 1U << bit;
388  return x & (~mask);
389 }
390 
392 {
393  for (int i = 0; i < 64; i++) {
394  if (x & (1UL << i))
395  return i;
396  }
397  return 64;
398 }
399 
401 {
402  for (int i = 0; i < 64; i++) {
403  if (x & (1UL << (63 - i)))
404  return (63 - i);
405  }
406  return 64;
407 }
408 
410 {
411  uint64_t mask = 1UL << bit;
412  return x & (~mask);
413 }
414 
416 {
417  assert(value != 0);
418  uint32_t bit = 0;
419  while ((value & (1 << bit)) == 0) {
420  ++bit;
421  }
422  return bit;
423 }
424 
426 {
427  assert(value != 0);
428  uint64_t bit = 0;
429  while ((value & (1 << bit)) == 0) {
430  ++bit;
431  }
432  return bit;
433 }
434 
435 #endif /* Intrinsics */
436 
437 /* SSE compatibility.
438  *
439  * Various utilities to smooth over differences between SSE versions and
440  * implementations. */
441 #ifdef __KERNEL_SSE2__
442 
443 /* Test __KERNEL_SSE41__ for MSVC which does not define __SSE4_1__, and test
444  * __SSE4_1__ to avoid OpenImageIO conflicts with our emulation macros on other
445  * platforms when compiling code outside the kernel. */
446 # if !(defined(__KERNEL_SSE41__) || defined(__SSE4_1__) || defined(__SSE4_2__))
447 
448 /* Emulation of SSE4 functions with SSE2 */
449 
450 # define _MM_FROUND_TO_NEAREST_INT 0x00
451 # define _MM_FROUND_TO_NEG_INF 0x01
452 # define _MM_FROUND_TO_POS_INF 0x02
453 # define _MM_FROUND_TO_ZERO 0x03
454 # define _MM_FROUND_CUR_DIRECTION 0x04
455 
456 # undef _mm_blendv_ps
457 # define _mm_blendv_ps _mm_blendv_ps_emu
458 __forceinline __m128 _mm_blendv_ps_emu(__m128 value, __m128 input, __m128 mask)
459 {
460  __m128i isignmask = _mm_set1_epi32(0x80000000);
461  __m128 signmask = _mm_castsi128_ps(isignmask);
462  __m128i iandsign = _mm_castps_si128(_mm_and_ps(mask, signmask));
463  __m128i icmpmask = _mm_cmpeq_epi32(iandsign, isignmask);
464  __m128 cmpmask = _mm_castsi128_ps(icmpmask);
465  return _mm_or_ps(_mm_and_ps(cmpmask, input), _mm_andnot_ps(cmpmask, value));
466 }
467 
468 # undef _mm_blend_ps
469 # define _mm_blend_ps _mm_blend_ps_emu
470 __forceinline __m128 _mm_blend_ps_emu(__m128 value, __m128 input, const int mask)
471 {
472  assert(mask < 0x10);
473  return _mm_blendv_ps(value, input, _mm_lookupmask_ps[mask]);
474 }
475 
476 # undef _mm_blendv_epi8
477 # define _mm_blendv_epi8 _mm_blendv_epi8_emu
478 __forceinline __m128i _mm_blendv_epi8_emu(__m128i value, __m128i input, __m128i mask)
479 {
480  return _mm_or_si128(_mm_and_si128(mask, input), _mm_andnot_si128(mask, value));
481 }
482 
483 # undef _mm_min_epi32
484 # define _mm_min_epi32 _mm_min_epi32_emu
485 __forceinline __m128i _mm_min_epi32_emu(__m128i value, __m128i input)
486 {
487  return _mm_blendv_epi8(input, value, _mm_cmplt_epi32(value, input));
488 }
489 
490 # undef _mm_max_epi32
491 # define _mm_max_epi32 _mm_max_epi32_emu
492 __forceinline __m128i _mm_max_epi32_emu(__m128i value, __m128i input)
493 {
494  return _mm_blendv_epi8(value, input, _mm_cmplt_epi32(value, input));
495 }
496 
497 # ifndef __KERNEL_NEON__
498 # undef _mm_extract_epi32
499 # define _mm_extract_epi32 _mm_extract_epi32_emu
500 __forceinline int _mm_extract_epi32_emu(__m128i input, const int index)
501 {
502  switch (index) {
503  case 0:
504  return _mm_cvtsi128_si32(input);
505  case 1:
506  return _mm_cvtsi128_si32(_mm_shuffle_epi32(input, _MM_SHUFFLE(1, 1, 1, 1)));
507  case 2:
508  return _mm_cvtsi128_si32(_mm_shuffle_epi32(input, _MM_SHUFFLE(2, 2, 2, 2)));
509  case 3:
510  return _mm_cvtsi128_si32(_mm_shuffle_epi32(input, _MM_SHUFFLE(3, 3, 3, 3)));
511  default:
512  assert(false);
513  return 0;
514  }
515 }
516 # endif
517 
518 # undef _mm_insert_epi32
519 # define _mm_insert_epi32 _mm_insert_epi32_emu
520 __forceinline __m128i _mm_insert_epi32_emu(__m128i value, int input, const int index)
521 {
522  assert(index >= 0 && index < 4);
523  ((int *)&value)[index] = input;
524  return value;
525 }
526 
527 # undef _mm_insert_ps
528 # define _mm_insert_ps _mm_insert_ps_emu
529 __forceinline __m128 _mm_insert_ps_emu(__m128 value, __m128 input, const int index)
530 {
531  assert(index < 0x100);
532  ((float *)&value)[(index >> 4) & 0x3] = ((float *)&input)[index >> 6];
533  return _mm_andnot_ps(_mm_lookupmask_ps[index & 0xf], value);
534 }
535 
536 # undef _mm_round_ps
537 # define _mm_round_ps _mm_round_ps_emu
538 __forceinline __m128 _mm_round_ps_emu(__m128 value, const int flags)
539 {
540  switch (flags) {
541  case _MM_FROUND_TO_NEAREST_INT:
542  return _mm_cvtepi32_ps(_mm_cvtps_epi32(value));
543  case _MM_FROUND_TO_NEG_INF:
544  return _mm_cvtepi32_ps(_mm_cvtps_epi32(_mm_add_ps(value, _mm_set1_ps(-0.5f))));
545  case _MM_FROUND_TO_POS_INF:
546  return _mm_cvtepi32_ps(_mm_cvtps_epi32(_mm_add_ps(value, _mm_set1_ps(0.5f))));
547  case _MM_FROUND_TO_ZERO:
548  return _mm_cvtepi32_ps(_mm_cvttps_epi32(value));
549  }
550  return value;
551 }
552 
553 # endif /* !(defined(__KERNEL_SSE41__) || defined(__SSE4_1__) || defined(__SSE4_2__)) */
554 
555 /* Older GCC versions do not have _mm256_cvtss_f32 yet, so define it ourselves.
556  * _mm256_castps256_ps128 generates no instructions so this is just as efficient. */
557 # if defined(__KERNEL_AVX__) || defined(__KERNEL_AVX2__)
558 # undef _mm256_cvtss_f32
559 # define _mm256_cvtss_f32(a) (_mm_cvtss_f32(_mm256_castps256_ps128(a)))
560 # endif
561 
562 #endif /* __KERNEL_SSE2__ */
563 
564 /* quiet unused define warnings */
565 #if defined(__KERNEL_SSE2__) || defined(__KERNEL_SSE3__) || defined(__KERNEL_SSSE3__) || \
566  defined(__KERNEL_SSE41__) || defined(__KERNEL_AVX__) || defined(__KERNEL_AVX2__)
567 /* do nothing */
568 #endif
569 
571 
572 #endif /* __UTIL_SIMD_TYPES_H__ */
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 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 GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_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 type
_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
ATTR_WARN_UNUSED_RESULT const BMVert * v
#define CCL_NAMESPACE_END
static unsigned a[3]
Definition: RandGen.cpp:92
#define min(a, b)
Definition: sort.c:51
unsigned int uint32_t
Definition: stdint.h:83
unsigned char uint8_t
Definition: stdint.h:81
unsigned __int64 uint64_t
Definition: stdint.h:93
float max
#define ccl_maybe_unused
Definition: util_defines.h:77
#define __forceinline
Definition: util_defines.h:71
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
CCL_NAMESPACE_BEGIN __forceinline uint32_t __bsf(const uint32_t x)
Definition: util_simd.h:367
__forceinline uint32_t __bsr(const uint32_t x)
Definition: util_simd.h:376
__forceinline uint32_t __btc(const uint32_t x, const uint32_t bit)
Definition: util_simd.h:385
__forceinline uint32_t bitscan(uint32_t value)
Definition: util_simd.h:415