3637a2ad3b2ead17efd5591f73effd3b140d8d2d |
|
09-Jun-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: bit twiddles
bits_requiredXX() gives the number of bits required to store an unsigned
integer. Here, XX is 8, 16, 32, 64, reperesenting the size of the operand.
It belongs in the same file as nearest_power(), which makes most sense
in a separate bit twiddles file. Universal enough to stay in lib.h by
inclusion.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |