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 15233fd commit 02bb629Copy full SHA for 02bb629
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