LLVM 20.0.0git
Classes | Public Member Functions | List of all members
llvm::PackedVector< T, BitNum, BitVectorTy > Class Template Reference

Store a vector of values using a specific number of bits for each value. More...

#include "llvm/ADT/PackedVector.h"

Inheritance diagram for llvm::PackedVector< T, BitNum, BitVectorTy >:
Inheritance graph
[legend]

Classes

class  reference
 

Public Member Functions

 PackedVector ()=default
 
 PackedVector (unsigned size)
 
bool empty () const
 
unsigned size () const
 
void clear ()
 
void resize (unsigned N)
 
void reserve (unsigned N)
 
PackedVectorreset ()
 
void push_back (T val)
 
reference operator[] (unsigned Idx)
 
T operator[] (unsigned Idx) const
 
bool operator== (const PackedVector &RHS) const
 
bool operator!= (const PackedVector &RHS) const
 
PackedVectoroperator|= (const PackedVector &RHS)
 
const BitVectorTy & raw_bits () const
 
BitVectorTy & raw_bits ()
 

Detailed Description

template<typename T, unsigned BitNum, typename BitVectorTy = BitVector>
class llvm::PackedVector< T, BitNum, BitVectorTy >

Store a vector of values using a specific number of bits for each value.

Both signed and unsigned types can be used, e.g

Store a vector of values using a specific number of bits for each value.
Definition: PackedVector.h:77

will create a vector accepting values -2, -1, 0, 1. Any other value will hit an assertion.

Definition at line 76 of file PackedVector.h.

Constructor & Destructor Documentation

◆ PackedVector() [1/2]

template<typename T , unsigned BitNum, typename BitVectorTy = BitVector>
llvm::PackedVector< T, BitNum, BitVectorTy >::PackedVector ( )
default

◆ PackedVector() [2/2]

template<typename T , unsigned BitNum, typename BitVectorTy = BitVector>
llvm::PackedVector< T, BitNum, BitVectorTy >::PackedVector ( unsigned  size)
inlineexplicit

Definition at line 102 of file PackedVector.h.

Member Function Documentation

◆ clear()

template<typename T , unsigned BitNum, typename BitVectorTy = BitVector>
void llvm::PackedVector< T, BitNum, BitVectorTy >::clear ( )
inline

Definition at line 108 of file PackedVector.h.

◆ empty()

template<typename T , unsigned BitNum, typename BitVectorTy = BitVector>
bool llvm::PackedVector< T, BitNum, BitVectorTy >::empty ( ) const
inline

Definition at line 104 of file PackedVector.h.

◆ operator!=()

template<typename T , unsigned BitNum, typename BitVectorTy = BitVector>
bool llvm::PackedVector< T, BitNum, BitVectorTy >::operator!= ( const PackedVector< T, BitNum, BitVectorTy > &  RHS) const
inline

Definition at line 136 of file PackedVector.h.

References RHS.

◆ operator==()

template<typename T , unsigned BitNum, typename BitVectorTy = BitVector>
bool llvm::PackedVector< T, BitNum, BitVectorTy >::operator== ( const PackedVector< T, BitNum, BitVectorTy > &  RHS) const
inline

Definition at line 132 of file PackedVector.h.

References RHS.

◆ operator[]() [1/2]

template<typename T , unsigned BitNum, typename BitVectorTy = BitVector>
reference llvm::PackedVector< T, BitNum, BitVectorTy >::operator[] ( unsigned  Idx)
inline

Definition at line 124 of file PackedVector.h.

References Idx.

◆ operator[]() [2/2]

template<typename T , unsigned BitNum, typename BitVectorTy = BitVector>
T llvm::PackedVector< T, BitNum, BitVectorTy >::operator[] ( unsigned  Idx) const
inline

Definition at line 128 of file PackedVector.h.

References Idx.

◆ operator|=()

template<typename T , unsigned BitNum, typename BitVectorTy = BitVector>
PackedVector & llvm::PackedVector< T, BitNum, BitVectorTy >::operator|= ( const PackedVector< T, BitNum, BitVectorTy > &  RHS)
inline

Definition at line 140 of file PackedVector.h.

References RHS.

◆ push_back()

template<typename T , unsigned BitNum, typename BitVectorTy = BitVector>
void llvm::PackedVector< T, BitNum, BitVectorTy >::push_back ( T  val)
inline

◆ raw_bits() [1/2]

template<typename T , unsigned BitNum, typename BitVectorTy = BitVector>
BitVectorTy & llvm::PackedVector< T, BitNum, BitVectorTy >::raw_bits ( )
inline

Definition at line 146 of file PackedVector.h.

◆ raw_bits() [2/2]

template<typename T , unsigned BitNum, typename BitVectorTy = BitVector>
const BitVectorTy & llvm::PackedVector< T, BitNum, BitVectorTy >::raw_bits ( ) const
inline

Definition at line 145 of file PackedVector.h.

◆ reserve()

template<typename T , unsigned BitNum, typename BitVectorTy = BitVector>
void llvm::PackedVector< T, BitNum, BitVectorTy >::reserve ( unsigned  N)
inline

Definition at line 112 of file PackedVector.h.

References N.

◆ reset()

template<typename T , unsigned BitNum, typename BitVectorTy = BitVector>
PackedVector & llvm::PackedVector< T, BitNum, BitVectorTy >::reset ( )
inline

Definition at line 114 of file PackedVector.h.

◆ resize()

template<typename T , unsigned BitNum, typename BitVectorTy = BitVector>
void llvm::PackedVector< T, BitNum, BitVectorTy >::resize ( unsigned  N)
inline

Definition at line 110 of file PackedVector.h.

References N.

Referenced by llvm::PackedVector< T, BitNum, BitVectorTy >::push_back().

◆ size()

template<typename T , unsigned BitNum, typename BitVectorTy = BitVector>
unsigned llvm::PackedVector< T, BitNum, BitVectorTy >::size ( ) const
inline

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