mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-02 07:40:08 +00:00
6bad02c320
- For 32- and 64-bit floats, overflow is a parse error This works around a difference between Xcode's istringstream and other platforms. Xcode's runtime library will happlily "round up" overflow values to infinity. We want to make it fail. - When parsing a float fails due to bad syntax, follow C++11 behaviour for operator>> and set the value to zero. - When parsing a 32-bit or 64-bit float overflows, follow C++11 behaviour for operator>> and set the value to the nearest normal value: either max or lowest finite value for the type. - Add FloatProxy<T>::max() and ::lowest() - Make 16-bit overflow behaviour more consistent: we always get a 16-bit infinity of the right sign, whether the original string is a normal value for 32-bit or an overflow value for 32-bit. That matches our earlier intent. Added TODO's to make 16-bit overflow always an error, just like for 32-bit and 64-bit. - Simplify normal parsing of Float16 values by delegating to normal parsing of 32-bit floats. |
||
---|---|---|
.. | ||
libspirv | ||
util |