Lines Matching full: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 in node_reduce()
974 /* First clear any bits already set in the destination */ in sparsebit_copy()
992 /* With num > 0, the first bit must be set. */ in sparsebit_is_set_num()
1023 /* With num > 0, the first bit must be cleared. */ in sparsebit_is_clear_num()
1084 /* Returns the index of the first set bit. Abort if no bits are set.
1097 /* Returns the index of the first cleared bit. Abort if
1107 /* If no nodes or first node index > 0 then lowest cleared is 0 */ in sparsebit_first_clear()
1112 /* Does the mask in the first node contain any cleared bits. */ in sparsebit_first_clear()
1117 * All mask bits set in first node. If there isn't a second node in sparsebit_first_clear()
1118 * then the first cleared bit is the first bit after the bits in sparsebit_first_clear()
1119 * described by the first node. in sparsebit_first_clear()
1124 * No second node. First cleared bit is first bit beyond in sparsebit_first_clear()
1125 * bits described by first node. in sparsebit_first_clear()
1134 * If it is not adjacent to the first node, then there is a gap in sparsebit_first_clear()
1135 * of cleared bits between the nodes, and the first cleared bit in sparsebit_first_clear()
1136 * is the first bit within the gap. in sparsebit_first_clear()
1142 * Second node is adjacent to the first node. in sparsebit_first_clear()
1201 * Candidate points to the first node with a starting index in sparsebit_next_set()
1233 * this, the next bit is the first bit in the next node, if in sparsebit_next_set()
1274 * by bit after the bits described by the first node. in sparsebit_next_clear()
1282 * If it is not adjacent to the first node, then there is a gap in sparsebit_next_clear()
1284 * is the first bit within the gap. in sparsebit_next_clear()
1290 * Second node is adjacent to the first node. in sparsebit_next_clear()
1300 * and returns the index of the first sequence of num consecutively set
1335 * and returns the index of the first sequence of num consecutively cleared
1383 * Leading - bits before first mask boundary. in sparsebit_set_num()
1464 /* Leading - bits before first mask boundary */ in sparsebit_clear_num()
1894 sparsebit_idx_t first, last; member
1907 if (ranges[i].first <= idx && idx <= ranges[i].last) in get_value()
1913 static void operate(int code, sparsebit_idx_t first, sparsebit_idx_t last) in operate() argument
1918 if (first < last) { in operate()
1919 num = last - first + 1; in operate()
1921 num = first - last + 1; in operate()
1922 first = last; in operate()
1923 last = first + num - 1; in operate()
1928 sparsebit_set(s, first); in operate()
1929 assert(sparsebit_is_set(s, first)); in operate()
1930 assert(!sparsebit_is_clear(s, first)); in operate()
1933 if (get_value(first)) in operate()
1938 { .first = first, .last = first, .set = true }; in operate()
1941 sparsebit_clear(s, first); in operate()
1942 assert(!sparsebit_is_set(s, first)); in operate()
1943 assert(sparsebit_is_clear(s, first)); in operate()
1946 if (!get_value(first)) in operate()
1951 { .first = first, .last = first, .set = false }; in operate()
1954 assert(sparsebit_is_set(s, first) == get_value(first)); in operate()
1955 assert(sparsebit_is_clear(s, first) == !get_value(first)); in operate()
1967 { .first = 0, .last = ~(sparsebit_idx_t)0, .set = true }; in operate()
1980 next = sparsebit_next_set(s, first); in operate()
1981 assert(next == 0 || next > first); in operate()
1985 next = sparsebit_next_clear(s, first); in operate()
1986 assert(next == 0 || next > first); in operate()
1990 next = sparsebit_next_clear(s, first); in operate()
1991 if (sparsebit_is_set_num(s, first, num)) { in operate()
1993 if (first) in operate()
1994 next = sparsebit_next_set(s, first - 1); in operate()
1999 assert(next == first); in operate()
2001 assert(sparsebit_is_clear(s, first) || next <= last); in operate()
2005 next = sparsebit_next_set(s, first); in operate()
2006 if (sparsebit_is_clear_num(s, first, num)) { in operate()
2008 if (first) in operate()
2009 next = sparsebit_next_clear(s, first - 1); in operate()
2014 assert(next == first); in operate()
2016 assert(sparsebit_is_set(s, first) || next <= last); in operate()
2020 sparsebit_set_num(s, first, num); in operate()
2021 assert(sparsebit_is_set_num(s, first, num)); in operate()
2022 assert(!sparsebit_is_clear_num(s, first, num)); in operate()
2028 { .first = first, .last = last, .set = true }; in operate()
2031 sparsebit_clear_num(s, first, num); in operate()
2032 assert(!sparsebit_is_set_num(s, first, num)); in operate()
2033 assert(sparsebit_is_clear_num(s, first, num)); in operate()
2039 { .first = first, .last = last, .set = false }; in operate()
2078 uint64_t first = get64(); in main() local
2081 operate(op, first, last); in main()