P4C
The P4 Compiler
bitvec Class Reference
Inheritance diagram for bitvec:
LTBitMatrix SymBitMatrix

Classes

class  const_bitref
 
class  nonconst_bitref
 

Public Types

typedef const_bitref const_iterator
 
typedef nonconst_bitref iterator
 

Public Member Functions

 bitvec (uintptr_t v)
 
 bitvec (size_t lo, size_t cnt)
 
 bitvec (const bitvec &a)
 
 bitvec (bitvec &&a)
 
const_bitref begin () const
 
nonconst_bitref begin ()
 
void clear ()
 
bool clrbit (size_t idx)
 
void clrrange (size_t idx, size_t sz)
 
bool contains (const bitvec &a) const
 
bool empty () const
 
const_bitref end () const
 
nonconst_bitref end ()
 
int ffs (unsigned start=0) const
 
unsigned ffz (unsigned start=0) const
 
bool getbit (size_t idx) const
 
uintptr_t getrange (size_t idx, size_t sz) const
 
bitvec getslice (size_t idx, size_t sz) const
 
bool intersects (const bitvec &a) const
 
const_bitref max () const
 
nonconst_bitref max ()
 
const_bitref min () const
 
nonconst_bitref min ()
 
bitvec operator & (const bitvec &a) const
 
bool operator &= (const bitvec &a)
 
 operator bool () const
 
bool operator!= (const bitvec &a) const
 
bitvec operator- (const bitvec &a) const
 
bool operator-= (const bitvec &a)
 
bitvec operator<< (size_t count) const
 
bitvecoperator<<= (size_t count)
 
bitvecoperator= (const bitvec &a)
 
bitvecoperator= (bitvec &&a)
 
bool operator== (const bitvec &a) const
 
bitvec operator>> (size_t count) const
 
bitvecoperator>>= (size_t count)
 
nonconst_bitref operator[] (int idx)
 
bool operator[] (int idx) const
 
bitvec operator^ (const bitvec &a) const
 
bitvecoperator^= (const bitvec &a)
 
bitvec operator| (const bitvec &a) const
 
bitvec operator| (uintptr_t a) const
 
bool operator|= (const bitvec &a)
 
bool operator|= (uintptr_t a)
 
int popcount () const
 
bool setbit (size_t idx)
 
void setrange (size_t idx, size_t sz)
 
void setraw (uintptr_t raw)
 
void setraw (uintptr_t *raw, size_t sz)
 

Static Public Attributes

static constexpr size_t bits_per_unit = CHAR_BIT * sizeof(uintptr_t)
 

Friends

std::ostream & operator<< (std::ostream &, const bitvec &)