carb::math::popCount

Defined in carb/math/Util.h

template<class T>
int carb::math::popCount(const T &val)

Returns the number of set (1) bits in an integer value.

Parameters

val[in] The integer value

Returns

The number of set (1) bits.