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 794fab3 commit 94df4f3Copy full SHA for 94df4f3
sycl/include/syclcompat/util.hpp
@@ -162,9 +162,11 @@ 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;
+ if constexpr (sizeof(T) == 4) {
+ unsigned result;
+ asm volatile("brev.b32 %0, %1;" : "=r"(result) : "r"(a));
168
+ return result;
169
+ }
170
#endif // __NVPTX__
171
if (!a)
172
return 0;
0 commit comments