22 static const uint8_t ntzTable[];
26 static int32_t
pop(int64_t x);
29 static int64_t
pop_array(
const int64_t* A, int32_t wordOffset, int32_t numWords);
32 static int64_t
pop_intersect(
const int64_t* A,
const int64_t* B, int32_t wordOffset, int32_t numWords);
35 static int64_t
pop_union(
const int64_t* A,
const int64_t* B, int32_t wordOffset, int32_t numWords);
38 static int64_t
pop_andnot(
const int64_t* A,
const int64_t* B, int32_t wordOffset, int32_t numWords);
41 static int64_t
pop_xor(
const int64_t* A,
const int64_t* B, int32_t wordOffset, int32_t numWords);
44 static int32_t
ntz(int64_t val);
47 static int32_t
ntz(int32_t val);
51 static int32_t
ntz2(int64_t x);
55 static int32_t
ntz3(int64_t x);
70 inline static void CSA(int64_t& h, int64_t& l, int64_t a, int64_t b, int64_t c);
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
A variety of high efficiency bit twiddling routines.
Definition BitUtil.h:15
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 n...
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 bool isPowerOfTwo(int32_t v)
Returns true if v is a power of two or zero.
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 int32_t ntz(int64_t val)
Returns number of trailing zeros in a 64 bit long value.
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 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 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 bool isPowerOfTwo(int64_t v)
Returns true if v is a power of two or zero.
static int32_t ntz(int32_t val)
Returns number of trailing zeros in a 32 bit int value.
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 int32_t ntz3(int64_t x)
Returns 0 based index of first set bit. This is an alternate implementation of ntz()
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 void CSA(int64_t &h, int64_t &l, int64_t a, int64_t b, int64_t c)
Base class for all Lucene classes.
Definition LuceneObject.h:31
Definition AbstractAllTermDocs.h:12