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);}
292 #define h_clamp(val, min, max, tol) \
293 ((val <= min+tol) ? min : ((val >= max-tol) ? max : val))
295 static constexpr
inline int
297 {
return h_clamp(v, min, max, 0); }
299 static constexpr
inline uint
301 {
return h_clamp(v, min, max, 0); }
303 static constexpr
inline int64
307 static constexpr
inline uint64
313 {
return h_clamp(v, min, max, tol); }
317 {
return h_clamp(v, min, max, tol); }
322 static constexpr
inline float SYSclamp01(
float v)
324 static constexpr
inline double SYSclamp01(
double v)
328 static constexpr
inline float SYSclamp01_excl1(
float v)
329 {
return SYSclamp(v, 0.
f, 1.
f - FLT_EPSILON/FLT_RADIX); }
330 static constexpr
inline double SYSclamp01_excl1(
double v)
331 {
return SYSclamp(v, 0.0, 1.0 - DBL_EPSILON/FLT_RADIX); }
335 template<
typename OUTTYPE,
typename INTYPE>
336 constexpr OUTTYPE SYSclampInt(INTYPE
value)
340 return OUTTYPE(value);
345 # define SYS_MF(X) SYS_FastMath::X
347 # define SYS_MF(X) ::X
350 #define SYS_UNARY(func) \
351 static inline fpreal64 SYS##func(fpreal64 arg) \
352 { return SYS_MF(func)(arg); } \
353 static inline fpreal32 SYS##func(fpreal32 arg) \
354 { return SYS_MF(func##f)(arg); } \
355 static inline fpreal64 SYS##func(int64 arg) \
356 { return SYS_MF(func)((fpreal64)arg); } \
357 static inline fpreal64 SYS##func(int32 arg) \
358 { return SYS_MF(func)((fpreal64)arg); } \
360 #define SYS_BINARY(func) \
361 static inline fpreal64 SYS##func(fpreal64 a, fpreal64 b) \
362 { return SYS_MF(func)(a,b); } \
363 static inline fpreal32 SYS##func(fpreal32 a, fpreal32 b) \
364 { return SYS_MF(func##f)(a, b); } \
368 #define hypotf(x,y) hypot((x),(y))
391 {
return x > 0 ? SYSsqrt(x) : 0; }
393 {
return x > 0 ? SYSsqrt(x) : 0; }
395 {
return y != 0 ? SYSfmod(x, y) : 0; }
397 {
return y != 0 ? SYSfmod(x, y) : 0; }
413 { __sincosf(x,s,c); }
419 __sincosf(x,&s32,&c32);
425 { *s = SYSsin(x); *c = SYScos(x); }
427 { *s = SYSsin(x); *c = SYScos(x); }
433 #include <xmmintrin.h>
437 #if defined(WIN32) || defined(LINUX) || defined(MBSD)
443 vec = _mm_rsqrt_ss(vec);
446 return 1.0f/SYSsqrt(x);
453 #if defined(WIN32) || defined(LINUX) || defined(MBSD)
454 fpreal32 approximate = SYSrsqrt11(x);
498 {
return SYS_MF(
atanf)(
a); }
506 {
return SYS_MF(
atan) (
a); }
508 {
return SYS_MF(
atan2)(
y,
x); }
511 {
return SYSpow(x, x < 0 ?
SYSrint(y) : y); }
513 {
return SYSpow(x, x < 0 ?
SYSrint(y) : y); }
520 {
return SYSsafediv( (
fpreal32)1, a ); }
522 {
return SYSsafediv( (
fpreal64)1, a ); }
542 static constexpr
inline fpreal32 SYSpow4(
fpreal32 a) {
return SYSpow2(SYSpow2(a)); }
543 static constexpr
inline fpreal64 SYSpow4(
fpreal64 a) {
return SYSpow2(SYSpow2(a)); }
547 #define h_compare(func, code) \
548 static inline bool func(fpreal32 a, fpreal32 b, \
549 fpreal32 tol=SYS_FTOLERANCE) \
551 static inline bool func(fpreal64 a, fpreal64 b, \
552 fpreal64 tol=SYS_FTOLERANCE_D) \
554 #define h_compare_ce(func, code) \
555 static constexpr inline bool func(fpreal32 a, fpreal32 b, \
556 fpreal32 tol=SYS_FTOLERANCE) \
558 static constexpr inline bool func(fpreal64 a, fpreal64 b, \
559 fpreal64 tol=SYS_FTOLERANCE_D) \
562 static constexpr
inline bool
564 {
return a >= -tol && a <= tol; }
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 h_compare(SYSisEqual,
SYSabs(a-
b)<=tol)
579 h_compare_ce(SYSisGreater, (a-
b) > tol)
580 h_compare_ce(SYSisGreaterOrEqual, (a-
b) >= -tol)
581 h_compare_ce(SYSisLess, (a-
b) < -tol)
582 h_compare_ce(SYSisLessOrEqual, (a-
b) <= tol)
586 constexpr
inline bool SYSisEqual(
int32 a,
int32 b) {
return a ==
b; }
587 constexpr
inline bool SYSisEqual(
int64 a,
int64 b) {
return a ==
b; }
588 constexpr
inline bool SYSisGreater(
int32 a,
int32 b) {
return a >
b; }
589 constexpr
inline bool SYSisGreater(
int64 a,
int64 b) {
return a >
b; }
590 constexpr
inline bool SYSisGreaterOrEqual(
int32 a,
int32 b) {
return a >=
b; }
591 constexpr
inline bool SYSisGreaterOrEqual(
int64 a,
int64 b) {
return a >=
b; }
592 constexpr
inline bool SYSisLess(
int32 a,
int32 b) {
return a <
b; }
593 constexpr
inline bool SYSisLess(
int64 a,
int64 b) {
return a <
b; }
594 constexpr
inline bool SYSisLessOrEqual(
int32 a,
int32 b) {
return a <=
b; }
595 constexpr
inline bool SYSisLessOrEqual(
int64 a,
int64 b) {
return a <=
b; }
605 if (SYSfabs(a - b) <= tol)
618 if ((ai.
fval < 0.0) != (bi.
fval < 0.0))
639 if (SYSfabs(a - b) <= tol)
652 if ((ai.
fval < 0.0) != (bi.
fval < 0.0))
666 return SYSalmostEqual(a, b, (
int64)ulps, tol);
670 {
return SYSisEqual(val,
SYSfloor(val)) || SYSisEqual(val,
SYSceil(val)); }
671 static inline bool SYSisInteger(
fpreal64 val)
672 {
return SYSisEqual(val,
SYSfloor(val)) || SYSisEqual(val,
SYSceil(val)); }
674 #define h_max3(type) \
675 static constexpr inline type \
676 SYSmax(type v0, type v1, type v2) { \
677 return SYSmax(v2, SYSmax(v0, v1)); \
679 #define h_max4(type) \
680 static constexpr inline type \
681 SYSmax(type v0, type v1, type v2, type v3) { \
682 return SYSmax(SYSmax(v0, v1), SYSmax(v2, v3)); \
684 #define h_argmax3(type) \
685 static constexpr inline int \
686 SYSargmax(type v0, type v1, type v2) { \
687 return v2 > SYSmax(v0, v1) ? 2 : SYSargmax(v0, v1); \
689 #define h_argmax4(type) \
690 static constexpr inline int \
691 SYSargmax(type v0, type v1, type v2, type v3) { \
692 return SYSmax(v0, v1) < SYSmax(v2, v3) ? \
693 (SYSargmax(v2, v3) + 2) : SYSargmax(v0, v1); \
695 #define h_min3(type) \
696 static constexpr inline type \
697 SYSmin(type v0, type v1, type v2) { \
698 return SYSmin(v2, SYSmin(v0, v1)); \
700 #define h_min4(type) \
701 static constexpr inline type \
702 SYSmin(type v0, type v1, type v2, type v3) { \
703 return SYSmin(SYSmin(v0, v1), SYSmin(v2, v3)); \
705 #define h_argmin3(type) \
706 static constexpr inline int \
707 SYSargmin(type v0, type v1, type v2) { \
708 return v2 < SYSmin(v0, v1) ? 2 : SYSargmin(v0, v1); \
710 #define h_argmin4(type) \
711 static constexpr inline int \
712 SYSargmin(type v0, type v1, type v2, type v3) { \
713 return SYSmin(v0, v1) > SYSmin(v2, v3) ? \
714 (SYSargmin(v2, v3) + 2) : SYSargmin(v0, v1); \
718 #define h_max(type) h_min3(type) h_min4(type) h_max3(type) h_max4(type) \
719 h_argmin3(type) h_argmin4(type) \
720 h_argmax3(type) h_argmax4(type)
722 #define h_avg3(type) \
723 static constexpr inline type \
724 SYSavg(type v0, type v1, type v2) { \
725 return (v0+v1+v2) * ((type)(1.0/3.0)); \
727 #define h_avg4(type) \
728 static constexpr inline type \
729 SYSavg(type v0, type v1, type v2, type v3) { \
730 return (v0+v1+v2+v3) * ((type)0.25); \
733 #define h_avg(type) h_avg3(type) h_avg4(type)
746 static constexpr inline
int32
748 {
return (a + b + c + 1) / 3; }
749 static constexpr
inline int32
751 {
return (a + b + c + d + 2) / 4; }
753 static constexpr
inline int64
755 {
return (a + b + c + 1) / 3; }
756 static constexpr
inline int64
758 {
return (a + b + c + d + 2) / 4; }
783 return v1 + (v2 -
v1)*t;
789 return v1 + (v2 -
v1)*t;
830 return v0*(1-u-
v) + v1*u + v2*v;
836 return v0*(1-u-
v) + v1*u + v2*v;
849 return ((a < 0) ^ (b < 0) && r != 0.0
f) ? r+b :
r;
856 return ((a < 0) ^ (b < 0) && r != 0.0) ? r+b :
r;
859 static constexpr
inline int32
865 return ((a < 0) ^ (b < 0) && r) ? r+b :
r;
868 static constexpr
inline int64
874 return ((a < 0) ^ (b < 0) && r) ? r+b :
r;
880 if (val <= min)
return 0;
881 if (val >= max)
return 1;
891 if (val <= min)
return 0;
892 if (val >= max)
return 1;
906 (
fpreal32)1/roll) : SYSpow(f, roll);
916 fpreal64 f = SYSsmooth(min, max, value);
918 (
fpreal64)1/roll) : SYSpow(f, roll);
931 if (val < omin)
return nmin;
932 if (val > omax)
return nmax;
936 if (val < omax)
return nmax;
937 if (val > omin)
return nmin;
939 return nmin + (nmax-nmin)*(val-omin)/d;
950 if (val < omin)
return nmin;
951 if (val > omax)
return nmax;
955 if (val < omax)
return nmax;
956 if (val > omin)
return nmin;
958 return nmin + (nmax-nmin)*(val-omin)/d;
967 return (nmin+nmax)*0.5f;
968 return nmin + (nmax-nmin)*(v-omin)/d;
976 return (nmin+nmax)*0.5f;
977 return nmin + (nmax-nmin)*(v-omin)/d;
983 if (val < 0)
return nmin;
984 if (val > 1)
return nmax;
985 return SYSlerp(nmin, nmax, val);
991 if (val < 0)
return nmin;
992 if (val > 1)
return nmax;
993 return SYSlerp(nmin, nmax, val);
1001 return SYSefit(v, omin, omax, 0.0f, 1.0f);
1007 return SYSefit(v, omin, omax, 0.0, 1.0);
1015 return (ax > dx ? 0 : 1 - ax / dx);
1022 return (ax > dx ? 0 : 1 - ax / dx);
1040 template<
typename T>
1042 SYSroundDownToMultipleOf(T val, T multiple)
1048 int rem = val % multiple;
1053 return val - multiple - rem;
1064 fpreal32 modulus = SYSfmod(val, multiple);
1079 fpreal64 modulus = SYSfmod(val, multiple);
1088 template<
typename T>
1090 SYSroundUpToMultipleOf(T val, T multiple)
1096 int rem = val % multiple;
1103 return val + multiple - rem;
1113 modulus = SYSfmod(val, multiple);
1118 return val - modulus;
1128 modulus = SYSfmod(val, multiple);
1133 return val - modulus;
1137 SYSroundUpPow2(
uint32 val)
1153 static constexpr
inline uint32
1154 SYSwang_inthash(
uint32 key)
1157 key += ~(key << 16);
1167 static constexpr
inline uint32
1168 SYSmultiplicative_inthash(
uint32 key)
1173 return key * 2654435761u;
1176 static constexpr
inline uint64
1177 SYSmultiplicative_inthash64(
uint64 key)
1180 return key * 11400714819323198485llu;
1183 static constexpr
inline uint64
1184 SYSwang_inthash64(
uint64 key)
1187 key += ~(key << 32ULL);
1189 key += ~(key << 13);
1193 key += ~(key << 27);
1198 static constexpr
inline uint32
1199 SYSsharpe_inthash(
uint32 key)
1208 key ^= ~(key >> 15);
1214 static constexpr
inline uint32
1215 SYSwang2_inthash(
uint32 key)
1219 constexpr
uint c2=0x27d4eb2d;
1220 key = (key ^ 61) ^ (key >> 16);
1221 key = key + (key << 3);
1222 key = key ^ (key >> 4);
1224 key = key ^ (key >> 15);
1228 static constexpr
inline uint64
1229 SYSwang2_inthash(
uint64 key)
1233 key = (~key) + (key << 21);
1234 key = key ^ (key >> 24);
1235 key = (key + (key << 3)) + (key << 8);
1236 key = key ^ (key >> 14);
1237 key = (key + (key << 2)) + (key << 4);
1238 key = key ^ (key >> 28);
1239 key = key + (key << 31);
1244 SYSreal_hash(
fpreal16 a,
int lowmask=0x3)
1246 return SYSwang_inthash(a.
bits() & (~lowmask));
1250 SYSreal_hashseed(
fpreal16 a,
uint seed,
int lowmask=0x3)
1252 return SYSwang_inthash(seed + (a.
bits() & (~lowmask)));
1256 SYSreal_hash(
fpreal32 a,
int lowmask=0xf)
1260 return SYSwang_inthash(ai.
uval & (~lowmask));
1264 SYSreal_hashseed(
fpreal32 a,
uint seed,
int lowmask=0xf)
1268 return SYSwang_inthash(seed + (ai.
uval & (~lowmask)));
1272 SYSreal_hash(
fpreal64 a,
int lowmask=0xf)
1276 return SYSwang_inthash64(ai.
uval & (~lowmask));
1284 return SYSwang_inthash64(seed + (ai.
uval & (~lowmask)));
1287 static constexpr
inline uint
1288 SYSvector_hash(
const int32 *vector,
int size)
1291 for (
int i = 0; i <
size; ++i)
1292 hash = SYSwang_inthash(hash + vector[i]);
1296 static constexpr
inline uint
1297 SYSvector_hash(
const int64 *vector,
int size)
1300 for (
int i = 0; i <
size; ++i)
1301 hash = (
uint)SYSwang_inthash64(hash + vector[i]);
1306 SYSvector_hash(
const fpreal16 *vector,
int size)
1309 for (
int i = 0; i <
size; ++i)
1310 hash = SYSreal_hashseed(vector[i], hash);
1315 SYSvector_hash(
const fpreal32 *vector,
int size)
1318 for (
int i = 0; i <
size; ++i)
1319 hash = SYSreal_hashseed(vector[i], hash);
1324 SYSvector_hash(
const fpreal64 *vector,
int size)
1327 for (
int i = 0; i <
size; ++i)
1328 hash = SYSreal_hashseed(vector[i], hash);
1337 static inline size_t
1338 SYSvector3_hash(
const P &vector)
1340 static constexpr
size_t p1 = 73856093;
1341 static constexpr
size_t p2 = 19349663;
1342 static constexpr
size_t p3 = 83492791;
1344 return size_t(vector.x()*p1) ^
size_t(vector.y()*p2) ^
size_t(vector.z()*p3);
1348 SYSpointerHash(
const void *
ptr)
1350 #if SIZEOF_VOID_P == 8
1361 SYShashToFloat01(
uint hash)
1364 tmp.
uval = 0x3f800000 | (0x007fffff & hash);
1365 return tmp.
fval-1.0F;
1370 SYSfastRandom(
uint &seed)
1372 seed = seed*1664525 + 1013904223;
1373 return SYShashToFloat01(seed);
1377 SYSrandom(
uint &seed)
1379 seed = seed*1664525 + 1013904223;
1380 return SYShashToFloat01(SYSwang_inthash(seed));
1383 static constexpr
uint
1384 SYSfastRandomInt(
uint &seed)
1386 seed = seed*1664525 + 1013904223;
1387 return SYSwang_inthash(seed);
1391 SYSfastRandomZero(
uint &seed)
1393 return SYSfastRandom(seed) - 0.5F;
1397 SYSrandomZero(
uint &seed)
1399 return SYSrandom(seed) - 0.5F;
1402 template <
typename T>
1403 static constexpr
inline void
1404 SYSminmax(T
v0, T
v1, T
v2, T
v3, T &min, T &max)
1406 min =
SYSmin(v0, v1, v2, v3);
1407 max =
SYSmax(v0, v1, v2, v3);
1410 template <
typename T>
1411 static constexpr
inline void
1412 SYSminmax(T
v0, T
v1, T
v2, T &min, T &max)
1414 min =
SYSmin(v0, v1, v2);
1415 max =
SYSmax(v0, v1, v2);
1418 template <
typename T>
1419 static constexpr
inline void
1420 SYSminmax(T
v0, T
v1, T &min, T &max)
1430 sintheta = slope / SYSsqrt(slope*slope + (
fpreal32)1);
1434 costheta = one_over_m / SYSsqrt(one_over_m*one_over_m + 1);
1437 costheta = SYSsqrt((
fpreal32)1 - sintheta*sintheta);
1444 sintheta = slope / SYSsqrt(slope*slope + (
fpreal64)1);
1448 costheta = one_over_m / SYSsqrt(one_over_m*one_over_m + 1);
1451 costheta = SYSsqrt((
fpreal64)1 - sintheta*sintheta);
1454 inline constexpr
static bool
1460 inline constexpr
static bool
1466 inline constexpr
static bool
1469 return (v0 ^ v1) >= 0;
1472 inline constexpr
static bool
1475 return (v0 ^ v1) >= 0;
1484 static constexpr
inline int
1485 SYShexCharToInt(
char c)
1489 if (c >=
'0' && c <=
'9')
1491 if (c >=
'a' && c <=
'f')
1492 return c -
'a' + 10;
1493 if (c >=
'A' && c <=
'F')
1494 return c -
'A' + 10;
1498 static constexpr
inline char
1499 SYSintToHexChar(
int value)
1502 return value < 10 ?
'0' + value :
'a' + value - 10;
1505 SYS_API void SYSsort(
int &a,
int &b);
1506 SYS_API void SYSsort(
int &a,
int &b,
int &c);
1509 SYS_API void SYSsort(
float &a,
float &b);
1510 SYS_API void SYSsort(
float &a,
float &b,
float &c);
1511 SYS_API void SYSsort(
double &a,
double &b);
1512 SYS_API void SYSsort(
double &a,
double &b,
double &c);
1516 static constexpr
inline void
1523 static constexpr
inline void
1535 #define SYSmax(a,b) ((a) > (b) ? (a) : (b))
1536 #define SYSmin(a,b) ((a) < (b) ? (a) : (b))
1537 #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)
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)
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)
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
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)
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
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)
GLsizei const GLfloat * value
SYS_API float asinf(float x)
INT64 INT64 INT64 remainder
unsigned short bits() const
SYS_API bool SYSisFloat(const char *str)
SYS_API double sin(double x)
SYS_API fpreal32 SYSceil(fpreal32 val)