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()
650 assert(nodep->idx + MASK_BITS > nodep->idx); in node_reduce()
652 nodep->idx += MASK_BITS; in node_reduce()
654 if (nodep->num_after >= MASK_BITS) { in node_reduce()
656 nodep->num_after -= MASK_BITS; in node_reduce()
687 prev->idx + MASK_BITS == nodep->idx) { in node_reduce()
688 prev->num_after += MASK_BITS + nodep->num_after; in node_reduce()
701 prev_highest_bit = prev->idx + MASK_BITS - 1 + prev->num_after; in node_reduce()
732 if (num_contiguous == MASK_BITS) { in node_reduce()
759 if (next->idx == nodep->idx + MASK_BITS + nodep->num_after && in node_reduce()
761 nodep->num_after += MASK_BITS; in node_reduce()
787 idx <= nodep->idx + MASK_BITS + nodep->num_after - 1) in sparsebit_is_set()
794 if (nodep->num_after && idx >= nodep->idx + MASK_BITS) in sparsebit_is_set()
798 assert(idx >= nodep->idx && idx - nodep->idx < MASK_BITS); in sparsebit_is_set()
818 nodep = node_split(s, idx & -MASK_BITS); in bit_set()
821 assert(idx >= nodep->idx && idx <= nodep->idx + MASK_BITS - 1); in bit_set()
849 if (idx >= nodep->idx + MASK_BITS) in bit_clear()
850 nodep = node_split(s, idx & -MASK_BITS); in bit_clear()
856 assert(idx >= nodep->idx && idx <= nodep->idx + MASK_BITS - 1); in bit_clear()
1067 (s->root->num_after == ((sparsebit_num_t) 0) - MASK_BITS && in sparsebit_any_set()
1129 assert(nodep1->idx + MASK_BITS + nodep1->num_after != (sparsebit_idx_t) 0); in sparsebit_first_clear()
1130 return nodep1->idx + MASK_BITS + nodep1->num_after; in sparsebit_first_clear()
1139 if (nodep1->idx + MASK_BITS + nodep1->num_after != nodep2->idx) in sparsebit_first_clear()
1140 return nodep1->idx + MASK_BITS + nodep1->num_after; in sparsebit_first_clear()
1181 if ((nodep->idx + MASK_BITS + nodep->num_after - 1) in sparsebit_next_set()
1220 if (start < MASK_BITS && candidate->mask >= (1 << start)) in sparsebit_next_set()
1224 sparsebit_idx_t first_num_after_idx = candidate->idx + MASK_BITS; in sparsebit_next_set()
1268 for (idx = lowest_possible - nodep1->idx; idx < MASK_BITS; idx++) in sparsebit_next_clear()
1279 return nodep1->idx + MASK_BITS + nodep1->num_after; in sparsebit_next_clear()
1287 if (nodep1->idx + MASK_BITS + nodep1->num_after != nodep2->idx) in sparsebit_next_clear()
1288 return nodep1->idx + MASK_BITS + nodep1->num_after; in sparsebit_next_clear()
1403 for (idx = start, n = num; n > 0 && idx % MASK_BITS != 0; idx++, n--) in sparsebit_set_num()
1408 middle_end = middle_start + (n & -MASK_BITS) - 1; in sparsebit_set_num()
1409 if (n >= MASK_BITS) { in sparsebit_set_num()
1424 assert(next->idx + MASK_BITS + next->num_after - 1 <= middle_end); in sparsebit_set_num()
1430 for (n1 = 0; n1 < MASK_BITS; n1++) { in sparsebit_set_num()
1438 nodep->num_after = middle_end - middle_start + 1 - MASK_BITS; in sparsebit_set_num()
1447 assert(n < MASK_BITS); in sparsebit_set_num()
1466 for (idx = start, n = num; n > 0 && idx % MASK_BITS != 0; idx++, n--) in sparsebit_clear_num()
1471 middle_end = middle_start + (n & -MASK_BITS) - 1; in sparsebit_clear_num()
1472 if (n >= MASK_BITS) { in sparsebit_clear_num()
1487 assert(next->idx + MASK_BITS + next->num_after - 1 <= middle_end); in sparsebit_clear_num()
1493 for (n1 = 0; n1 < MASK_BITS; n1++) { in sparsebit_clear_num()
1516 assert(n < MASK_BITS); in sparsebit_clear_num()
1606 for (n1 = 0; n1 < MASK_BITS; n1++) { in sparsebit_dump()
1610 for (; n1 < MASK_BITS; n1++) { in sparsebit_dump()
1617 if ((n1 == MASK_BITS) && nodep->num_after) in sparsebit_dump()
1650 if (!(nodep->mask & (1 << (MASK_BITS - 1))) && nodep->num_after) { in sparsebit_dump()
1651 low = nodep->idx + MASK_BITS; in sparsebit_dump()
1652 high = nodep->idx + MASK_BITS + nodep->num_after - 1; in sparsebit_dump()
1700 for (n1 = 0; n1 < MASK_BITS; n1++) in sparsebit_validate_internal()
1733 > (~(sparsebit_num_t) 0) - MASK_BITS + 1) { in sparsebit_validate_internal()
1742 if (nodep->idx % MASK_BITS) { in sparsebit_validate_internal()
1747 nodep, nodep->idx, MASK_BITS); in sparsebit_validate_internal()
1756 if ((nodep->idx + MASK_BITS + nodep->num_after - 1) < nodep->idx) { in sparsebit_validate_internal()
1761 nodep, nodep->idx, MASK_BITS, nodep->num_after); in sparsebit_validate_internal()
1822 if ((prev->idx + MASK_BITS + prev->num_after - 1) in sparsebit_validate_internal()
1833 MASK_BITS); in sparsebit_validate_internal()
1844 prev->idx + MASK_BITS + prev->num_after == nodep->idx) { in sparsebit_validate_internal()
1855 MASK_BITS); in sparsebit_validate_internal()