Internal inline helpers for BitVector operations.
More...
Go to the source code of this file.
Internal inline helpers for BitVector operations.
Provides inline functions used by the C backend and Python bindings:
- See also
- bitvector.h
- Author
- lambdaphoenix
- Version
- 0.3.0
- Copyright
- Copyright (c) 2026 lambdaphoenix
◆ bv__clear_inline()
| static void bv__clear_inline |
( |
BitVector * |
bv, |
|
|
const size_t |
pos |
|
) |
| |
|
inlinestatic |
Internal inline version of bv_clear().
- Parameters
-
- Since
- 0.2.1
◆ bv__flip_inline()
| static void bv__flip_inline |
( |
BitVector * |
bv, |
|
|
const size_t |
pos |
|
) |
| |
|
inlinestatic |
Internal inline version of bv_flip().
- Parameters
-
- Since
- 0.2.1
◆ bv__get_inline()
| static int bv__get_inline |
( |
const BitVector * |
bv, |
|
|
const size_t |
pos |
|
) |
| |
|
inlinestatic |
Internal inline version of bv_get().
- Parameters
-
- Returns
0 or 1 depending on the bit value
- Since
- 0.2.1
◆ bv__set_inline()
| static void bv__set_inline |
( |
BitVector * |
bv, |
|
|
const size_t |
pos |
|
) |
| |
|
inlinestatic |
Internal inline version of bv_set().
- Parameters
-
- Since
- 0.2.1
◆ bv_apply_tail_mask()
| static void bv_apply_tail_mask |
( |
BitVector * |
bv | ) |
|
|
inlinestatic |
Mask off any excess bits in the last word of a BitVector.
- Parameters
-
- Since
- 0.1.2
◆ bv_bit()
| static size_t bv_bit |
( |
const size_t |
pos | ) |
|
|
inlinestatic |
Compute the bit offset within its 64-bit word.
- Parameters
-
- Returns
- Offset in [0...63] inside the 64-bit word.
◆ bv_word()
| static size_t bv_word |
( |
const size_t |
pos | ) |
|
|
inlinestatic |
Compute the word index for a given bit position.
- Parameters
-
- Returns
- Index of the 64-bit word containing that bit.