size_of_mask

#define size_of_mask( ) (32 - clz(mask) - ctz(mask))

Counts the number of bits in a mask (no more than 32 bits)

Parameters

mask

Mask of which to count the bits.