@@ -106,14 +106,14 @@ struct find_msb_helper<uint64_t>
106106 static int32_t findMSB (NBL_CONST_REF_ARG (uint64_t) val)
107107 {
108108#ifdef __HLSL_VERSION
109- const uint64_t lowBits = uint32_t (val);
110- const uint64_t highBits = uint32_t (val >> 32 );
109+ const uint32_t lowBits = uint32_t (val);
110+ const uint32_t highBits = uint32_t (val >> 32 );
111111
112- const int32_t lowMsb = findMSB (lowBits);
112+ const int32_t lowMsb = find_msb_helper<uint32_t>:: findMSB (lowBits);
113113 if (lowMsb == -1 )
114114 {
115- const uint64_t highBits = uint32_t (val >> 32 );
116- const int32_t highMsb = findMSB (highBits);
115+ const uint32_t highBits = uint32_t (val >> 32 );
116+ const int32_t highMsb = find_msb_helper<uint32_t>:: findMSB (highBits);
117117 if (highBits == -1 )
118118 return -1 ;
119119 else
@@ -220,14 +220,14 @@ struct find_lsb_helper<uint64_t>
220220 static int32_t findLSB (NBL_CONST_REF_ARG (uint64_t) val)
221221 {
222222#ifdef __HLSL_VERSION
223- const uint64_t lowBits = uint32_t (val);
224- const uint64_t highBits = uint32_t (val >> 32 );
223+ const uint32_t lowBits = uint32_t (val);
224+ const uint32_t highBits = uint32_t (val >> 32 );
225225
226- const int32_t lowLsb = findLSB (lowBits);
226+ const int32_t lowLsb = find_lsb_helper<uint32_t>:: findLSB (lowBits);
227227 if (lowLsb == -1 )
228228 {
229- const uint64_t highBits = uint32_t (val >> 32 );
230- const int32_t highLsb = findLSB (highBits);
229+ const uint32_t highBits = uint32_t (val >> 32 );
230+ const int32_t highLsb = find_lsb_helper<uint32_t>:: findLSB (highBits);
231231 if (highBits == -1 )
232232 return -1 ;
233233 else
0 commit comments