15#ifndef CBITS_BITVECTOR_INTERNAL_H
16#define CBITS_BITVECTOR_INTERNAL_H
62 uint64_t mask = 1ULL <<
bv_bit(pos);
75 uint64_t mask = ~(1ULL <<
bv_bit(pos));
88 uint64_t mask = 1ULL <<
bv_bit(pos);
104 unsigned tail = (unsigned) (bv->
n_bits & 63);
106 uint64_t mask = (UINT64_C(1) << tail) - 1;
Public C API for the BitVector data structure.
static void bv__set_inline(BitVector *bv, const size_t pos)
Internal inline version of bv_set().
Definition bitvector_internal.h:60
static void bv__flip_inline(BitVector *bv, const size_t pos)
Internal inline version of bv_flip().
Definition bitvector_internal.h:86
static void bv_apply_tail_mask(BitVector *bv)
Mask off any excess bits in the last word of a BitVector.
Definition bitvector_internal.h:99
static void bv__clear_inline(BitVector *bv, const size_t pos)
Internal inline version of bv_clear().
Definition bitvector_internal.h:73
static int bv__get_inline(const BitVector *bv, const size_t pos)
Internal inline version of bv_get().
Definition bitvector_internal.h:49
static size_t bv_word(const size_t pos)
Compute the word index for a given bit position.
Definition bitvector_internal.h:26
static size_t bv_bit(const size_t pos)
Compute the bit offset within its 64-bit word.
Definition bitvector_internal.h:36
Packed bit array with rank-support structures.
Definition bitvector.h:60
uint64_t * data
Definition bitvector.h:61
size_t n_bits
Definition bitvector.h:62
size_t n_words
Definition bitvector.h:63
bool rank_dirty
Definition bitvector.h:66