LLVM  6.0.0svn
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]
Collaboration diagram for llvm::PackedVector< T, BitNum, BitVectorTy >:
Collaboration 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)
 

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

PackedVector<signed, 2> vec;

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.

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

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

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

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

◆ push_back()

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

Definition at line 119 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.

◆ reset()

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

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

◆ size()

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

Definition at line 106 of file PackedVector.h.


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