Lines Matching defs:first

55  * The index of the first bit set needs to be obtained via
86 * The idx member contains the bit index of the first bit described by this
87 * node, while the mask member stores the setting of the first 32-bits.
617 * by first remembering the location of the next
993 /* With num > 0, the first bit must be set. */
1024 /* With num > 0, the first bit must be cleared. */
1085 /* Returns the index of the first set bit. Abort if no bits are set.
1098 /* Returns the index of the first cleared bit. Abort if
1108 /* If no nodes or first node index > 0 then lowest cleared is 0 */
1113 /* Does the mask in the first node contain any cleared bits. */
1118 * All mask bits set in first node. If there isn't a second node
1119 * then the first cleared bit is the first bit after the bits
1120 * described by the first node.
1125 * No second node. First cleared bit is first bit beyond
1126 * bits described by first node.
1135 * If it is not adjacent to the first node, then there is a gap
1136 * of cleared bits between the nodes, and the first cleared bit
1137 * is the first bit within the gap.
1143 * Second node is adjacent to the first node.
1202 * Candidate points to the first node with a starting index
1234 * this, the next bit is the first bit in the next node, if
1275 * by bit after the bits described by the first node.
1283 * If it is not adjacent to the first node, then there is a gap
1285 * is the first bit within the gap.
1291 * Second node is adjacent to the first node.
1301 * and returns the index of the first sequence of num consecutively set
1336 * and returns the index of the first sequence of num consecutively cleared
1384 * Leading - bits before first mask boundary.
1465 /* Leading - bits before first mask boundary */
1896 sparsebit_idx_t first, last;
1909 if (ranges[i].first <= idx && idx <= ranges[i].last)
1915 static void operate(int code, sparsebit_idx_t first, sparsebit_idx_t last)
1920 if (first < last) {
1921 num = last - first + 1;
1923 num = first - last + 1;
1924 first = last;
1925 last = first + num - 1;
1930 sparsebit_set(s, first);
1931 assert(sparsebit_is_set(s, first));
1932 assert(!sparsebit_is_clear(s, first));
1935 if (get_value(first))
1940 { .first = first, .last = first, .set = true };
1943 sparsebit_clear(s, first);
1944 assert(!sparsebit_is_set(s, first));
1945 assert(sparsebit_is_clear(s, first));
1948 if (!get_value(first))
1953 { .first = first, .last = first, .set = false };
1956 assert(sparsebit_is_set(s, first) == get_value(first));
1957 assert(sparsebit_is_clear(s, first) == !get_value(first));
1969 { .first = 0, .last = ~(sparsebit_idx_t)0, .set = true };
1982 next = sparsebit_next_set(s, first);
1983 assert(next == 0 || next > first);
1987 next = sparsebit_next_clear(s, first);
1988 assert(next == 0 || next > first);
1992 next = sparsebit_next_clear(s, first);
1993 if (sparsebit_is_set_num(s, first, num)) {
1995 if (first)
1996 next = sparsebit_next_set(s, first - 1);
2001 assert(next == first);
2003 assert(sparsebit_is_clear(s, first) || next <= last);
2007 next = sparsebit_next_set(s, first);
2008 if (sparsebit_is_clear_num(s, first, num)) {
2010 if (first)
2011 next = sparsebit_next_clear(s, first - 1);
2016 assert(next == first);
2018 assert(sparsebit_is_set(s, first) || next <= last);
2022 sparsebit_set_num(s, first, num);
2023 assert(sparsebit_is_set_num(s, first, num));
2024 assert(!sparsebit_is_clear_num(s, first, num));
2030 { .first = first, .last = last, .set = true };
2033 sparsebit_clear_num(s, first, num);
2034 assert(!sparsebit_is_set_num(s, first, num));
2035 assert(sparsebit_is_clear_num(s, first, num));
2041 { .first = first, .last = last, .set = false };
2080 uint64_t first = get64();
2083 operate(op, first, last);