Lines Matching refs:set
20 * the pointer (e.g. set it to NULL) to the struct sparsebit before
43 * A common operation, is to itterate over all the bits set in a test
55 * The index of the first bit set needs to be obtained via
57 * the index of the previously set. The sparsebit_idx_t type is
60 * is at least 1 bit in the array set. This is because sparsebit_first_set()
61 * aborts if sparsebit_first_set() is called with no bits set.
63 * sparsebit array has at least a single bit set before calling
72 * set. It is also efficient in memory usage when most of the bits are
73 * set.
97 * number of bits immediately after the mask bits that are contiguously set.
99 * represent cases where most bits are set. For example, the case of all
100 * but the last two bits set, is represented by the following two nodes:
108 * + Node are only used to represent bits that are set.
111 * + Sum of bits set in all the nodes is equal to the value of
117 * + A node with all mask bits set only occurs when the last bit
147 * bit, there is a small delay between when the mask bit is set and the
153 * has no bits set. Such temporary violations must be corrected before
173 sparsebit_num_t num_after; /* num contiguously set after mask */
180 * tree. Equal to NULL when no bits are set in
186 * A redundant count of the total number of bits set. Used for
189 * Note: Due to overflow, a value of 0 means none or all set.
194 /* Returns the number of set bits described by the settings
308 * contiguous bits set after the mask. Returns NULL if there is no such node.
346 /* If no nodes, set it up as the root node. */
378 * of the new node? If so set the bits in the new nodes mask
395 /* Returns whether all the bits in the sparsebit array are set. */
399 * If any nodes there must be at least one bit set. Only case
400 * where a bit is set and total num set is 0, is when all bits
401 * are set.
555 * all bits set adjacent to a previous node, will get combined into a
578 * bit caused the mask to have leading only or trailing only bits set.
580 * node address that it set a mask bit in, and node_reduce() will notice
587 * + Node are only used to represent bits that are set.
593 * + A node with all mask bits set only occurs when the last bit
674 /* Nodes with no bits set can be removed. */
683 * All mask bits set and previous node has
706 * Is equal to the total number of set
709 * set bits.
721 * case where all mask bits are set and there
748 /* Nodes with no bits set can be removed. */
757 * and has a mask with all bits set?
777 * sparsebit array is set or not.
793 /* Bit is set if it is any of the bits described by num_after */
797 /* Is the corresponding mask bit set */
809 /* Skip bits that are already set */
970 * sparsebit_alloc(). It can though already have bits set, which
975 /* First clear any bits already set in the destination */
984 /* Returns whether num consecutive bits starting at idx are all set. */
993 /* With num > 0, the first bit must be set. */
1002 * set bits. idx + num doesn't wrap. Otherwise check if
1003 * there are enough set bits between idx and the next cleared bit.
1028 /* Find the next set bit */
1032 * If no set bits beyond idx, then there are at least num
1034 * there are enough cleared bits between idx and the next set bit.
1039 /* Returns the total number of bits set. Note: 0 is also returned for
1040 * the case of all bits set. This is because with all bits set, there
1041 * is 1 additional bit set beyond what can be represented in the return
1043 * to determine if the sparsebit array has any bits set.
1050 /* Returns whether any bit is set in the sparsebit array. */
1054 * Nodes only describe set bits. If any nodes then there
1055 * is at least 1 bit set.
1063 * which is a quick check that at least 1 bit is set.
1079 /* Returns whether all the bits in the sparsebit array are set. */
1085 /* Returns the index of the first set bit. Abort if no bits are set.
1091 /* Validate at least 1 bit is set */
1118 * All mask bits set in first node. If there isn't a second node
1145 * its mask bits are set, then with it being adjacent, it should
1152 /* Returns index of next bit set within s after the index given by prev.
1153 * Returns 0 if there are no bits after prev that are set.
1162 /* A bit after the highest index can't be set. */
1216 * a bit at or after an index of lowest_possible that is set.
1236 * there is no next set bit.
1255 /* A bit after the highest index can't be set. */
1293 * its mask bits are set, then with it being adjacent, it should
1301 * and returns the index of the first sequence of num consecutively set
1318 * num set bits?
1324 * Sequence of set bits at idx isn't large enough.
1325 * Skip this entire sequence of set bits.
1392 * 2. Form mask of bits to be set.
1393 * 3. Determine number of mask bits already set in the node
1397 * by the number of bits that were actually set.
1398 * Exclude from the counts bits that were already set.
1429 /* As needed set each of the mask bits */
1583 * are set. Note that a ':', instead of a '-' is used to specify a range of
1647 * set, then still need to display a range for the bits
1697 * Increase total bits set by the number of bits set
1709 * have only one valid means to represent a set of bits.
1725 * represents all bits set. This limitation is handled
1839 * When the node has all mask bits set, it shouldn't
1846 "all bits set and is adjacent to the "
1865 * Is sum of bits set in each node equal to the count
1866 * of total bits set.
1869 fprintf(stderr, "Number of bits set missmatch,\n"
1897 bool set;
1910 return ranges[i].set;
1940 { .first = first, .last = first, .set = true };
1953 { .first = first, .last = first, .set = false };
1969 { .first = 0, .last = ~(sparsebit_idx_t)0, .set = true };
2030 { .first = first, .last = last, .set = true };
2041 { .first = first, .last = last, .set = false };