Lines Matching defs:BITSET_WORDBITS
42 #define BITSET_WORDBITS (sizeof (BITSET_WORD) * 8)
46 #define BITSET_WORDS(bits) (((bits) + BITSET_WORDBITS - 1) / BITSET_WORDBITS)
56 #define BITSET_BITWORD(b) ((b) / BITSET_WORDBITS)
57 #define BITSET_BIT(b) (1u << ((b) % BITSET_WORDBITS))
65 #define BITSET_MASK(b) (((b) % BITSET_WORDBITS == 0) ? ~0 : BITSET_BIT(b) - 1)
111 assert(amount < BITSET_WORDBITS);
117 x[i] = (x[i] >> amount) | (x[i + 1] << (BITSET_WORDBITS - amount));
126 assert(amount < BITSET_WORDBITS);
132 x[i] = (x[i] << amount) | (x[i - 1] >> (BITSET_WORDBITS - amount));
141 const unsigned int words = amount / BITSET_WORDBITS;
155 amount %= BITSET_WORDBITS;
165 const int words = amount / BITSET_WORDBITS;
181 amount %= BITSET_WORDBITS;
212 const unsigned start_mod = start % BITSET_WORDBITS;
214 if (start_mod + size <= BITSET_WORDBITS) {
217 const unsigned first_size = BITSET_WORDBITS - start_mod;
233 if ((i + 1) * BITSET_WORDBITS <= b) {
236 prefix += util_bitcount(x[i] & BITFIELD_MASK(b - i * BITSET_WORDBITS));
269 return ffs(x[i]) + BITSET_WORDBITS * i;
282 return util_last_bit(x[i]) + BITSET_WORDBITS * i;
321 return word * BITSET_WORDBITS + bit;
359 *start = word * BITSET_WORDBITS + ffs(tmp) - 1;
384 *end = MIN2(word * BITSET_WORDBITS + ffs(~tmp) - 1, size);