|
#define | BU_BITV_SHIFT bu_bitv_shift() |
|
#define | BU_BITV_MASK ((1<<BU_BITV_SHIFT)-1) |
|
#define | BU_BITV_NULL ((struct bu_bitv *)0) |
|
#define | BU_CK_BITV(_bp) BU_CKMAG(_bp, BU_BITV_MAGIC, "bu_bitv") |
|
#define | BU_BITV_INIT(_bp) |
|
#define | BU_BITV_INIT_ZERO { {BU_BITV_MAGIC, BU_LIST_NULL, BU_LIST_NULL}, 0, {0, 0} } |
|
#define | BU_BITV_IS_INITIALIZED(_bp) (((struct bu_bitv *)(_bp) != BU_BITV_NULL) && LIKELY((_bp)->l.magic == BU_BITV_MAGIC)) |
|
#define | BU_WORDS2BITS(_nw) ((size_t)(_nw>0?_nw:0)*sizeof(bitv_t)*8) |
|
#define | BU_BITS2WORDS(_nb) (((size_t)(_nb>0?_nb:0)+BU_BITV_MASK)>>BU_BITV_SHIFT) |
|
#define | BU_BITS2BYTES(_nb) (BU_BITS2WORDS(_nb)*sizeof(bitv_t)) |
|
#define | BU_BITTEST(_bv, bit) (((_bv)->bits[(bit)>>BU_BITV_SHIFT] & (((bitv_t)1)<<((bit)&BU_BITV_MASK)))!=0) |
|
#define | BU_BITSET(_bv, bit) ((_bv)->bits[(bit)>>BU_BITV_SHIFT] |= (((bitv_t)1)<<((bit)&BU_BITV_MASK))) |
|
#define | BU_BITCLR(_bv, bit) ((_bv)->bits[(bit)>>BU_BITV_SHIFT] &= ~(((bitv_t)1)<<((bit)&BU_BITV_MASK))) |
|
#define | BU_BITV_ZEROALL(_bv) |
|
#define | BU_BITV_BITNUM_CHECK(_bv, _bit) |
|
#define | BU_BITV_NBITS_CHECK(_bv, _nbits) |
|
#define | BU_BITV_LOOP_START(_bv) |
|
#define | BU_BITV_LOOP_INDEX ((_wd << BU_BITV_SHIFT) | _b) |
|
#define | BU_BITV_LOOP_END |
|
|
size_t | bu_bitv_shift (void) |
|
struct bu_bitv * | bu_bitv_new (size_t nbits) |
|
void | bu_bitv_free (struct bu_bitv *bv) |
|
void | bu_bitv_clear (struct bu_bitv *bv) |
|
void | bu_bitv_or (struct bu_bitv *ov, const struct bu_bitv *iv) |
|
void | bu_bitv_and (struct bu_bitv *ov, const struct bu_bitv *iv) |
|
void | bu_bitv_vls (struct bu_vls *v, const struct bu_bitv *bv) |
|
void | bu_pr_bitv (const char *str, const struct bu_bitv *bv) |
|
void | bu_bitv_to_hex (struct bu_vls *v, const struct bu_bitv *bv) |
|
struct bu_bitv * | bu_hex_to_bitv (const char *str) |
|
void | bu_bitv_to_binary (struct bu_vls *v, const struct bu_bitv *bv) |
|
struct bu_bitv * | bu_binary_to_bitv (const char *str) |
|
struct bu_bitv * | bu_binary_to_bitv2 (const char *str, const int nbytes) |
|
int | bu_bitv_compare_equal (const struct bu_bitv *, const struct bu_bitv *) |
|
int | bu_bitv_compare_equal2 (const struct bu_bitv *, const struct bu_bitv *) |
|
struct bu_bitv * | bu_bitv_dup (const struct bu_bitv *bv) |
|
int | bu_hexstr_to_binstr (const char *hexstr, struct bu_vls *b) |
|
int | bu_binstr_to_hexstr (const char *binstr, struct bu_vls *h) |
|
void | bu_printb (const char *label, unsigned long bits, const char *format) |
| Bit field printing implementation. More...
|
|
void | bu_vls_printb (struct bu_vls *vls, const char *label, unsigned long bits, const char *format) |
|