Bit Manipulation#
Bitwise operations.
Macros#
#define
SL_DEF_BIT (bit)
Create bit mask with single, specified bit set.
#define
SL_SET_BIT (val, mask)
Set specified bit(s) in a value.
#define
SL_CLEAR_BIT (val, mask)
Clear specified bit(s) in a value.
#define
SL_IS_BIT_SET (val, mask)
Determine whether the specified bit(s) in a value are set.
#define
SL_IS_BIT_CLEAR (val, mask)
Determine whether the specified bit(s) in a value are clear.
#define
SL_IS_ANY_BIT_SET (val, mask)
Determine whether any specified bit(s) in a value are set.
#define
SL_IS_ANY_BIT_CLEAR (val, mask)
Determine whether any specified bit(s) in a value are clear.
#define
SL_MATH_IS_PWR2 (val)
Determine if a value is a power of 2.