proxygen
|
#include <BitIterator.h>
Public Member Functions | |
BitIterator (const BaseIter &iter, size_t bitOff=0) | |
size_t | bitOffset () const |
void | advanceToNextBlock () |
BitIterator & | operator= (const BaseIter &other) |
Static Public Member Functions | |
static unsigned int | bitsPerBlock () |
Private Types | |
typedef bititerator_detail::BitReference< typename std::iterator_traits< BaseIter >::reference, typename std::iterator_traits< BaseIter >::value_type > | BitRef |
Private Member Functions | |
void | advanceInBlock (size_t n) |
BitRef | dereference () const |
void | advance (ssize_t n) |
void | increment () |
void | decrement () |
bool | equal (const BitIterator &other) const |
ssize_t | distance_to (const BitIterator &other) const |
Private Attributes | |
size_t | bitOffset_ |
Friends | |
class | boost::iterator_core_access |
BitIterator | findFirstSet (BitIterator, BitIterator) |
Fast bit iteration facility.
Wrapper around an iterator over an integer type that iterates over its underlying bits in LSb to MSb order.
BitIterator models the same iterator concepts as the base iterator.
Definition at line 52 of file BitIterator.h.
|
private |
Definition at line 106 of file BitIterator.h.
|
inlineexplicit |
Construct a BitIterator that points at a given bit offset (default 0) in iter.
Definition at line 78 of file BitIterator.h.
References folly::BitIterator< BaseIter >::bitOffset_, and folly::BitIterator< BaseIter >::bitsPerBlock().
Referenced by folly::BitIterator< BaseIter >::operator=().
|
inlineprivate |
Definition at line 117 of file BitIterator.h.
References folly::BitIterator< BaseIter >::bitOffset_, and folly::BitIterator< BaseIter >::bitsPerBlock().
|
inlineprivate |
Definition at line 108 of file BitIterator.h.
References folly::BitIterator< BaseIter >::bitOffset_, and folly::BitIterator< BaseIter >::bitsPerBlock().
Referenced by folly::findFirstSet().
|
inline |
Definition at line 88 of file BitIterator.h.
References folly::BitIterator< BaseIter >::bitOffset_.
Referenced by folly::findFirstSet(), and folly::BitIterator< BaseIter >::increment().
|
inline |
Definition at line 84 of file BitIterator.h.
References folly::BitIterator< BaseIter >::bitOffset_.
Referenced by folly::findFirstSet().
|
inlinestatic |
Return the number of bits in an element of the underlying iterator.
Definition at line 69 of file BitIterator.h.
References type.
Referenced by folly::BitIterator< BaseIter >::advance(), folly::BitIterator< BaseIter >::advanceInBlock(), folly::BitIterator< BaseIter >::BitIterator(), folly::BitIterator< BaseIter >::decrement(), folly::BitIterator< BaseIter >::distance_to(), and folly::BitIterator< BaseIter >::increment().
|
inlineprivate |
Definition at line 134 of file BitIterator.h.
References folly::BitIterator< BaseIter >::bitOffset_, and folly::BitIterator< BaseIter >::bitsPerBlock().
|
inlineprivate |
Definition at line 113 of file BitIterator.h.
References folly::BitIterator< BaseIter >::bitOffset_.
|
inlineprivate |
Definition at line 147 of file BitIterator.h.
References folly::BitIterator< BaseIter >::bitOffset_, and folly::BitIterator< BaseIter >::bitsPerBlock().
|
inlineprivate |
Definition at line 141 of file BitIterator.h.
References folly::BitIterator< BaseIter >::bitOffset_.
|
inlineprivate |
Definition at line 128 of file BitIterator.h.
References folly::BitIterator< BaseIter >::advanceToNextBlock(), folly::BitIterator< BaseIter >::bitOffset_, and folly::BitIterator< BaseIter >::bitsPerBlock().
|
inline |
Definition at line 93 of file BitIterator.h.
References folly::BitIterator< BaseIter >::BitIterator().
|
friend |
Definition at line 100 of file BitIterator.h.
|
friend |
Find first bit set in a range of bit iterators. 4.5x faster than the obvious std::find(begin, end, true);
Definition at line 170 of file BitIterator.h.
Referenced by folly::findFirstSet().
|
private |
Definition at line 153 of file BitIterator.h.
Referenced by folly::BitIterator< BaseIter >::advance(), folly::BitIterator< BaseIter >::advanceInBlock(), folly::BitIterator< BaseIter >::advanceToNextBlock(), folly::BitIterator< BaseIter >::BitIterator(), folly::BitIterator< BaseIter >::bitOffset(), folly::BitIterator< BaseIter >::decrement(), folly::BitIterator< BaseIter >::dereference(), folly::BitIterator< BaseIter >::distance_to(), folly::BitIterator< BaseIter >::equal(), and folly::BitIterator< BaseIter >::increment().