Blender  V2.93
util_avxf.h
Go to the documentation of this file.
1 /*
2  * Copyright 2016 Intel Corporation
3  *
4  * Licensed under the Apache License, Version 2.0(the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __UTIL_AVXF_H__
18 #define __UTIL_AVXF_H__
19 
21 
22 struct avxb;
23 
24 struct avxf {
25  typedef avxf Float;
26 
27  enum { size = 8 }; /* Number of SIMD elements. */
28 
29  union {
30  __m256 m256;
31  float f[8];
32  int i[8];
33  };
34 
36  {
37  }
38  __forceinline avxf(const avxf &other)
39  {
40  m256 = other.m256;
41  }
43  {
44  m256 = other.m256;
45  return *this;
46  }
47 
48  __forceinline avxf(const __m256 a) : m256(a)
49  {
50  }
51  __forceinline avxf(const __m256i a) : m256(_mm256_castsi256_ps(a))
52  {
53  }
54 
55  __forceinline operator const __m256 &() const
56  {
57  return m256;
58  }
59  __forceinline operator __m256 &()
60  {
61  return m256;
62  }
63 
64  __forceinline avxf(float a) : m256(_mm256_set1_ps(a))
65  {
66  }
67 
68  __forceinline avxf(float high32x4, float low32x4)
69  : m256(_mm256_set_ps(
70  high32x4, high32x4, high32x4, high32x4, low32x4, low32x4, low32x4, low32x4))
71  {
72  }
73 
74  __forceinline avxf(float a3, float a2, float a1, float a0)
75  : m256(_mm256_set_ps(a3, a2, a1, a0, a3, a2, a1, a0))
76  {
77  }
78 
80  float a7, float a6, float a5, float a4, float a3, float a2, float a1, float a0)
81  : m256(_mm256_set_ps(a7, a6, a5, a4, a3, a2, a1, a0))
82  {
83  }
84 
85  __forceinline avxf(float3 a) : m256(_mm256_set_ps(a.w, a.z, a.y, a.x, a.w, a.z, a.y, a.x))
86  {
87  }
88 
89  __forceinline avxf(int a3, int a2, int a1, int a0)
90  {
91  const __m256i foo = _mm256_set_epi32(a3, a2, a1, a0, a3, a2, a1, a0);
92  m256 = _mm256_castsi256_ps(foo);
93  }
94 
95  __forceinline avxf(int a7, int a6, int a5, int a4, int a3, int a2, int a1, int a0)
96  {
97  const __m256i foo = _mm256_set_epi32(a7, a6, a5, a4, a3, a2, a1, a0);
98  m256 = _mm256_castsi256_ps(foo);
99  }
100 
101  __forceinline avxf(__m128 a, __m128 b)
102  {
103  const __m256 foo = _mm256_castps128_ps256(a);
104  m256 = _mm256_insertf128_ps(foo, b, 1);
105  }
106 
107  __forceinline const float &operator[](const size_t i) const
108  {
109  assert(i < 8);
110  return f[i];
111  }
112  __forceinline float &operator[](const size_t i)
113  {
114  assert(i < 8);
115  return f[i];
116  }
117 };
118 
119 __forceinline avxf cross(const avxf &a, const avxf &b)
120 {
121  avxf r(0.0,
122  a[4] * b[5] - a[5] * b[4],
123  a[6] * b[4] - a[4] * b[6],
124  a[5] * b[6] - a[6] * b[5],
125  0.0,
126  a[0] * b[1] - a[1] * b[0],
127  a[2] * b[0] - a[0] * b[2],
128  a[1] * b[2] - a[2] * b[1]);
129  return r;
130 }
131 
132 __forceinline void dot3(const avxf &a, const avxf &b, float &den, float &den2)
133 {
134  const avxf t = _mm256_mul_ps(a.m256, b.m256);
135  den = ((float *)&t)[0] + ((float *)&t)[1] + ((float *)&t)[2];
136  den2 = ((float *)&t)[4] + ((float *)&t)[5] + ((float *)&t)[6];
137 }
138 
142 
143 __forceinline const avxf cast(const __m256i &a)
144 {
145  return _mm256_castsi256_ps(a);
146 }
147 
149 {
150  return _mm256_sqrt_ps(a.m256);
151 }
152 
156 
157 __forceinline const avxf operator+(const avxf &a, const avxf &b)
158 {
159  return _mm256_add_ps(a.m256, b.m256);
160 }
161 __forceinline const avxf operator+(const avxf &a, const float &b)
162 {
163  return a + avxf(b);
164 }
165 __forceinline const avxf operator+(const float &a, const avxf &b)
166 {
167  return avxf(a) + b;
168 }
169 
170 __forceinline const avxf operator-(const avxf &a, const avxf &b)
171 {
172  return _mm256_sub_ps(a.m256, b.m256);
173 }
174 __forceinline const avxf operator-(const avxf &a, const float &b)
175 {
176  return a - avxf(b);
177 }
178 __forceinline const avxf operator-(const float &a, const avxf &b)
179 {
180  return avxf(a) - b;
181 }
182 
183 __forceinline const avxf operator*(const avxf &a, const avxf &b)
184 {
185  return _mm256_mul_ps(a.m256, b.m256);
186 }
187 __forceinline const avxf operator*(const avxf &a, const float &b)
188 {
189  return a * avxf(b);
190 }
191 __forceinline const avxf operator*(const float &a, const avxf &b)
192 {
193  return avxf(a) * b;
194 }
195 
196 __forceinline const avxf operator/(const avxf &a, const avxf &b)
197 {
198  return _mm256_div_ps(a.m256, b.m256);
199 }
200 __forceinline const avxf operator/(const avxf &a, const float &b)
201 {
202  return a / avxf(b);
203 }
204 __forceinline const avxf operator/(const float &a, const avxf &b)
205 {
206  return avxf(a) / b;
207 }
208 
209 __forceinline const avxf operator|(const avxf &a, const avxf &b)
210 {
211  return _mm256_or_ps(a.m256, b.m256);
212 }
213 
214 __forceinline const avxf operator^(const avxf &a, const avxf &b)
215 {
216  return _mm256_xor_ps(a.m256, b.m256);
217 }
218 
219 __forceinline const avxf operator&(const avxf &a, const avxf &b)
220 {
221  return _mm256_and_ps(a.m256, b.m256);
222 }
223 
224 __forceinline const avxf max(const avxf &a, const avxf &b)
225 {
226  return _mm256_max_ps(a.m256, b.m256);
227 }
228 __forceinline const avxf min(const avxf &a, const avxf &b)
229 {
230  return _mm256_min_ps(a.m256, b.m256);
231 }
232 
236 
237 __forceinline const avxf shuffle(const avxf &a, const __m256i &shuf)
238 {
239  return _mm256_permutevar_ps(a, shuf);
240 }
241 
242 template<int i0, int i1, int i2, int i3, int i4, int i5, int i6, int i7>
244 {
245  return _mm256_permutevar_ps(a, _mm256_set_epi32(i7, i6, i5, i4, i3, i2, i1, i0));
246 }
247 
248 template<size_t i0, size_t i1, size_t i2, size_t i3>
249 __forceinline const avxf shuffle(const avxf &a, const avxf &b)
250 {
251  return _mm256_shuffle_ps(a, b, _MM_SHUFFLE(i3, i2, i1, i0));
252 }
253 template<size_t i0, size_t i1, size_t i2, size_t i3>
255 {
256  return shuffle<i0, i1, i2, i3>(a, a);
257 }
258 template<size_t i0> __forceinline const avxf shuffle(const avxf &a, const avxf &b)
259 {
260  return shuffle<i0, i0, i0, i0>(a, b);
261 }
262 template<size_t i0> __forceinline const avxf shuffle(const avxf &a)
263 {
264  return shuffle<i0>(a, a);
265 }
266 
267 template<size_t i> __forceinline float extract(const avxf &a)
268 {
269  __m256 b = shuffle<i, i, i, i>(a).m256;
270  return _mm256_cvtss_f32(b);
271 }
272 template<> __forceinline float extract<0>(const avxf &a)
273 {
274  return _mm256_cvtss_f32(a.m256);
275 }
276 
277 __forceinline ssef low(const avxf &a)
278 {
279  return _mm256_extractf128_ps(a.m256, 0);
280 }
281 __forceinline ssef high(const avxf &a)
282 {
283  return _mm256_extractf128_ps(a.m256, 1);
284 }
285 
286 template<int i0, int i1, int i2, int i3, int i4, int i5, int i6, int i7>
288 {
289 #ifdef __KERNEL_AVX2__
290  return _mm256_permutevar8x32_ps(a, _mm256_set_epi32(i7, i6, i5, i4, i3, i2, i1, i0));
291 #else
292  float temp[8];
293  _mm256_storeu_ps((float *)&temp, a);
294  return avxf(temp[i7], temp[i6], temp[i5], temp[i4], temp[i3], temp[i2], temp[i1], temp[i0]);
295 #endif
296 }
297 
298 template<int S0, int S1, int S2, int S3, int S4, int S5, int S6, int S7>
300 {
301  return a ^ avxf(S7 << 31, S6 << 31, S5 << 31, S4 << 31, S3 << 31, S2 << 31, S1 << 31, S0 << 31);
302 }
303 
304 template<size_t S0, size_t S1, size_t S2, size_t S3, size_t S4, size_t S5, size_t S6, size_t S7>
305 ccl_device_inline const avxf blend(const avxf &a, const avxf &b)
306 {
307  return _mm256_blend_ps(
308  a, b, S7 << 0 | S6 << 1 | S5 << 2 | S4 << 3 | S3 << 4 | S2 << 5 | S1 << 6 | S0 << 7);
309 }
310 
311 template<size_t S0, size_t S1, size_t S2, size_t S3>
312 ccl_device_inline const avxf blend(const avxf &a, const avxf &b)
313 {
314  return blend<S0, S1, S2, S3, S0, S1, S2, S3>(a, b);
315 }
316 
317 //#if defined(__KERNEL_SSE41__)
318 __forceinline avxf maxi(const avxf &a, const avxf &b)
319 {
320  const avxf ci = _mm256_max_ps(a, b);
321  return ci;
322 }
323 
324 __forceinline avxf mini(const avxf &a, const avxf &b)
325 {
326  const avxf ci = _mm256_min_ps(a, b);
327  return ci;
328 }
329 //#endif
330 
334 __forceinline const avxf madd(const avxf &a, const avxf &b, const avxf &c)
335 {
336 #ifdef __KERNEL_AVX2__
337  return _mm256_fmadd_ps(a, b, c);
338 #else
339  return c + (a * b);
340 #endif
341 }
342 
343 __forceinline const avxf nmadd(const avxf &a, const avxf &b, const avxf &c)
344 {
345 #ifdef __KERNEL_AVX2__
346  return _mm256_fnmadd_ps(a, b, c);
347 #else
348  return c - (a * b);
349 #endif
350 }
351 __forceinline const avxf msub(const avxf &a, const avxf &b, const avxf &c)
352 {
353 #ifdef __KERNEL_AVX2__
354  return _mm256_fmsub_ps(a, b, c);
355 #else
356  return (a * b) - c;
357 #endif
358 }
359 
363 __forceinline const avxb operator<=(const avxf &a, const avxf &b)
364 {
365  return _mm256_cmp_ps(a.m256, b.m256, _CMP_LE_OS);
366 }
367 
368 __forceinline const avxf select(const avxb &m, const avxf &t, const avxf &f)
369 {
370  return _mm256_blendv_ps(f, t, m);
371 }
372 
376 
377 __forceinline avxf mix(const avxf &a, const avxf &b, const avxf &t)
378 {
379  return madd(t, b, (avxf(1.0f) - t) * a);
380 }
381 
382 #ifndef _mm256_set_m128
383 # define _mm256_set_m128(/* __m128 */ hi, /* __m128 */ lo) \
384  _mm256_insertf128_ps(_mm256_castps128_ps256(lo), (hi), 0x1)
385 #endif
386 
387 #define _mm256_loadu2_m128(/* float const* */ hiaddr, /* float const* */ loaddr) \
388  _mm256_set_m128(_mm_loadu_ps(hiaddr), _mm_loadu_ps(loaddr))
389 
391 
392 #endif
_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 z
_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 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 y
_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
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition: btQuadWord.h:119
#define ccl_device_inline
#define CCL_NAMESPACE_END
static unsigned c
Definition: RandGen.cpp:97
static unsigned a[3]
Definition: RandGen.cpp:92
Definition: util_avxb.h:26
Definition: util_avxf.h:24
__forceinline avxf(float high32x4, float low32x4)
Definition: util_avxf.h:68
__forceinline avxf(const avxf &other)
Definition: util_avxf.h:38
__forceinline avxf(float a7, float a6, float a5, float a4, float a3, float a2, float a1, float a0)
Definition: util_avxf.h:79
__forceinline avxf & operator=(const avxf &other)
Definition: util_avxf.h:42
avxf Float
Definition: util_avxf.h:25
@ size
Definition: util_avxf.h:27
__forceinline avxf(int a7, int a6, int a5, int a4, int a3, int a2, int a1, int a0)
Definition: util_avxf.h:95
__forceinline avxf(float a)
Definition: util_avxf.h:64
__forceinline avxf(__m128 a, __m128 b)
Definition: util_avxf.h:101
__forceinline const float & operator[](const size_t i) const
Definition: util_avxf.h:107
__m256 m256
Definition: util_avxf.h:30
float f[8]
Definition: util_avxf.h:31
__forceinline avxf()
Definition: util_avxf.h:35
__forceinline avxf(const __m256 a)
Definition: util_avxf.h:48
__forceinline avxf(int a3, int a2, int a1, int a0)
Definition: util_avxf.h:89
__forceinline avxf(const __m256i a)
Definition: util_avxf.h:51
__forceinline float & operator[](const size_t i)
Definition: util_avxf.h:112
int i[8]
Definition: util_avxf.h:32
__forceinline avxf(float a3, float a2, float a1, float a0)
Definition: util_avxf.h:74
__forceinline avxf(float3 a)
Definition: util_avxf.h:85
__forceinline avxf maxi(const avxf &a, const avxf &b)
Definition: util_avxf.h:318
__forceinline avxf cross(const avxf &a, const avxf &b)
Definition: util_avxf.h:119
__forceinline const avxf operator-(const avxf &a, const avxf &b)
Definition: util_avxf.h:170
__forceinline const avxf operator^(const avxf &a, const avxf &b)
Definition: util_avxf.h:214
__forceinline avxf mini(const avxf &a, const avxf &b)
Definition: util_avxf.h:324
__forceinline const avxf operator&(const avxf &a, const avxf &b)
Definition: util_avxf.h:219
__forceinline const avxf madd(const avxf &a, const avxf &b, const avxf &c)
Ternary Operators.
Definition: util_avxf.h:334
__forceinline ssef low(const avxf &a)
Definition: util_avxf.h:277
__forceinline const avxf shuffle(const avxf &a, const __m256i &shuf)
Movement/Shifting/Shuffling Functions.
Definition: util_avxf.h:237
__forceinline ssef high(const avxf &a)
Definition: util_avxf.h:281
__forceinline const avxf operator|(const avxf &a, const avxf &b)
Definition: util_avxf.h:209
__forceinline const avxf operator+(const avxf &a, const avxf &b)
Binary Operators.
Definition: util_avxf.h:157
__forceinline const avxf min(const avxf &a, const avxf &b)
Definition: util_avxf.h:228
__forceinline const avxf operator*(const avxf &a, const avxf &b)
Definition: util_avxf.h:183
__forceinline const avxf msub(const avxf &a, const avxf &b, const avxf &c)
Definition: util_avxf.h:351
__forceinline const avxf select(const avxb &m, const avxf &t, const avxf &f)
Definition: util_avxf.h:368
__forceinline const avxf cast(const __m256i &a)
Unary Operators.
Definition: util_avxf.h:143
__forceinline const avxf max(const avxf &a, const avxf &b)
Definition: util_avxf.h:224
__forceinline float extract(const avxf &a)
Definition: util_avxf.h:267
__forceinline const avxb operator<=(const avxf &a, const avxf &b)
Comparison Operators + Select.
Definition: util_avxf.h:363
ccl_device_inline const avxf set_sign_bit(const avxf &a)
Definition: util_avxf.h:299
ccl_device_inline const avxf blend(const avxf &a, const avxf &b)
Definition: util_avxf.h:305
__forceinline const avxf nmadd(const avxf &a, const avxf &b, const avxf &c)
Definition: util_avxf.h:343
__forceinline float extract< 0 >(const avxf &a)
Definition: util_avxf.h:272
__forceinline avxf mix(const avxf &a, const avxf &b, const avxf &t)
Common Functions.
Definition: util_avxf.h:377
__forceinline void dot3(const avxf &a, const avxf &b, float &den, float &den2)
Definition: util_avxf.h:132
__forceinline const avxf permute(const avxf &a)
Definition: util_avxf.h:287
__forceinline const avxf mm256_sqrt(const avxf &a)
Definition: util_avxf.h:148
__forceinline const avxf operator/(const avxf &a, const avxf &b)
Definition: util_avxf.h:196
#define __forceinline
Definition: util_defines.h:71