26 #ifndef __MATH_BASE_INLINE_C__
27 #define __MATH_BASE_INLINE_C__
43 # define UNLIKELY(x) __builtin_expect(!!(x), 0)
45 # define UNLIKELY(x) (x)
79 return (
float)(
exp(
log(f) / 3.0));
89 return -
exp(
log(-d) / 3.0);
117 return (
float)-
M_PI / 2.0f;
120 return (
float)
M_PI / 2.0f;
153 return (
float)-
M_PI / 2.0f;
156 return (
float)
M_PI / 2.0f;
175 return (fac * target) + (1.0f - fac) * origin;
180 return (fac * target) + (1.0f - fac) * origin;
186 return range == 0 ? 0 : ((
pos -
min) / range);
192 return range == 0 ? 0 : ((
pos -
min) / range);
199 return (
x * (b -
a)) +
a;
210 return (n & (n - 1)) == 0;
273 #define _round_clamp_fl_impl(arg, ty, min, max) \
275 float r = floorf(arg + 0.5f); \
276 if (UNLIKELY(r <= (float)min)) { \
279 else if (UNLIKELY(r >= (float)max)) { \
287 #define _round_clamp_db_impl(arg, ty, min, max) \
289 double r = floor(arg + 0.5); \
290 if (UNLIKELY(r <= (double)min)) { \
293 else if (UNLIKELY(r >= (double)max)) { \
301 #define _round_fl_impl(arg, ty) \
303 return (ty)floorf(arg + 0.5f); \
305 #define _round_db_impl(arg, ty) \
307 return (ty)floor(arg + 0.5); \
327 #undef _round_fl_impl
328 #undef _round_db_impl
356 #undef _round_clamp_fl_impl
357 #undef _round_clamp_db_impl
363 return (2 *
a + b) / (2 * b);
374 return r ? d - ((
a < 0) ^ (b < 0)) : d;
382 return (
a + b - 1) / b;
390 return (i % n + n) % n;
402 return (range != 0.0f) ? value - (range *
floorf((value -
min) / range)) :
min;
410 return fabsf(
fractf((value - scale) / (scale * 2.0f)) * scale * 2.0f - scale);
481 return (
a < b) ?
a : b;
485 return (
a > b) ?
a : b;
492 return min_ff(
a, b) - h * h * h *
c * (1.0f / 6.0f);
501 return (
a < b) ?
a : b;
505 return (
a > b) ?
a : b;
510 return (
a < b) ?
a : b;
514 return (b <
a) ?
a : b;
555 return (
a < b) ?
a : b;
559 return (b <
a) ?
a : b;
564 return (
a < b) ?
a : b;
568 return (b <
a) ?
a : b;
581 else if (value <
min) {
599 return fabsf(
a - b) <= max_diff;
623 if (
fabsf(
a - b) <= max_diff) {
632 return ((ua.i < 0) != (ub.i < 0)) ? 0 : (
abs(ua.i - ub.i) <= max_ulps) ? 1 : 0;
637 return (f < 0.0f) ? -1.0f : 1.0f;
685 return (f == 0.0f) ? 0 : (int)
floor(log10(
fabs(f))) + 1;
694 return (d == 0.0) ? 0 : (int)
floor(log10(
fabs(d))) + 1;
699 return (
int)log10((
double)i) + 1;
719 MALWAYS_INLINE __m128 _bli_math_fastpow(
const int exp,
const int e2coeff,
const __m128 arg)
722 ret = _mm_mul_ps(arg, _mm_castsi128_ps(_mm_set1_epi32(e2coeff)));
723 ret = _mm_cvtepi32_ps(_mm_castps_si128(
ret));
724 ret = _mm_mul_ps(
ret, _mm_castsi128_ps(_mm_set1_epi32(
exp)));
725 ret = _mm_castsi128_ps(_mm_cvtps_epi32(
ret));
730 MALWAYS_INLINE __m128 _bli_math_improve_5throot_solution(
const __m128 old_result,
const __m128
x)
732 __m128 approx2 = _mm_mul_ps(old_result, old_result);
733 __m128 approx4 = _mm_mul_ps(approx2, approx2);
734 __m128
t = _mm_div_ps(
x, approx4);
735 __m128 summ = _mm_add_ps(_mm_mul_ps(_mm_set1_ps(4.0f), old_result),
t);
736 return _mm_mul_ps(summ, _mm_set1_ps(1.0f / 5.0f));
751 __m128
x = _bli_math_fastpow(0x3F4CCCCD, 0x4F55A7FB, arg);
752 __m128 arg2 = _mm_mul_ps(arg, arg);
753 __m128 arg4 = _mm_mul_ps(arg2, arg2);
755 x = _bli_math_improve_5throot_solution(
x, arg4);
757 x = _bli_math_improve_5throot_solution(
x, arg4);
759 x = _bli_math_improve_5throot_solution(
x, arg4);
760 return _mm_mul_ps(
x, _mm_mul_ps(
x,
x));
770 __m128 xf = _bli_math_fastpow(0x3f2aaaab, 0x5eb504f3, arg);
771 __m128 xover = _mm_mul_ps(arg, xf);
772 __m128 xfm1 = _mm_rsqrt_ps(xf);
773 __m128
x2 = _mm_mul_ps(arg, arg);
774 __m128 xunder = _mm_mul_ps(
x2, xfm1);
776 __m128 xavg = _mm_mul_ps(_mm_set1_ps(1.0f / (3.0f * 0.629960524947437f) * 0.999852f),
777 _mm_add_ps(xover, xunder));
778 xavg = _mm_mul_ps(xavg, _mm_rsqrt_ps(xavg));
779 xavg = _mm_mul_ps(xavg, _mm_rsqrt_ps(xavg));
783 MALWAYS_INLINE __m128 _bli_math_blend_sse(
const __m128
mask,
const __m128
a,
const __m128 b)
785 return _mm_or_ps(_mm_and_ps(
mask,
a), _mm_andnot_ps(
mask, b));
793 return (
unsigned char)((
794 (val <= 0.0f) ? 0 : ((val > (1.0f - 0.5f / 255.0f)) ? 255 : ((255.0f * val) + 0.5f))));
796 #define unit_float_to_uchar_clamp(val) \
797 ((CHECK_TYPE_INLINE(val, float)), unit_float_to_uchar_clamp(val))
801 return (
unsigned short)((val >= 1.0f - 0.5f / 65535) ?
803 (val <= 0.0f) ? 0 : (val * 65535.0f + 0.5f));
805 #define unit_float_to_ushort_clamp(val) \
806 ((CHECK_TYPE_INLINE(val, float)), unit_float_to_ushort_clamp(val))
810 return (
unsigned char)(((val) >= 65535 - 128) ? 255 : ((val) + 128) >> 8);
812 #define unit_ushort_to_uchar(val) \
813 ((CHECK_TYPE_INLINE(val, unsigned short)), unit_ushort_to_uchar(val))
815 #define unit_float_to_uchar_clamp_v3(v1, v2) \
817 (v1)[0] = unit_float_to_uchar_clamp((v2[0])); \
818 (v1)[1] = unit_float_to_uchar_clamp((v2[1])); \
819 (v1)[2] = unit_float_to_uchar_clamp((v2[2])); \
822 #define unit_float_to_uchar_clamp_v4(v1, v2) \
824 (v1)[0] = unit_float_to_uchar_clamp((v2[0])); \
825 (v1)[1] = unit_float_to_uchar_clamp((v2[1])); \
826 (v1)[2] = unit_float_to_uchar_clamp((v2[2])); \
827 (v1)[3] = unit_float_to_uchar_clamp((v2[3])); \
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 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 x2
_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
MINLINE int round_fl_to_int_clamp(float a)
MINLINE unsigned char round_fl_to_uchar(float a)
MINLINE float max_fff(float a, float b, float c)
MINLINE float saacos(float fac)
#define _round_clamp_fl_impl(arg, ty, min, max)
MINLINE unsigned short round_fl_to_ushort_clamp(float a)
MINLINE float max_ffff(float a, float b, float c, float d)
MINLINE unsigned int round_db_to_uint_clamp(double a)
MINLINE unsigned int log2_ceil_u(unsigned int x)
MINLINE signed char round_fl_to_char(float a)
MINLINE int power_of_2_min_i(int n)
MINLINE int round_fl_to_int(float a)
MINLINE short round_db_to_short_clamp(double a)
MINLINE signed char round_db_to_char_clamp(double a)
MINLINE float max_ff(float a, float b)
MINLINE unsigned int cube_uint(unsigned int a)
MINLINE size_t min_zz(size_t a, size_t b)
MINLINE int min_ii(int a, int b)
MINLINE uint divide_ceil_u(uint a, uint b)
MINLINE short round_db_to_short(double a)
MINLINE float saasinf(float fac)
MINLINE int power_of_2_max_i(int n)
MINLINE float fractf(float a)
MINLINE int compare_ff(float a, float b, const float max_diff)
MINLINE float power_of_2(float val)
MINLINE float sasqrtf(float fac)
MINLINE float min_ffff(float a, float b, float c, float d)
MINLINE unsigned int power_of_2_max_u(unsigned int x)
#define _round_fl_impl(arg, ty)
MINLINE int cube_i(int a)
#define _round_db_impl(arg, ty)
MINLINE unsigned short round_fl_to_ushort(float a)
MINLINE float pow2f(float x)
MINLINE unsigned int round_fl_to_uint_clamp(float a)
MINLINE double square_d(double a)
#define unit_float_to_ushort_clamp(val)
MINLINE double ratiod(double min, double max, double pos)
MINLINE float clamp_f(float value, float min, float max)
MINLINE int divide_floor_i(int a, int b)
MINLINE float min_ff(float a, float b)
MINLINE size_t max_zz(size_t a, size_t b)
MINLINE int cube_s(short a)
MINLINE int integer_digits_d(const double d)
MINLINE int square_i(int a)
MINLINE short round_fl_to_short_clamp(float a)
MINLINE float pow5f(float x)
MINLINE int max_ii(int a, int b)
MINLINE short round_fl_to_short(float a)
MINLINE unsigned int round_db_to_uint(double a)
#define unit_float_to_uchar_clamp(val)
MINLINE unsigned int power_of_2_min_u(unsigned int x)
MINLINE double min_dd(double a, double b)
MINLINE signed char round_fl_to_char_clamp(float a)
MINLINE float smoothminf(float a, float b, float c)
MINLINE float cube_f(float a)
MINLINE unsigned short round_db_to_ushort_clamp(double a)
MINLINE float scalenorm(float a, float b, float x)
MINLINE unsigned char round_fl_to_uchar_clamp(float a)
MINLINE double cube_d(double a)
MINLINE int min_iii(int a, int b, int c)
MINLINE int divide_round_i(int a, int b)
MINLINE int integer_digits_f(const float f)
MINLINE int integer_digits_i(const int i)
MINLINE int mod_i(int i, int n)
#define unit_ushort_to_uchar(val)
MINLINE double interpd(double target, double origin, double fac)
MINLINE float square_f(float a)
MINLINE unsigned int round_fl_to_uint(float a)
MINLINE float pingpongf(float value, float scale)
MINLINE float interpf(float target, float origin, float fac)
MINLINE float sqrtf_signed(float f)
MINLINE double max_dd(double a, double b)
MINLINE int round_db_to_int_clamp(double a)
MINLINE char min_cc(char a, char b)
MINLINE signed char round_db_to_char(double a)
MINLINE int is_power_of_2_i(int n)
MINLINE float pow3f(float x)
MINLINE int compare_ff_relative(float a, float b, const float max_diff, const int max_ulps)
MINLINE double sqrt3d(double d)
MINLINE int round_db_to_int(double a)
MINLINE int max_iiii(int a, int b, int c, int d)
MINLINE float min_fff(float a, float b, float c)
MINLINE int signum_i_ex(float a, float eps)
MINLINE int min_iiii(int a, int b, int c, int d)
MINLINE float saasin(float fac)
MINLINE unsigned int log2_floor_u(unsigned int x)
MINLINE float signf(float f)
MINLINE int max_iii(int a, int b, int c)
MINLINE size_t clamp_z(size_t value, size_t min, size_t max)
MINLINE unsigned short round_db_to_ushort(double a)
MINLINE int clamp_i(int value, int min, int max)
MINLINE int signum_i(float a)
MINLINE float ratiof(float min, float max, float pos)
#define _round_clamp_db_impl(arg, ty, min, max)
MINLINE int cube_uchar(unsigned char a)
MINLINE unsigned int square_uint(unsigned int a)
MINLINE int square_s(short a)
MINLINE float compatible_signf(float f)
MINLINE float sasqrt(float fac)
MINLINE unsigned char round_db_to_uchar_clamp(double a)
MINLINE int square_uchar(unsigned char a)
MINLINE float pow4f(float x)
MINLINE float sqrt3f(float f)
MINLINE char max_cc(char a, char b)
MINLINE float pow7f(float x)
MINLINE float wrapf(float value, float max, float min)
MINLINE unsigned char round_db_to_uchar(double a)
MINLINE float saacosf(float fac)
INLINE Rall1d< T, V, S > pow(const Rall1d< T, V, S > &arg, double m)
INLINE Rall1d< T, V, S > log(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > exp(const Rall1d< T, V, S > &arg)
__forceinline const avxi abs(const avxi &a)
ccl_device_inline float2 floor(const float2 &a)
ccl_device_inline float2 fabs(const float2 &a)
ccl_device_inline float3 ceil(const float3 &a)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)