Skip to content

Commit 9f0713c

Browse files
committed
Merge branch 'bitreverse_intrinsic' into more_fft_utils
2 parents d1666d4 + f6725ea commit 9f0713c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

include/nbl/builtin/hlsl/cpp_compat/intrinsics.hlsl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,17 @@ inline FloatingPoint rsqrt(FloatingPoint x)
206206
#endif
207207
}
208208

209+
template<typename Integer>
210+
inline Integer bitReverse(Integer base)
211+
{
212+
#ifdef __HLSL_VERSION
213+
return spirv::bitReverse(x);
214+
#else
215+
return glm::bitfieldReverse(x);
216+
#endif
217+
}
218+
219+
209220
}
210221
}
211222

0 commit comments

Comments
 (0)