Expand description
Utilities for bit manipulation.
Functions§
- contains_
ones_ byte_ u16 - Returns true if the unsigned 16-bit integer contains one or more bytes which have all bits set.
- contains_
ones_ byte_ u32 - Returns true if the unsigned 32-bit integer contains one or more bytes which have all bits set.
- contains_
ones_ byte_ u64 - Returns true if the unsigned 64-bit integer contains one or more bytes which have all bits set.
- mask_at
- Masks the bit at the specified bit index.
- mask_
lower - Masks all bits with an index less than idx.
- mask_
lower_ eq - Masks all bits with an index less than or equal to idx.
- mask_
range - Masks out all bits in positions less than upper, but greater than or equal to lower (upper < bit <= lower)
- mask_
upper - Masks all bits with an index greater than idx.
- mask_
upper_ eq - Masks all bits with an index greater than or equal to idx.
- sign_
extend_ leq8_ to_ i8 - Sign extends an arbitrary, 8-bit or less, signed two’s complement integer stored within an u8 to a full width i8.
- sign_
extend_ leq16_ to_ i16 - Sign extends an arbitrary, 16-bit or less, signed two’s complement integer stored within an u16 to a full width i16.
- sign_
extend_ leq32_ to_ i32 - Sign extends an arbitrary, 32-bit or less, signed two’s complement integer stored within an u32 to a full width i32.
- sign_
extend_ leq64_ to_ i64 - Sign extends an arbitrary, 64-bit or less, signed two’s complement integer stored within an u64 to a full width i64.
- trailing_
ones_ u8 - Returns the number of trailing ones in an unsigned 8-bit integer.
- trailing_
ones_ u16 - Returns the number of trailing ones in an unsigned 16-bit integer.
- trailing_
ones_ u32 - Returns the number of trailing ones in an unsigned 32-bit integer.
- trailing_
ones_ u64 - Returns the number of trailing ones in an unsigned 64-bit integer.