Expand description
Utils for working with bits
Functions§
- ceil
- Returns the ceil of
value
/divisor
- get_bit
- Returns whether bit at position
i
indata
is set or not - get_
bit_ ⚠raw - Returns whether bit at position
i
indata
is set or not. - round_
upto_ multiple_ of_ 64 - Returns the nearest number that is
>=
thannum
and is a multiple of 64 - round_
upto_ power_ of_ 2 - Returns the nearest multiple of
factor
that is>=
thannum
. Herefactor
must be a power of 2. - set_bit
- Sets bit at position
i
fordata
to 1 - set_
bit_ ⚠raw - Sets bit at position
i
fordata
- unset_
bit - Sets bit at position
i
fordata
to 0 - unset_
bit_ ⚠raw - Sets bit at position
i
fordata
to 0