Lines Matching refs:num_after
173 sparsebit_num_t num_after; /* num contiguously set after mask */ member
199 return nodep->num_after + __builtin_popcount(nodep->mask); in node_num_set()
289 root->num_after = subtree->num_after; in node_copy_subtree()
318 idx <= nodep->idx + MASK_BITS + nodep->num_after - 1) in node_find()
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()
385 assert(prev->num_after > 0); in node_add()
389 prev->num_after--; in node_add()
531 orig_num_after = nodep1->num_after; in node_split()
537 nodep1->num_after = offset; in node_split()
541 nodep2->num_after = orig_num_after - offset; in node_split()
542 if (nodep2->num_after >= MASK_BITS) { in node_split()
544 nodep2->num_after -= MASK_BITS; in node_split()
546 nodep2->mask = (1 << nodep2->num_after) - 1; in node_split()
547 nodep2->num_after = 0; in node_split()
610 if (nodep->mask == 0 && nodep->num_after == 0) { in node_reduce()
648 assert(nodep->num_after != 0); in node_reduce()
653 if (nodep->num_after >= MASK_BITS) { in node_reduce()
655 nodep->num_after -= MASK_BITS; in node_reduce()
657 nodep->mask = (1u << nodep->num_after) - 1; in node_reduce()
658 nodep->num_after = 0; in node_reduce()
674 if (prev->mask == 0 && prev->num_after == 0) { in node_reduce()
687 prev->num_after += MASK_BITS + nodep->num_after; in node_reduce()
689 nodep->num_after = 0; in node_reduce()
700 prev_highest_bit = prev->idx + MASK_BITS - 1 + prev->num_after; in node_reduce()
715 prev->num_after += num_contiguous; in node_reduce()
732 prev->num_after += nodep->num_after; in node_reduce()
733 nodep->num_after = 0; in node_reduce()
748 if (next->mask == 0 && next->num_after == 0) { 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()
762 nodep->num_after += next->num_after; in node_reduce()
763 next->num_after = 0; 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()
889 indent, "", nodep->idx, nodep->mask, nodep->num_after); in dump_nodes()
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()
1222 if (candidate->num_after) { in sparsebit_next_set()
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()
1423 assert(next->idx + MASK_BITS + next->num_after - 1 <= middle_end); in sparsebit_set_num()
1436 s->num_set -= nodep->num_after; in sparsebit_set_num()
1437 nodep->num_after = middle_end - middle_start + 1 - MASK_BITS; in sparsebit_set_num()
1438 s->num_set += nodep->num_after; in sparsebit_set_num()
1486 assert(next->idx + MASK_BITS + next->num_after - 1 <= middle_end); in sparsebit_clear_num()
1500 s->num_set -= nodep->num_after; in sparsebit_clear_num()
1501 nodep->num_after = 0; in sparsebit_clear_num()
1616 if ((n1 == MASK_BITS) && nodep->num_after) in sparsebit_dump()
1617 high += nodep->num_after; in sparsebit_dump()
1649 if (!(nodep->mask & (1 << (MASK_BITS - 1))) && nodep->num_after) { in sparsebit_dump()
1651 high = nodep->idx + MASK_BITS + nodep->num_after - 1; in sparsebit_dump()
1703 total_bits_set += nodep->num_after; in sparsebit_validate_internal()
1731 if (nodep->num_after in sparsebit_validate_internal()
1735 nodep, nodep->num_after); 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()
1830 prev, prev->idx, prev->num_after, in sparsebit_validate_internal()
1831 nodep, nodep->idx, nodep->num_after, in sparsebit_validate_internal()
1843 prev->idx + MASK_BITS + prev->num_after == nodep->idx) { in sparsebit_validate_internal()
1852 prev, prev->idx, prev->num_after, in sparsebit_validate_internal()
1853 nodep, nodep->idx, nodep->num_after, in sparsebit_validate_internal()