llvm::SparseBitVectorElement

Fixed-size block of bits stored as a contiguous array of BitWords.

Synopsis

Declared in <llvm/ADT/SparseBitVector.h>

template<unsigned int ElementSize = 128>
struct SparseBitVectorElement;

Description

Each element represents ElementSize consecutive bit indices starting at ElementIndex * ElementSize. Empty (all-zero) elements are not retained by SparseBitVector.

Type Aliases

NameDescription
BitWord Unsigned word type used to store bits inside this element.
size_type Type used for counts of set bits in this element.

Enums

NameDescription
Unnamed enum Layout constants for a SparseBitVector element.

Member Functions

NameDescription
SparseBitVectorElement [constructor]Construct an all-zero element at element index Idx.
count Return the number of bits set in this element.
empty Return true if every bit in this element is clear.
find_first find_first - Returns the index of the first set bit.
find_last find_last - Returns the index of the last set bit.
find_next find_next - Returns the index of the next set bit starting from the "Curr" bit. Returns -1 if the next set bit is not found.
index Return the element index of this block in the sparse vector.
intersectWith Bitwise-and this element's bits with RHS in place.
intersectWithComplement intersectWithComplement overloads
intersects Return true if this element and RHS share any set bit.
reset Clear the bit at local index Idx within this element.
set Set the bit at local index Idx within this element.
test Return true if the bit at local index Idx is set.
test_and_set Set the bit at local index Idx if it was clear.
unionWith Bitwise-or this element's bits with RHS in place.
word Return the BitWord at local word index Idx.
operator== Return true if this element has the same index and bit pattern as RHS.
operator!= Return true if this element differs from RHS in index or bits.