Skip to main content

Module bit

Module bit 

Source

Functionsยง

is_pwr_two
Returns true if the given number is a power of two.
log_2_ceil
Returns the number of bits needed to represent the given number.
pad_bytes
Returns the number of padding bytes needed to align n to ALIGN.
pad_bytes_to
Returns the number of padding bytes needed to align n to align.
pad_bytes_u64
Returns the number of padding bytes needed to align n to ALIGN (u64 version).