Lines Matching refs:b
57 #define BITSET_BITWORD(b) ((b) / BITSET_WORDBITS) argument
58 #define BITSET_BIT(b) (1u << ((b) % BITSET_WORDBITS)) argument
62 #define BITSET_TEST(x, b) (((x)[BITSET_BITWORD(b)] & BITSET_BIT(b)) != 0) argument
63 #define BITSET_SET(x, b) ((x)[BITSET_BITWORD(b)] |= BITSET_BIT(b)) argument
64 #define BITSET_CLEAR(x, b) ((x)[BITSET_BITWORD(b)] &= ~BITSET_BIT(b)) argument
66 #define BITSET_MASK(b) (((b) % BITSET_WORDBITS == 0) ? ~0 : BITSET_BIT(b) - 1) argument
67 #define BITSET_RANGE(b, e) ((BITSET_MASK((e) + 1)) & ~(BITSET_BIT(b) - 1)) argument
210 #define BITSET_TEST_RANGE_INSIDE_WORD(x, b, e) \ argument
211 (BITSET_BITWORD(b) == BITSET_BITWORD(e) ? \
212 (((x)[BITSET_BITWORD(b)] & BITSET_RANGE(b, e)) != 0) : \
214 #define BITSET_SET_RANGE_INSIDE_WORD(x, b, e) \ argument
215 (BITSET_BITWORD(b) == BITSET_BITWORD(e) ? \
216 ((x)[BITSET_BITWORD(b)] |= BITSET_RANGE(b, e)) : \
218 #define BITSET_CLEAR_RANGE_INSIDE_WORD(x, b, e) \ argument
219 (BITSET_BITWORD(b) == BITSET_BITWORD(e) ? \
220 ((x)[BITSET_BITWORD(b)] &= ~BITSET_RANGE(b, e)) : \
239 #define BITSET_TEST_RANGE(x, b, e) \ argument
240 __bitset_test_range(x, b, e)
258 #define BITSET_SET_RANGE(x, b, e) \ argument
259 __bitset_set_range(x, b, e)
277 #define BITSET_CLEAR_RANGE(x, b, e) \ argument
278 __bitclear_clear_range(x, b, e)
281 __bitset_prefix_sum(const BITSET_WORD *x, unsigned b, unsigned n) in __bitset_prefix_sum() argument
286 if ((i + 1) * BITSET_WORDBITS <= b) { in __bitset_prefix_sum()
289 prefix += util_bitcount(x[i] & BITFIELD_MASK(b - i * BITSET_WORDBITS)); in __bitset_prefix_sum()
307 #define BITSET_PREFIX_SUM(x, b) \ argument
308 __bitset_prefix_sum(x, b, ARRAY_SIZE(x))
494 operator==(const T &b, const T &c) \
496 return BITSET_EQUAL(b.words, c.words); \
500 operator!=(const T &b, const T &c) \
502 return !(b == c); \
506 operator==(const T &b, int x) \
509 return b == c; \
513 operator!=(const T &b, int x) \
515 return !(b == x); \
519 operator~(const T &b) \
523 c.words[i] = ~b.words[i]; \
528 operator|=(const T &b) \
531 words[i] |= b.words[i]; \
536 operator|(const T &b, const T &c) \
538 T d = b; \
544 operator&=(const T &b) \
547 words[i] &= b.words[i]; \
552 operator&(const T &b, const T &c) \
554 T d = b; \