Skip to content

Commit

Permalink
Merge pull request oneapi-src#1665 from ldrumm/ref-noref
Browse files Browse the repository at this point in the history
Prefer value over reference for `isPowerOf2`
  • Loading branch information
kbenzie authored Jun 5, 2024
2 parents 5136177 + 33256f5 commit 4d7d3ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/ur/ur.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ roundToHighestFactorOfGlobalSize(size_t &ThreadsPerBlockInDim,

// Returns whether or not Value is a power of 2
template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
bool isPowerOf2(const T &Value) {
bool isPowerOf2(const T Value) {
return Value && !(Value & (Value - 1));
}

Expand Down

0 comments on commit 4d7d3ae

Please sign in to comment.