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.
2 parents 3f5f568 + 02bb629 commit 7611542Copy full SHA for 7611542
source/ur/ur.hpp
@@ -336,7 +336,8 @@ roundToHighestFactorOfGlobalSize(size_t &ThreadsPerBlockInDim,
336
}
337
338
// Returns whether or not Value is a power of 2
339
-template <typename T> inline bool isPowerOf2(const T &Value) {
+template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
340
+bool isPowerOf2(const T &Value) {
341
return Value && !(Value & (Value - 1));
342
343
0 commit comments