|
template<typename T > |
T | IntegerOps::shl1 (size_t n) |
| Bitmask with bit n set. More...
|
|
template<typename T > |
T | IntegerOps::genMask (size_t n) |
| Bitmask with bits 0 through N-1 set. More...
|
|
template<typename T > |
T | IntegerOps::genMask (size_t lobit, size_t hibit) |
| Generate a bitmask. More...
|
|
template<typename T > |
bool | IntegerOps::isPowerOfTwo (T value) |
| Returns true if the value is a power of two. More...
|
|
template<typename T > |
T | IntegerOps::log2max (T value) |
| Returns the base-2 logorithm of value . More...
|
|
template<typename T > |
T | IntegerOps::log2 (T a) |
|
template<typename T > |
bool | IntegerOps::bitmask_subset (T m1, T m2) |
| Determines if one bitmask is a subset of another. More...
|
|
template<typename T > |
size_t | IntegerOps::countSet (T val) |
| Counts how many bits are set (one). More...
|
|
template<typename T > |
size_t | IntegerOps::countClear (T val) |
| Counts how many bits are clear (zero). More...
|
|
template<typename T > |
boost::optional< size_t > | IntegerOps::msb_set (T val) |
| Optionally returns the zero-origin position of the most significant set bit. More...
|
|
|
template<size_t NBits, typename T > |
bool | IntegerOps::signBit (T value) |
| Returns true if the sign bit is set, false if clear. More...
|
|
template<typename T > |
bool | IntegerOps::signBit2 (T value, size_t width=8 *sizeof(T)) |
| Returns true if the sign bit is set, false if clear. More...
|
|
|
template<size_t FromBits, size_t ToBits, typename T > |
T | IntegerOps::signExtend (T value) |
| Sign extend value. More...
|
|
template<typename T > |
T | IntegerOps::signExtend2 (T value, size_t from_width, size_t to_width) |
| Sign extend value. More...
|
|
|
template<size_t NBits, typename T > |
T | IntegerOps::shiftLeft (T value, size_t count) |
| Shifts bits of value left by count bits. More...
|
|
template<typename T > |
T | IntegerOps::shiftLeft2 (T value, size_t count, size_t width=8 *sizeof(T)) |
| Shifts bits of value left by count bits. More...
|
|
|
template<size_t NBits, typename T > |
T | IntegerOps::shiftRightLogical (T value, size_t count) |
| Shifts bits of value right by count bits without sign extension. More...
|
|
template<typename T > |
T | IntegerOps::shiftRightLogical2 (T value, size_t count, size_t width=8 *sizeof(T)) |
| Shifts bits of value right by count bits without sign extension. More...
|
|
|
template<size_t NBits, typename T > |
T | IntegerOps::shiftRightArithmetic (T value, size_t count) |
| Shifts bits of value right by count bits with sign extension. More...
|
|
template<typename T > |
T | IntegerOps::shiftRightArithmetic2 (T value, size_t count, size_t width=8 *sizeof(T)) |
| Shifts bits of value right by count bits with sign extension. More...
|
|
|
template<size_t NBits, typename T > |
T | IntegerOps::rotateLeft (T value, size_t count) |
| Rotate the bits of the value left by count bits. More...
|
|
template<typename T > |
T | IntegerOps::rotateLeft2 (T value, size_t count, size_t width=8 *sizeof(T)) |
| Rotate the bits of the value left by count bits. More...
|
|
|
template<size_t NBits, typename T > |
T | IntegerOps::rotateRight (T value, size_t count) |
| Rotate bits of the value right by count bits. More...
|
|
template<typename T > |
T | IntegerOps::rotateRight2 (T value, size_t count, size_t width=8 *sizeof(T)) |
| Rotate bits of the value right by count bits. More...
|
|
|
template<size_t lobit, size_t hibit, typename T > |
T | IntegerOps::shift_to (T value) |
| Create a shifted value. More...
|
|
template<typename T > |
T | IntegerOps::shift_to2 (size_t lobit, size_t hibit, T value) |
| Create a shifted value. More...
|
|
|
template<size_t lobit, size_t hibit, typename T > |
T | IntegerOps::extract (T bits) |
| Extract bits from a value. More...
|
|
template<typename T > |
T | IntegerOps::extract2 (size_t lobit, size_t hibit, T bits) |
| Extract bits from a value. More...
|
|