LLVM 19.0.0git
Public Types | Static Public Member Functions | List of all members
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"

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>
static T llvm::bitfields_details::Compressor< T, Bits, bool >::pack ( T  UserValue,
T  UserMaxValue 
)
inlinestatic

◆ unpack()

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

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