9void printBits(
size_t size,
void const *
const ptr, FILE *fp);
11int getBits(tipId_t x,
int maxbits,
int *bit);
13static inline tipId_t reverseBits(tipId_t x);
14uint32_t
rev32(uint32_t x);
15uint64_t
rev64(uint64_t x);
20uint32_t
uint32Hash(uint32_t key ) __attribute__((no_sanitize(
"integer")));
21uint32_t
uint64Hash(uint64_t key) __attribute__((no_sanitize(
"integer")));
26static inline int isPow2(tipId_t x);
28tipId_t low_bits_on(
unsigned n);
30static inline int isPow2(tipId_t x) {
31 return (x > 0 && !(x & (x - 1)));
35static inline tipId_t reverseBits(tipId_t x) {
41# error "unsupported tipId_t size"
uint32_t rev32(uint32_t x)
Reverse bits in a 32-bit integer.
Definition: binary.c:19
uint64_t rev64(uint64_t x)
Reverse bits in a 64-bit integer.
Definition: binary.c:30
int getBits(tipId_t x, int maxbits, int bit[maxbits])
Examine the bits in x.
Definition: binary.c:122
void printWhichBits(size_t const size, void const *const ptr)
Print the (0-based) indices of the bits that are "on".
Definition: binary.c:144
void printBits(size_t size, void const *const ptr, FILE *fp)
Print the bits in an object of size "size", pointed to by "ptr".
Definition: binary.c:97
int no_shared_bits(int n, tipId_t *tid)
Return 1 if the values in array share no bits; 0 otherwise.
Definition: binary.c:232
int nlz64(uint64_t x)
Number of leading zeroes in 64-bit unsigned integer.
Definition: binary.c:62
uint32_t uint64Hash(uint64_t key)
Hash function for a 64-bit integer.
Definition: binary.c:218
tipId_t next_power_of_2(tipId_t x)
Round up to the next largest power of 2.
Definition: binary.c:180
int nlz(tipId_t x)
Number of leading zeroes in tipId_t variable.
Definition: binary.c:85
int num1bits(tipId_t x)
Count the number of 1 bits in x.
Definition: binary.c:169
uint32_t uint32Hash(uint32_t key)
Hash function for a 32-bit integer.
Definition: binary.c:202