Lucene++ - a full-featured, c++ search engine
API Documentation
A variety of high efficiency bit twiddling routines. More...
#include <BitUtil.h>
Public Member Functions | |
virtual | ~BitUtil () |
virtual String | getClassName () |
boost::shared_ptr< BitUtil > | shared_from_this () |
![]() | |
virtual | ~LuceneObject () |
virtual void | initialize () |
Called directly after instantiation to create objects that depend on this object being fully constructed. | |
virtual LuceneObjectPtr | clone (const LuceneObjectPtr &other=LuceneObjectPtr()) |
Return clone of this object. | |
virtual int32_t | hashCode () |
Return hash code for this object. | |
virtual bool | equals (const LuceneObjectPtr &other) |
Return whether two objects are equal. | |
virtual int32_t | compareTo (const LuceneObjectPtr &other) |
Compare two objects. | |
virtual String | toString () |
Returns a string representation of the object. | |
![]() | |
virtual | ~LuceneSync () |
virtual SynchronizePtr | getSync () |
Return this object synchronize lock. | |
virtual LuceneSignalPtr | getSignal () |
Return this object signal. | |
virtual void | lock (int32_t timeout=0) |
Lock this object using an optional timeout. | |
virtual void | unlock () |
Unlock this object. | |
virtual bool | holdsLock () |
Returns true if this object is currently locked by current thread. | |
virtual void | wait (int32_t timeout=0) |
Wait for signal using an optional timeout. | |
virtual void | notifyAll () |
Notify all threads waiting for signal. | |
Static Public Member Functions | |
static String | _getClassName () |
static int32_t | pop (int64_t x) |
Returns the number of bits set in the long. | |
static int64_t | pop_array (const int64_t *A, int32_t wordOffset, int32_t numWords) |
Returns the number of set bits in an array of longs. | |
static int64_t | pop_intersect (const int64_t *A, const int64_t *B, int32_t wordOffset, int32_t numWords) |
Returns the popcount or cardinality of the two sets after an intersection. Neither array is modified. | |
static int64_t | pop_union (const int64_t *A, const int64_t *B, int32_t wordOffset, int32_t numWords) |
Returns the popcount or cardinality of the union of two sets. Neither array is modified. | |
static int64_t | pop_andnot (const int64_t *A, const int64_t *B, int32_t wordOffset, int32_t numWords) |
Returns the popcount or cardinality of A & ~B. Neither array is modified. | |
static int64_t | pop_xor (const int64_t *A, const int64_t *B, int32_t wordOffset, int32_t numWords) |
Returns the popcount or cardinality of A ^ B. Neither array is modified. | |
static int32_t | ntz (int64_t val) |
Returns number of trailing zeros in a 64 bit long value. | |
static int32_t | ntz (int32_t val) |
Returns number of trailing zeros in a 32 bit int value. | |
static int32_t | ntz2 (int64_t x) |
Returns 0 based index of first set bit (only works for x!=0) This is an alternate implementation of ntz() | |
static int32_t | ntz3 (int64_t x) |
Returns 0 based index of first set bit. This is an alternate implementation of ntz() | |
static bool | isPowerOfTwo (int32_t v) |
Returns true if v is a power of two or zero. | |
static bool | isPowerOfTwo (int64_t v) |
Returns true if v is a power of two or zero. | |
static int32_t | nextHighestPowerOfTwo (int32_t v) |
Returns the next highest power of two, or the current value if it's already a power of two or zero. | |
static int64_t | nextHighestPowerOfTwo (int64_t v) |
Returns the next highest power of two, or the current value if it's already a power of two or zero. | |
Static Public Attributes | |
static const uint8_t | ntzTable [] |
Table of number of trailing zeros in a byte. | |
Static Protected Member Functions | |
static void | CSA (int64_t &h, int64_t &l, int64_t a, int64_t b, int64_t c) |
Additional Inherited Members | |
![]() | |
LuceneObject () | |
![]() | |
SynchronizePtr | objectLock |
LuceneSignalPtr | objectSignal |
A variety of high efficiency bit twiddling routines.
|
virtual |
|
inlinestatic |
|
inlinestaticprotected |
|
inlinevirtual |
|
static |
Returns true if v is a power of two or zero.
|
static |
Returns true if v is a power of two or zero.
|
static |
Returns the next highest power of two, or the current value if it's already a power of two or zero.
|
static |
Returns the next highest power of two, or the current value if it's already a power of two or zero.
|
static |
Returns number of trailing zeros in a 32 bit int value.
|
static |
Returns number of trailing zeros in a 64 bit long value.
|
static |
Returns 0 based index of first set bit (only works for x!=0) This is an alternate implementation of ntz()
|
static |
Returns 0 based index of first set bit. This is an alternate implementation of ntz()
|
static |
Returns the number of bits set in the long.
|
static |
Returns the popcount or cardinality of A & ~B. Neither array is modified.
|
static |
Returns the number of set bits in an array of longs.
|
static |
Returns the popcount or cardinality of the two sets after an intersection. Neither array is modified.
|
static |
Returns the popcount or cardinality of the union of two sets. Neither array is modified.
|
static |
Returns the popcount or cardinality of A ^ B. Neither array is modified.
|
inline |
|
static |
Table of number of trailing zeros in a byte.