154 #if !defined(SESI_ALLOW_DRAND48)
160 #define srand48(X) static_assert(0, "Use SYSsrand48() instead")
161 #define drand48(X) 0; { static_assert(0, "Use SYSdrand48() instead"); }
168 template<
typename F >
172 return int(F(0) <
a) -
int(
a < F(0));
176 template<
typename F >
177 constexpr
inline bool
214 #if defined(__cplusplus)
220 #define h_min(a, b) (((a) > (b)) ? (b) : (a))
221 #define h_argmin(a, b) (((a) > (b)) ? 1 : 0)
222 #define h_max(a, b) (((a) < (b)) ? (b) : (a))
223 #define h_argmax(a, b) (((a) < (b)) ? 1 : 0)
225 #define h_abs(a) (((a) > 0) ? (a) : -(a))
226 #define h_sgn(a) (((a) > 0) ? 1 : (((a) < 0) ? -1 : 0))
232 static constexpr
inline int16 SYSsgn(
int16 a) {
return h_sgn(a); }
233 static constexpr
inline int SYSargmin(
int16 a,
int16 b) {
return h_argmin(a,b);}
234 static constexpr
inline int SYSargmax(
int16 a,
int16 b) {
return h_argmax(a,b);}
238 static constexpr
inline int32 SYSsgn(
int32 a) {
return h_sgn(a); }
239 static constexpr
inline int SYSargmin(
int32 a,
int32 b) {
return h_argmin(a,b);}
240 static constexpr
inline int SYSargmax(
int32 a,
int32 b) {
return h_argmax(a,b);}
248 static constexpr
inline int64 SYSsgn(
int64 a) {
return h_sgn(a); }
249 static constexpr
inline int SYSargmin(
int64 a,
int64 b) {
return h_argmin(a,b);}
250 static constexpr
inline int SYSargmax(
int64 a,
int64 b) {
return h_argmax(a,b);}
253 static constexpr
inline int SYSargmin(
uint16 a,
uint16 b) {
return h_argmin(a,b);}
254 static constexpr
inline int SYSargmax(
uint16 a,
uint16 b) {
return h_argmax(a,b);}
257 static constexpr
inline int SYSargmin(
uint32 a,
uint32 b) {
return h_argmin(a,b);}
258 static constexpr
inline int SYSargmax(
uint32 a,
uint32 b) {
return h_argmax(a,b);}
261 static constexpr
inline int SYSargmin(
uint64 a,
uint64 b) {
return h_argmin(a,b);}
262 static constexpr
inline int SYSargmax(
uint64 a,
uint64 b) {
return h_argmax(a,b);}
281 static constexpr
inline size_t SYSmin(
size_t a,
size_t b) {
return h_min(a,b); }
282 static constexpr
inline size_t SYSmax(
size_t a,
size_t b) {
return h_max(a,b); }
283 static constexpr
inline int SYSargmin(
size_t a,
size_t b) {
return h_argmin(a,b);}
284 static constexpr
inline int SYSargmax(
size_t a,
size_t b) {
return h_argmax(a,b);}
285 static constexpr
inline size_t SYSmin(
long a,
long b) {
return h_min(a,b); }
286 static constexpr
inline size_t SYSmax(
long a,
long b) {
return h_max(a,b); }
287 static constexpr
inline int SYSargmin(
long a,
long b) {
return h_argmin(a,b);}
288 static constexpr
inline int SYSargmax(
long a,
long b) {
return h_argmax(a,b);}
296 #define h_clamp(val, min, max, tol) \
297 ((val <= min+tol) ? min : ((val >= max-tol) ? max : val))
299 static constexpr
inline int
301 {
return h_clamp(v, min, max, 0); }
303 static constexpr
inline uint
305 {
return h_clamp(v, min, max, 0); }
307 static constexpr
inline int64
311 static constexpr
inline uint64
317 {
return h_clamp(v, min, max, tol); }
321 {
return h_clamp(v, min, max, tol); }
326 static constexpr
inline float SYSclamp01(
float v)
328 static constexpr
inline double SYSclamp01(
double v)
332 static constexpr
inline float SYSclamp01_excl1(
float v)
333 {
return SYSclamp(v, 0.
f, 1.
f - FLT_EPSILON/FLT_RADIX); }
334 static constexpr
inline double SYSclamp01_excl1(
double v)
335 {
return SYSclamp(v, 0.0, 1.0 - DBL_EPSILON/FLT_RADIX); }
339 template<
typename OUTTYPE,
typename INTYPE>
340 constexpr OUTTYPE SYSclampInt(INTYPE
value)
344 return OUTTYPE(value);
349 # define SYS_MF(X) SYS_FastMath::X
351 # define SYS_MF(X) ::X
354 #define SYS_UNARY(func) \
355 static inline fpreal64 SYS##func(fpreal64 arg) \
356 { return SYS_MF(func)(arg); } \
357 static inline fpreal32 SYS##func(fpreal32 arg) \
358 { return SYS_MF(func##f)(arg); } \
359 static inline fpreal64 SYS##func(int64 arg) \
360 { return SYS_MF(func)((fpreal64)arg); } \
361 static inline fpreal64 SYS##func(int32 arg) \
362 { return SYS_MF(func)((fpreal64)arg); } \
364 #define SYS_BINARY(func) \
365 static inline fpreal64 SYS##func(fpreal64 a, fpreal64 b) \
366 { return SYS_MF(func)(a,b); } \
367 static inline fpreal32 SYS##func(fpreal32 a, fpreal32 b) \
368 { return SYS_MF(func##f)(a, b); } \
372 #define hypotf(x,y) hypot((x),(y))
395 {
return x > 0 ? SYSsqrt(x) : 0; }
397 {
return x > 0 ? SYSsqrt(x) : 0; }
399 {
return y != 0 ? SYSfmod(x, y) : 0; }
401 {
return y != 0 ? SYSfmod(x, y) : 0; }
417 { __sincosf(x,s,c); }
423 __sincosf(x,&s32,&c32);
429 { *s = SYSsin(x); *c = SYScos(x); }
431 { *s = SYSsin(x); *c = SYScos(x); }
437 #include <xmmintrin.h>
441 #if defined(WIN32) || defined(LINUX) || defined(MBSD)
447 vec = _mm_rsqrt_ss(vec);
450 return 1.0f/SYSsqrt(x);
457 #if defined(WIN32) || defined(LINUX) || defined(MBSD)
458 fpreal32 approximate = SYSrsqrt11(x);
502 {
return SYS_MF(
atanf)(
a); }
510 {
return SYS_MF(
atan) (
a); }
512 {
return SYS_MF(
atan2)(
y,
x); }
515 {
return SYSpow(x, x < 0 ?
SYSrint(y) : y); }
517 {
return SYSpow(x, x < 0 ?
SYSrint(y) : y); }
524 {
return SYSsafediv( (
fpreal32)1, a ); }
526 {
return SYSsafediv( (
fpreal64)1, a ); }
546 static constexpr
inline fpreal32 SYSpow4(
fpreal32 a) {
return SYSpow2(SYSpow2(a)); }
547 static constexpr
inline fpreal64 SYSpow4(
fpreal64 a) {
return SYSpow2(SYSpow2(a)); }
551 #define h_compare(func, code) \
552 static inline bool func(fpreal32 a, fpreal32 b, \
553 fpreal32 tol=SYS_FTOLERANCE) \
555 static inline bool func(fpreal64 a, fpreal64 b, \
556 fpreal64 tol=SYS_FTOLERANCE_D) \
558 #define h_compare_ce(func, code) \
559 static constexpr inline bool func(fpreal32 a, fpreal32 b, \
560 fpreal32 tol=SYS_FTOLERANCE) \
562 static constexpr inline bool func(fpreal64 a, fpreal64 b, \
563 fpreal64 tol=SYS_FTOLERANCE_D) \
566 static constexpr
inline bool
568 {
return a >= -tol && a <= tol; }
570 static constexpr
inline bool
572 {
return a >= -tol && a <= tol; }
574 static constexpr
inline bool
576 {
return a >= -tol && a <= tol; }
578 static constexpr
inline bool
580 {
return a >= -tol && a <= tol; }
582 h_compare(SYSisEqual,
SYSabs(a-
b)<=tol)
583 h_compare_ce(SYSisGreater, (a-
b) > tol)
584 h_compare_ce(SYSisGreaterOrEqual, (a-
b) >= -tol)
585 h_compare_ce(SYSisLess, (a-
b) < -tol)
586 h_compare_ce(SYSisLessOrEqual, (a-
b) <= tol)
590 constexpr
inline bool SYSisEqual(
int32 a,
int32 b) {
return a ==
b; }
591 constexpr
inline bool SYSisEqual(
int64 a,
int64 b) {
return a ==
b; }
592 constexpr
inline bool SYSisGreater(
int32 a,
int32 b) {
return a >
b; }
593 constexpr
inline bool SYSisGreater(
int64 a,
int64 b) {
return a >
b; }
594 constexpr
inline bool SYSisGreaterOrEqual(
int32 a,
int32 b) {
return a >=
b; }
595 constexpr
inline bool SYSisGreaterOrEqual(
int64 a,
int64 b) {
return a >=
b; }
596 constexpr
inline bool SYSisLess(
int32 a,
int32 b) {
return a <
b; }
597 constexpr
inline bool SYSisLess(
int64 a,
int64 b) {
return a <
b; }
598 constexpr
inline bool SYSisLessOrEqual(
int32 a,
int32 b) {
return a <=
b; }
599 constexpr
inline bool SYSisLessOrEqual(
int64 a,
int64 b) {
return a <=
b; }
609 if (SYSfabs(a - b) <= tol)
622 if ((ai.
fval < 0.0) != (bi.
fval < 0.0))
643 if (SYSfabs(a - b) <= tol)
656 if ((ai.
fval < 0.0) != (bi.
fval < 0.0))
670 return SYSalmostEqual(a, b, (
int64)ulps, tol);
674 {
return SYSisEqual(val,
SYSfloor(val)) || SYSisEqual(val,
SYSceil(val)); }
676 {
return SYSisEqual(val,
SYSfloor(val)) || SYSisEqual(val,
SYSceil(val)); }
678 #define h_max3(type) \
679 static constexpr inline type \
680 SYSmax(type v0, type v1, type v2) { \
681 return SYSmax(v2, SYSmax(v0, v1)); \
683 #define h_max4(type) \
684 static constexpr inline type \
685 SYSmax(type v0, type v1, type v2, type v3) { \
686 return SYSmax(SYSmax(v0, v1), SYSmax(v2, v3)); \
688 #define h_argmax3(type) \
689 static constexpr inline int \
690 SYSargmax(type v0, type v1, type v2) { \
691 return v2 > SYSmax(v0, v1) ? 2 : SYSargmax(v0, v1); \
693 #define h_argmax4(type) \
694 static constexpr inline int \
695 SYSargmax(type v0, type v1, type v2, type v3) { \
696 return SYSmax(v0, v1) < SYSmax(v2, v3) ? \
697 (SYSargmax(v2, v3) + 2) : SYSargmax(v0, v1); \
699 #define h_min3(type) \
700 static constexpr inline type \
701 SYSmin(type v0, type v1, type v2) { \
702 return SYSmin(v2, SYSmin(v0, v1)); \
704 #define h_min4(type) \
705 static constexpr inline type \
706 SYSmin(type v0, type v1, type v2, type v3) { \
707 return SYSmin(SYSmin(v0, v1), SYSmin(v2, v3)); \
709 #define h_argmin3(type) \
710 static constexpr inline int \
711 SYSargmin(type v0, type v1, type v2) { \
712 return v2 < SYSmin(v0, v1) ? 2 : SYSargmin(v0, v1); \
714 #define h_argmin4(type) \
715 static constexpr inline int \
716 SYSargmin(type v0, type v1, type v2, type v3) { \
717 return SYSmin(v0, v1) > SYSmin(v2, v3) ? \
718 (SYSargmin(v2, v3) + 2) : SYSargmin(v0, v1); \
722 #define h_max(type) h_min3(type) h_min4(type) h_max3(type) h_max4(type) \
723 h_argmin3(type) h_argmin4(type) \
724 h_argmax3(type) h_argmax4(type)
726 #define h_avg3(type) \
727 static constexpr inline type \
728 SYSavg(type v0, type v1, type v2) { \
729 return (v0+v1+v2) * ((type)(1.0/3.0)); \
731 #define h_avg4(type) \
732 static constexpr inline type \
733 SYSavg(type v0, type v1, type v2, type v3) { \
734 return (v0+v1+v2+v3) * ((type)0.25); \
737 #define h_avg(type) h_avg3(type) h_avg4(type)
750 static constexpr inline
int32
752 {
return (a + b + c + 1) / 3; }
753 static constexpr
inline int32
755 {
return (a + b + c + d + 2) / 4; }
757 static constexpr
inline int64
759 {
return (a + b + c + 1) / 3; }
760 static constexpr
inline int64
762 {
return (a + b + c + d + 2) / 4; }
787 return v1 + (v2 -
v1)*t;
793 return v1 + (v2 -
v1)*t;
834 return v0*(1-u-
v) + v1*u + v2*v;
840 return v0*(1-u-
v) + v1*u + v2*v;
853 return ((a < 0) ^ (b < 0) && r != 0.0
f) ? r+b :
r;
860 return ((a < 0) ^ (b < 0) && r != 0.0) ? r+b :
r;
863 static constexpr
inline int32
869 return ((a < 0) ^ (b < 0) && r) ? r+b :
r;
872 static constexpr
inline int64
878 return ((a < 0) ^ (b < 0) && r) ? r+b :
r;
884 if (val <= min)
return 0;
885 if (val >= max)
return 1;
895 if (val <= min)
return 0;
896 if (val >= max)
return 1;
910 (
fpreal32)1/roll) : SYSpow(f, roll);
920 fpreal64 f = SYSsmooth(min, max, value);
922 (
fpreal64)1/roll) : SYSpow(f, roll);
931 fpreal32 tmp = (d == 0) ? 0.5f * (nmin+nmax) :
SYSlerp(nmin, nmax, (val-omin)/d);
940 fpreal64 tmp = (d == 0) ? 0.5 * (nmin+nmax) :
SYSlerp(nmin, nmax, (val-omin)/d);
950 return (d == 0) ? 0.5f * (nmin+nmax) :
SYSlerp(nmin, nmax, (v-omin)/d);
957 return (d == 0) ? 0.5 * (nmin+nmax) :
SYSlerp(nmin, nmax, (v-omin)/d);
963 if (val < 0)
return nmin;
964 if (val > 1)
return nmax;
965 return SYSlerp(nmin, nmax, val);
971 if (val < 0)
return nmin;
972 if (val > 1)
return nmax;
973 return SYSlerp(nmin, nmax, val);
981 return SYSefit(v, omin, omax, 0.0f, 1.0f);
987 return SYSefit(v, omin, omax, 0.0, 1.0);
995 return (ax > dx ? 0 : 1 - ax / dx);
1002 return (ax > dx ? 0 : 1 - ax / dx);
1020 template<
typename T>
1022 SYSroundDownToMultipleOf(T val, T multiple)
1028 int rem = val % multiple;
1033 return val - multiple - rem;
1044 fpreal32 modulus = SYSfmod(val, multiple);
1059 fpreal64 modulus = SYSfmod(val, multiple);
1068 template<
typename T>
1070 SYSroundUpToMultipleOf(T val, T multiple)
1076 int rem = val % multiple;
1083 return val + multiple - rem;
1093 modulus = SYSfmod(val, multiple);
1098 return val - modulus;
1108 modulus = SYSfmod(val, multiple);
1113 return val - modulus;
1117 SYSroundUpPow2(
uint32 val)
1133 static constexpr
inline uint32
1134 SYSwang_inthash(
uint32 key)
1137 key += ~(key << 16);
1147 static constexpr
inline uint32
1148 SYSmultiplicative_inthash(
uint32 key)
1153 return key * 2654435761u;
1156 static constexpr
inline uint64
1157 SYSmultiplicative_inthash64(
uint64 key)
1160 return key * 11400714819323198485llu;
1163 static constexpr
inline uint64
1164 SYSwang_inthash64(
uint64 key)
1167 key += ~(key << 32ULL);
1169 key += ~(key << 13);
1173 key += ~(key << 27);
1178 static constexpr
inline uint32
1179 SYSsharpe_inthash(
uint32 key)
1188 key ^= ~(key >> 15);
1194 static constexpr
inline uint32
1195 SYSwang2_inthash(
uint32 key)
1199 constexpr
uint c2=0x27d4eb2d;
1200 key = (key ^ 61) ^ (key >> 16);
1201 key = key + (key << 3);
1202 key = key ^ (key >> 4);
1204 key = key ^ (key >> 15);
1208 static constexpr
inline uint64
1209 SYSwang2_inthash(
uint64 key)
1213 key = (~key) + (key << 21);
1214 key = key ^ (key >> 24);
1215 key = (key + (key << 3)) + (key << 8);
1216 key = key ^ (key >> 14);
1217 key = (key + (key << 2)) + (key << 4);
1218 key = key ^ (key >> 28);
1219 key = key + (key << 31);
1224 SYSreal_hash(
fpreal16 a,
int lowmask=0x3)
1226 return SYSwang_inthash(a.
bits() & (~lowmask));
1230 SYSreal_hashseed(
fpreal16 a,
uint seed,
int lowmask=0x3)
1232 return SYSwang_inthash(seed + (a.
bits() & (~lowmask)));
1236 SYSreal_hash(
fpreal32 a,
int lowmask=0xf)
1240 return SYSwang_inthash(ai.
uval & (~lowmask));
1244 SYSreal_hashseed(
fpreal32 a,
uint seed,
int lowmask=0xf)
1248 return SYSwang_inthash(seed + (ai.
uval & (~lowmask)));
1252 SYSreal_hash(
fpreal64 a,
int lowmask=0xf)
1256 return SYSwang_inthash64(ai.
uval & (~lowmask));
1264 return SYSwang_inthash64(seed + (ai.
uval & (~lowmask)));
1267 static constexpr
inline uint
1268 SYSvector_hash(
const int32 *vector,
int size)
1271 for (
int i = 0; i <
size; ++i)
1272 hash = SYSwang_inthash(hash + vector[i]);
1276 static constexpr
inline uint
1277 SYSvector_hash(
const int64 *vector,
int size)
1280 for (
int i = 0; i <
size; ++i)
1281 hash = (
uint)SYSwang_inthash64(hash + vector[i]);
1286 SYSvector_hash(
const fpreal16 *vector,
int size)
1289 for (
int i = 0; i <
size; ++i)
1290 hash = SYSreal_hashseed(vector[i], hash);
1295 SYSvector_hash(
const fpreal32 *vector,
int size)
1298 for (
int i = 0; i <
size; ++i)
1299 hash = SYSreal_hashseed(vector[i], hash);
1304 SYSvector_hash(
const fpreal64 *vector,
int size)
1307 for (
int i = 0; i <
size; ++i)
1308 hash = SYSreal_hashseed(vector[i], hash);
1317 static inline size_t
1318 SYSvector3_hash(
const P &vector)
1320 static constexpr
size_t p1 = 73856093;
1321 static constexpr
size_t p2 = 19349663;
1322 static constexpr
size_t p3 = 83492791;
1324 return size_t(vector.x()*p1) ^
size_t(vector.y()*p2) ^
size_t(vector.z()*p3);
1327 static inline size_t
1328 SYSpointerHash(
const void *
ptr)
1334 return v ^ (v >> 29);
1339 SYShashToFloat01(
uint hash)
1342 tmp.
uval = 0x3f800000 | (0x007fffff & hash);
1343 return tmp.
fval-1.0F;
1348 SYSfastRandom(
uint &seed)
1350 seed = seed*1664525 + 1013904223;
1351 return SYShashToFloat01(seed);
1355 SYSrandom(
uint &seed)
1357 seed = seed*1664525 + 1013904223;
1358 return SYShashToFloat01(SYSwang_inthash(seed));
1361 static constexpr
uint
1362 SYSfastRandomInt(
uint &seed)
1364 seed = seed*1664525 + 1013904223;
1365 return SYSwang_inthash(seed);
1369 SYSfastRandomZero(
uint &seed)
1371 return SYSfastRandom(seed) - 0.5F;
1375 SYSrandomZero(
uint &seed)
1377 return SYSrandom(seed) - 0.5F;
1380 template <
typename T>
1381 static constexpr
inline void
1382 SYSminmax(T
v0, T
v1, T
v2, T
v3, T &min, T &max)
1384 min =
SYSmin(v0, v1, v2, v3);
1385 max =
SYSmax(v0, v1, v2, v3);
1388 template <
typename T>
1389 static constexpr
inline void
1390 SYSminmax(T
v0, T
v1, T
v2, T &min, T &max)
1392 min =
SYSmin(v0, v1, v2);
1393 max =
SYSmax(v0, v1, v2);
1396 template <
typename T>
1397 static constexpr
inline void
1398 SYSminmax(T
v0, T
v1, T &min, T &max)
1408 sintheta = slope / SYSsqrt(slope*slope + (
fpreal32)1);
1412 costheta = one_over_m / SYSsqrt(one_over_m*one_over_m + 1);
1415 costheta = SYSsqrt((
fpreal32)1 - sintheta*sintheta);
1422 sintheta = slope / SYSsqrt(slope*slope + (
fpreal64)1);
1426 costheta = one_over_m / SYSsqrt(one_over_m*one_over_m + 1);
1429 costheta = SYSsqrt((
fpreal64)1 - sintheta*sintheta);
1432 inline constexpr
static bool
1438 inline constexpr
static bool
1444 inline constexpr
static bool
1447 return (v0 ^ v1) >= 0;
1450 inline constexpr
static bool
1453 return (v0 ^ v1) >= 0;
1462 static constexpr
inline int
1463 SYShexCharToInt(
char c)
1467 if (c >=
'0' && c <=
'9')
1469 if (c >=
'a' && c <=
'f')
1470 return c -
'a' + 10;
1471 if (c >=
'A' && c <=
'F')
1472 return c -
'A' + 10;
1476 static constexpr
inline char
1477 SYSintToHexChar(
int value)
1480 return value < 10 ?
'0' + value :
'a' + value - 10;
1483 SYS_API void SYSsort(
int &a,
int &b);
1484 SYS_API void SYSsort(
int &a,
int &b,
int &c);
1487 SYS_API void SYSsort(
float &a,
float &b);
1488 SYS_API void SYSsort(
float &a,
float &b,
float &c);
1489 SYS_API void SYSsort(
double &a,
double &b);
1490 SYS_API void SYSsort(
double &a,
double &b,
double &c);
1494 static constexpr
inline void
1501 static constexpr
inline void
1513 #define SYSmax(a,b) ((a) > (b) ? (a) : (b))
1514 #define SYSmin(a,b) ((a) < (b) ? (a) : (b))
1515 #define SYSabs(a) ((a) < 0 ? (a) : -(a))
SYS_API float acosf(float x)
SYS_API double cos(double x)
GLboolean GLboolean GLboolean b
SYS_API double fmod(double x, double y)
SYS_API double atan2(double y, double x)
UT_Vector3T< T > SYSrecip(const UT_Vector3T< T > &v)
SYS_API double expm1(double x)
SYS_API void SYSsrand48(long seed)
bool SYSisFinite(fpreal64 f)
bool SYSisInteger(const UT_Vector2T< T > &v1)
Componentwise integer test.
vfloat4 sqrt(const vfloat4 &a)
OIIO_HOSTDEVICE void sincos(float x, float *sine, float *cosine)
constexpr bool SYSisNan(const F f)
SYS_API float atan2f(float y, float x)
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
UT_Matrix2T< T > SYSbilerp(const UT_Matrix2T< T > &u0v0, const UT_Matrix2T< T > &u1v0, const UT_Matrix2T< T > &u0v1, const UT_Matrix2T< T > &u1v1, S u, S v)
Bilinear interpolation.
UT_Matrix2T< T > SYSlerp(const UT_Matrix2T< T > &v1, const UT_Matrix2T< T > &v2, S t)
unsigned long long uint64
SYS_API double log10(double x)
UT_Matrix2T< T > SYSbarycentric(const UT_Matrix2T< T > &v0, const UT_Matrix2T< T > &v1, const UT_Matrix2T< T > &v2, S u, S v)
Barycentric interpolation.
SYS_API float log10f(float x)
ImageBuf OIIO_API pow(const ImageBuf &A, cspan< float > B, ROI roi={}, int nthreads=0)
SYS_API double asin(double x)
IMATH_HOSTDEVICE constexpr int trunc(T x) IMATH_NOEXCEPT
SYS_API double sinh(double x)
GLfloat GLfloat GLfloat v2
SYS_API double copysign(double x, double y)
INT32 INT32 * denominator
SYS_API float atanf(float x)
SYS_API fpreal32 SYSroundAngle(fpreal32 base, fpreal32 source)
GLsizei GLsizei GLchar * source
GLboolean GLboolean GLboolean GLboolean a
UT_Vector3T< T > SYSclamp(const UT_Vector3T< T > &v, const UT_Vector3T< T > &min, const UT_Vector3T< T > &max)
SYS_API double cosh(double x)
SYS_API bool SYSisPrime(uint num)
SYS_API void sincosf(float x, float *s, float *c)
constexpr int SYSsignum(const F a) noexcept
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer
SYS_API double SYSdrand48()
SYS_API fpreal32 SYSfloor(fpreal32 val)
UT_Vector2T< T > SYSinvlerp(const UT_Vector2T< T > &a, const UT_Vector2T< T > &v1, const UT_Vector2T< T > &v2)
Componentwise inverse linear interpolation.
SYS_API float logf(float x)
GLfloat GLfloat GLfloat GLfloat v3
SYS_API double acos(double x)
SYS_API bool SYSisInt(const char *str)
SYS_API double hypot(double x, double y)
fpreal32 SYSrint(fpreal32 val)
SYS_API double log1p(double x)
SYS_API double tanh(double x)
bool SYSequalZero(const UT_Vector3T< T > &v)
SYS_API uint SYSmakePrime(uint num)
SYS_API double tan(double x)
SYS_API double atan(double x)
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
SYS_API float asinf(float x)
INT64 INT64 INT64 remainder
unsigned short bits() const
OIIO_FORCEINLINE T log(const T &v)
SYS_API bool SYSisFloat(const char *str)
SYS_API double sin(double x)
SYS_API fpreal32 SYSceil(fpreal32 val)