struct Compressor
Declaration
template <typename T,
unsigned int Bits,
bool = std::is_unsigned<type - parameter - 0 - 0>::value>
struct Compressor { /* full declaration omitted */ };
Description
`Compressor` is used to manipulate the bits of a (possibly signed) integer type so it can be packed and unpacked into a `bits` sized integer, `Compressor` is specialized on signed-ness so no runtime cost is incurred. The `pack` method also checks that the passed in `UserValue` is valid.
Declared at: llvm/include/llvm/ADT/Bitfields.h:121
Templates
- T
- unsigned int Bits
- bool = std::is_unsigned<type-parameter-0-0>::value
Method Overview
Methods
¶static T pack(T UserValue, T UserMaxValue)
static T pack(T UserValue, T UserMaxValue)
Declared at: llvm/include/llvm/ADT/Bitfields.h:125
Parameters
- T UserValue
- T UserMaxValue
¶static T unpack(T StorageValue)
static T unpack(T StorageValue)
Declared at: llvm/include/llvm/ADT/Bitfields.h:131
Parameters
- T StorageValue