LLVM 22.0.0git
llvm::bitfields_details::Compressor< T, Bits, bool > Struct Template Reference

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. More...

#include "llvm/ADT/Bitfields.h"

Inheritance diagram for llvm::bitfields_details::Compressor< T, Bits, bool >:
[legend]

Public Types

using BP = BitPatterns<T, Bits>

Static Public Member Functions

static T pack (T UserValue, T UserMaxValue)
static T unpack (T StorageValue)

Detailed Description

template<typename T, unsigned Bits, bool = std::is_unsigned<T>::value>
struct llvm::bitfields_details::Compressor< T, Bits, bool >

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.

Definition at line 121 of file Bitfields.h.

Member Typedef Documentation

◆ BP

template<typename T, unsigned Bits, bool = std::is_unsigned<T>::value>
using llvm::bitfields_details::Compressor< T, Bits, bool >::BP = BitPatterns<T, Bits>

Definition at line 123 of file Bitfields.h.

Member Function Documentation

◆ pack()

template<typename T, unsigned Bits, bool = std::is_unsigned<T>::value>
T llvm::bitfields_details::Compressor< T, Bits, bool >::pack ( T UserValue,
T UserMaxValue )
inlinestatic

Definition at line 125 of file Bitfields.h.

◆ unpack()

template<typename T, unsigned Bits, bool = std::is_unsigned<T>::value>
T llvm::bitfields_details::Compressor< T, Bits, bool >::unpack ( T StorageValue)
inlinestatic

Definition at line 131 of file Bitfields.h.


The documentation for this struct was generated from the following file: