int
log_2_ceil(uint32_t n)
{
- return log_2_floor(n) + !IS_POW2(n);
+ return log_2_floor(n) + !is_pow2(n);
}
/* Returns the number of trailing 0-bits in 'n'. Undefined if 'n' == 0. */
#endif
/* Returns the number of 1-bits in 'x', between 0 and 32 inclusive. */
-int
+unsigned int
popcount(uint32_t x)
{
/* In my testing, this implementation is over twice as fast as any other