File tree Expand file tree Collapse file tree
tools/clang/unittests/HLSLExec Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -527,10 +527,6 @@ static const uint16_t Float16NegDenorm = 0x8008;
527527static const uint16_t Float16PosZero = 0x0000 ;
528528static const uint16_t Float16NegZero = 0x8000 ;
529529
530- inline bool IsInfFloat16 (uint16_t val) {
531- return (val == Float16PosInf) || (val == Float16NegInf);
532- }
533-
534530inline bool GetSign (float x) { return std::signbit (x); }
535531
536532inline int GetMantissa (float x) {
Original file line number Diff line number Diff line change 1212#include < DirectXMath.h>
1313#include < DirectXPackedVector.h>
1414
15+ #include " dxc/Support/Global.h"
16+
1517namespace LongVector {
1618
1719// A helper struct because C++ bools are 1 byte and HLSL bools are 4 bytes.
@@ -119,8 +121,8 @@ struct HLSLHalf_t {
119121 HLSLHalf_t (DirectX::PackedVector::HALF ) = delete ;
120122
121123 static double GetULP (HLSLHalf_t A) {
122- DXASSERT (!IsInfFloat16 (A. Val ), " ULP of infinity is undefined " );
123- DXASSERT (! IsNanFloat16 (A. Val ), " ULP of NaN is undefined" );
124+ DXASSERT (!std::isnan (A) && ! std::isinf (A),
125+ " ULP of NaN or infinity is undefined" );
124126
125127 HLSLHalf_t Next = A;
126128 ++Next.Val ;
You can’t perform that action at this time.
0 commit comments