diff options
Diffstat (limited to 'runtime/base/bit_utils.h')
-rw-r--r-- | runtime/base/bit_utils.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/base/bit_utils.h b/runtime/base/bit_utils.h index 9c78ee59dd..d6a44f7293 100644 --- a/runtime/base/bit_utils.h +++ b/runtime/base/bit_utils.h @@ -53,6 +53,7 @@ static constexpr int CTZ(T x) { : __builtin_ctzll(x); } +// Return the number of 1-bits in `x`. template<typename T> static constexpr int POPCOUNT(T x) { return (sizeof(T) == sizeof(uint32_t)) |