Lines Matching refs:MASK_BITS
166 #define MASK_BITS (sizeof(mask_t) * CHAR_BIT) macro
318 idx <= nodep->idx + MASK_BITS + nodep->num_after - 1) in node_find()
344 nodep->idx = idx & -MASK_BITS; in node_add()
366 assert(idx > parentp->idx + MASK_BITS + parentp->num_after - 1); in node_add()
382 while (prev && prev->idx + MASK_BITS + prev->num_after - 1 >= nodep->idx) { in node_add()
383 unsigned int n1 = (prev->idx + MASK_BITS + prev->num_after - 1) in node_add()
386 assert(n1 < MASK_BITS); in node_add()
504 assert(!(idx % MASK_BITS)); in node_split()
530 offset = idx - (nodep1->idx + MASK_BITS); in node_split()
542 if (nodep2->num_after >= MASK_BITS) { in node_split()
544 nodep2->num_after -= MASK_BITS; in node_split()
649 assert(nodep->idx + MASK_BITS > nodep->idx); in node_reduce()
651 nodep->idx += MASK_BITS; in node_reduce()
653 if (nodep->num_after >= MASK_BITS) { in node_reduce()
655 nodep->num_after -= MASK_BITS; in node_reduce()
686 prev->idx + MASK_BITS == nodep->idx) { in node_reduce()
687 prev->num_after += MASK_BITS + nodep->num_after; in node_reduce()
700 prev_highest_bit = prev->idx + MASK_BITS - 1 + prev->num_after; in node_reduce()
731 if (num_contiguous == MASK_BITS) { in node_reduce()
758 if (next->idx == nodep->idx + MASK_BITS + nodep->num_after && in node_reduce()
760 nodep->num_after += MASK_BITS; in node_reduce()
786 idx <= nodep->idx + MASK_BITS + nodep->num_after - 1) in sparsebit_is_set()
793 if (nodep->num_after && idx >= nodep->idx + MASK_BITS) in sparsebit_is_set()
797 assert(idx >= nodep->idx && idx - nodep->idx < MASK_BITS); in sparsebit_is_set()
817 nodep = node_split(s, idx & -MASK_BITS); in bit_set()
820 assert(idx >= nodep->idx && idx <= nodep->idx + MASK_BITS - 1); in bit_set()
848 if (idx >= nodep->idx + MASK_BITS) in bit_clear()
849 nodep = node_split(s, idx & -MASK_BITS); in bit_clear()
855 assert(idx >= nodep->idx && idx <= nodep->idx + MASK_BITS - 1); in bit_clear()
1066 (s->root->num_after == ((sparsebit_num_t) 0) - MASK_BITS && in sparsebit_any_set()
1128 assert(nodep1->idx + MASK_BITS + nodep1->num_after != (sparsebit_idx_t) 0); in sparsebit_first_clear()
1129 return nodep1->idx + MASK_BITS + nodep1->num_after; in sparsebit_first_clear()
1138 if (nodep1->idx + MASK_BITS + nodep1->num_after != nodep2->idx) in sparsebit_first_clear()
1139 return nodep1->idx + MASK_BITS + nodep1->num_after; in sparsebit_first_clear()
1180 if ((nodep->idx + MASK_BITS + nodep->num_after - 1) in sparsebit_next_set()
1219 if (start < MASK_BITS && candidate->mask >= (1 << start)) in sparsebit_next_set()
1223 sparsebit_idx_t first_num_after_idx = candidate->idx + MASK_BITS; in sparsebit_next_set()
1267 for (idx = lowest_possible - nodep1->idx; idx < MASK_BITS; idx++) in sparsebit_next_clear()
1278 return nodep1->idx + MASK_BITS + nodep1->num_after; in sparsebit_next_clear()
1286 if (nodep1->idx + MASK_BITS + nodep1->num_after != nodep2->idx) in sparsebit_next_clear()
1287 return nodep1->idx + MASK_BITS + nodep1->num_after; in sparsebit_next_clear()
1402 for (idx = start, n = num; n > 0 && idx % MASK_BITS != 0; idx++, n--) in sparsebit_set_num()
1407 middle_end = middle_start + (n & -MASK_BITS) - 1; in sparsebit_set_num()
1408 if (n >= MASK_BITS) { in sparsebit_set_num()
1423 assert(next->idx + MASK_BITS + next->num_after - 1 <= middle_end); in sparsebit_set_num()
1429 for (n1 = 0; n1 < MASK_BITS; n1++) { in sparsebit_set_num()
1437 nodep->num_after = middle_end - middle_start + 1 - MASK_BITS; in sparsebit_set_num()
1446 assert(n < MASK_BITS); in sparsebit_set_num()
1465 for (idx = start, n = num; n > 0 && idx % MASK_BITS != 0; idx++, n--) in sparsebit_clear_num()
1470 middle_end = middle_start + (n & -MASK_BITS) - 1; in sparsebit_clear_num()
1471 if (n >= MASK_BITS) { in sparsebit_clear_num()
1486 assert(next->idx + MASK_BITS + next->num_after - 1 <= middle_end); in sparsebit_clear_num()
1492 for (n1 = 0; n1 < MASK_BITS; n1++) { in sparsebit_clear_num()
1515 assert(n < MASK_BITS); in sparsebit_clear_num()
1605 for (n1 = 0; n1 < MASK_BITS; n1++) { in sparsebit_dump()
1609 for (; n1 < MASK_BITS; n1++) { in sparsebit_dump()
1616 if ((n1 == MASK_BITS) && nodep->num_after) in sparsebit_dump()
1649 if (!(nodep->mask & (1 << (MASK_BITS - 1))) && nodep->num_after) { in sparsebit_dump()
1650 low = nodep->idx + MASK_BITS; in sparsebit_dump()
1651 high = nodep->idx + MASK_BITS + nodep->num_after - 1; in sparsebit_dump()
1699 for (n1 = 0; n1 < MASK_BITS; n1++) in sparsebit_validate_internal()
1732 > (~(sparsebit_num_t) 0) - MASK_BITS + 1) { in sparsebit_validate_internal()
1741 if (nodep->idx % MASK_BITS) { in sparsebit_validate_internal()
1746 nodep, nodep->idx, MASK_BITS); in sparsebit_validate_internal()
1755 if ((nodep->idx + MASK_BITS + nodep->num_after - 1) < nodep->idx) { in sparsebit_validate_internal()
1760 nodep, nodep->idx, MASK_BITS, nodep->num_after); in sparsebit_validate_internal()
1821 if ((prev->idx + MASK_BITS + prev->num_after - 1) in sparsebit_validate_internal()
1832 MASK_BITS); in sparsebit_validate_internal()
1843 prev->idx + MASK_BITS + prev->num_after == nodep->idx) { in sparsebit_validate_internal()
1854 MASK_BITS); in sparsebit_validate_internal()