You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In C/C++ it's possible to use values such as INT_MAX or FLT_MAX by including a standard library header such as <limits.h> or <float.h>. It would be nice if there was some way for ISPC to offer those as well. Perhaps through predefined preprocessor symbols or a standard library header?
ISPC has limits for integral types in stdlib: INT8_MAX/INT8_MIN, INT16_MAX/INT16_MIN, INT32_MAX/INT32_MIN, INT64_MAX/INT64_MIN, UINT8_MAX, UINT16_MAX, UINT32_MAX, UINT64_MAX .
But doesn't have for floating point types.
Plus, no mentions of it in documentation.
ISPC has limits for integral types in stdlib: INT8_MAX/INT8_MIN, INT16_MAX/INT16_MIN, INT32_MAX/INT32_MIN, INT64_MAX/INT64_MIN, UINT8_MAX, UINT16_MAX, UINT32_MAX, UINT64_MAX .
They are internal stdlib.ispc definitions that are unavailable for users.
So, this example
uniform int foo() {
return INT32_MIN;
}
results to
<source>:4:11: Error: Undeclared symbol "INT32_MIN".
return INT32_MIN;
^^^^^^^^^
In C/C++ it's possible to use values such as INT_MAX or FLT_MAX by including a standard library header such as <limits.h> or <float.h>. It would be nice if there was some way for ISPC to offer those as well. Perhaps through predefined preprocessor symbols or a standard library header?
https://en.cppreference.com/w/c/types/limits
The text was updated successfully, but these errors were encountered: