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()
975 /* First clear any bits already set in the destination */ in sparsebit_copy()
993 /* With num > 0, the first bit must be set. */ in sparsebit_is_set_num()
1024 /* With num > 0, the first bit must be cleared. */ in sparsebit_is_clear_num()
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 */ in sparsebit_first_clear()
1113 /* Does the mask in the first node contain any cleared bits. */ in sparsebit_first_clear()
1118 * All mask bits set in first node. If there isn't a second node in sparsebit_first_clear()
1119 * then the first cleared bit is the first bit after the bits in sparsebit_first_clear()
1120 * described by the first node. in sparsebit_first_clear()
1125 * No second node. First cleared bit is first bit beyond in sparsebit_first_clear()
1126 * bits described by first node. in sparsebit_first_clear()
1135 * If it is not adjacent to the first node, then there is a gap in sparsebit_first_clear()
1136 * of cleared bits between the nodes, and the first cleared bit in sparsebit_first_clear()
1137 * is the first bit within the gap. in sparsebit_first_clear()
1143 * Second node is adjacent to the first node. in sparsebit_first_clear()
1202 * Candidate points to the first node with a starting index in sparsebit_next_set()
1234 * this, the next bit is the first bit in the next node, if in sparsebit_next_set()
1275 * by bit after the bits described by the first node. in sparsebit_next_clear()
1283 * If it is not adjacent to the first node, then there is a gap in sparsebit_next_clear()
1285 * is the first bit within the gap. in sparsebit_next_clear()
1291 * Second node is adjacent to the first node. in sparsebit_next_clear()
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. in sparsebit_set_num()
1465 /* Leading - bits before first mask boundary */ in sparsebit_clear_num()
1895 sparsebit_idx_t first, last; member
1908 if (ranges[i].first <= idx && idx <= ranges[i].last) in get_value()
1914 static void operate(int code, sparsebit_idx_t first, sparsebit_idx_t last) in operate() argument
1919 if (first < last) { in operate()
1920 num = last - first + 1; in operate()
1922 num = first - last + 1; in operate()
1923 first = last; in operate()
1924 last = first + num - 1; in operate()
1929 sparsebit_set(s, first); in operate()
1930 assert(sparsebit_is_set(s, first)); in operate()
1931 assert(!sparsebit_is_clear(s, first)); in operate()
1934 if (get_value(first)) in operate()
1939 { .first = first, .last = first, .set = true }; in operate()
1942 sparsebit_clear(s, first); in operate()
1943 assert(!sparsebit_is_set(s, first)); in operate()
1944 assert(sparsebit_is_clear(s, first)); in operate()
1947 if (!get_value(first)) in operate()
1952 { .first = first, .last = first, .set = false }; in operate()
1955 assert(sparsebit_is_set(s, first) == get_value(first)); in operate()
1956 assert(sparsebit_is_clear(s, first) == !get_value(first)); in operate()
1968 { .first = 0, .last = ~(sparsebit_idx_t)0, .set = true }; in operate()
1981 next = sparsebit_next_set(s, first); in operate()
1982 assert(next == 0 || next > first); in operate()
1986 next = sparsebit_next_clear(s, first); in operate()
1987 assert(next == 0 || next > first); in operate()
1991 next = sparsebit_next_clear(s, first); in operate()
1992 if (sparsebit_is_set_num(s, first, num)) { in operate()
1994 if (first) in operate()
1995 next = sparsebit_next_set(s, first - 1); in operate()
2000 assert(next == first); in operate()
2002 assert(sparsebit_is_clear(s, first) || next <= last); in operate()
2006 next = sparsebit_next_set(s, first); in operate()
2007 if (sparsebit_is_clear_num(s, first, num)) { in operate()
2009 if (first) in operate()
2010 next = sparsebit_next_clear(s, first - 1); in operate()
2015 assert(next == first); in operate()
2017 assert(sparsebit_is_set(s, first) || next <= last); in operate()
2021 sparsebit_set_num(s, first, num); in operate()
2022 assert(sparsebit_is_set_num(s, first, num)); in operate()
2023 assert(!sparsebit_is_clear_num(s, first, num)); in operate()
2029 { .first = first, .last = last, .set = true }; in operate()
2032 sparsebit_clear_num(s, first, num); in operate()
2033 assert(!sparsebit_is_set_num(s, first, num)); in operate()
2034 assert(sparsebit_is_clear_num(s, first, num)); in operate()
2040 { .first = first, .last = last, .set = false }; in operate()
2079 uint64_t first = get64(); in main() local
2082 operate(op, first, last); in main()