We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 573470f commit 794fab3Copy full SHA for 794fab3
sycl/include/syclcompat/util.hpp
@@ -161,6 +161,11 @@ inline double cast_ints_to_double(int high32, int low32) {
161
template <typename T> inline T reverse_bits(T a) {
162
static_assert(std::is_unsigned<T>::value && std::is_integral<T>::value,
163
"unsigned integer required");
164
+#if defined(__NVPTX__)
165
+ unsigned result;
166
+ asm volatile("brev.b32 %0, %1;" : "=r"(result) : "r"(a));
167
+ return result;
168
+#endif // __NVPTX__
169
if (!a)
170
return 0;
171
T mask = 0;
0 commit comments