LLVM: llvm::CoalescingBitVector< IndexT > Class Template Reference (original) (raw)

A bitvector that, under the hood, relies on an IntervalMap to coalesce elements into intervals. More...

#include "[llvm/ADT/CoalescingBitVector.h](CoalescingBitVector%5F8h%5Fsource.html)"

Public Member Functions
CoalescingBitVector (Allocator &Alloc)
Construct by passing in a CoalescingBitVector::Allocator reference.
void clear ()
Clear all the bits.
bool empty () const
Check whether no bits are set.
unsigned count () const
Count the number of set bits.
void set (IndexT Index)
Set the bit at Index.
void set (const ThisT &Other)
Set the bits set in Other.
void set (std::initializer_list< IndexT > Indices)
Set the bits at Indices. Used for testing, primarily.
bool test (IndexT Index) const
Check whether the bit at Index is set.
void test_and_set (IndexT Index)
Set the bit at Index. Supports setting an already-set bit.
void reset (IndexT Index)
Reset the bit at Index. Supports resetting an already-unset bit.
void operator|= (const ThisT &RHS)
Set union.
void operator&= (const ThisT &RHS)
Set intersection.
void intersectWithComplement (const ThisT &Other)
Reset all bits present in Other.
bool operator== (const ThisT &RHS) const
bool operator!= (const ThisT &RHS) const
const_iterator begin () const
const_iterator end () const
const_iterator find (IndexT Index) const
Return an iterator pointing to the first set bit AT, OR AFTER, Index.
iterator_range< const_iterator > half_open_range (IndexT Start, IndexT End) const
Return a range iterator which iterates over all of the set bits in the half-open range [Start, End).
void print (raw_ostream &OS) const
LLVM_DUMP_METHOD void dump () const
Copy/move constructors and assignment operators.
CoalescingBitVector (const ThisT &Other)
ThisT & operator= (const ThisT &Other)
CoalescingBitVector (ThisT &&Other)=delete
ThisT & operator= (ThisT &&Other)=delete

template
class llvm::CoalescingBitVector< IndexT >

A bitvector that, under the hood, relies on an IntervalMap to coalesce elements into intervals.

Good for representing sets which predominantly contain contiguous ranges. Bad for representing sets with lots of gaps between elements.

Compared to SparseBitVector, CoalescingBitVector offers more predictable performance for non-sequential find() operations.

Template Parameters

IndexT - The type of the index into the bitvector.

Definition at line 38 of file CoalescingBitVector.h.

Allocator

template

template

CoalescingBitVector() [2/3]

template

CoalescingBitVector() [3/3]

template

begin()

template

clear()

template

count()

template

dump()

template

empty()

template

end()

template

find()

template

Return an iterator pointing to the first set bit AT, OR AFTER, Index.

If no such set bit exists, return end(). This is like std::lower_bound. This has worst-case logarithmic performance (roughly O(log(gaps between contiguous ranges))).

Definition at line 354 of file CoalescingBitVector.h.

References llvm::CoalescingBitVector< IndexT >::end(), llvm::IntervalMap< KeyT, ValT, N, Traits >::end(), llvm::IntervalMap< KeyT, ValT, N, Traits >::find(), and Index.

Referenced by llvm::CoalescingBitVector< IndexT >::half_open_range().

half_open_range()

template

intersectWithComplement()

template

operator!=()

template

operator&=()

template

operator=() [1/2]

template

operator=() [2/2]

template

operator==()

template

operator|=()

template

Set union.

If RHS is guaranteed to not overlap with this, set may be a faster alternative.

Definition at line 159 of file CoalescingBitVector.h.

References End, and RHS.

print()

template

reset()

template

set() [1/3]

template

set() [2/3]

template

set() [3/3]

template

test()

template

test_and_set()

template


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