Lines Matching full:last

25  * granularity; in all levels except the last, bit N is set iff the N-th
27 * completes on the last level it can examine the 2nd-last level to quickly
34 * bits 0-57 => word in the last bitmap | bits 58-63 => bit in the word
35 * bits 0-51 => word in the 2nd-last bitmap | bits 52-57 => bit in the word
36 * bits 0-45 => word in the 3rd-last bitmap | bits 46-51 => bit in the word
92 * has a set bit, except the last level where each bit represents the
384 static uint64_t hb_count_between(HBitmap *hb, uint64_t start, uint64_t last) in hb_count_between() argument
388 uint64_t end = last + 1; in hb_count_between()
411 /* Setting starts at the last layer and propagates up if an element
414 static inline bool hb_set_elem(unsigned long *elem, uint64_t start, uint64_t last) in hb_set_elem() argument
419 assert((last >> BITS_PER_LEVEL) == (start >> BITS_PER_LEVEL)); in hb_set_elem()
420 assert(start <= last); in hb_set_elem()
422 mask = 2UL << (last & (BITS_PER_LONG - 1)); in hb_set_elem()
432 uint64_t last) in hb_set_between() argument
435 size_t lastpos = last >> BITS_PER_LEVEL; in hb_set_between()
453 changed |= hb_set_elem(&hb->levels[level][i], start, last); in hb_set_between()
466 /* Compute range in the last layer. */ in hbitmap_set()
468 uint64_t last = start + count - 1; in hbitmap_set() local
475 start >> hb->granularity, last >> hb->granularity); in hbitmap_set()
478 last >>= hb->granularity; in hbitmap_set()
479 assert(last < hb->size); in hbitmap_set()
480 n = last - first + 1; in hbitmap_set()
482 hb->count += n - hb_count_between(hb, first, last); in hbitmap_set()
483 if (hb_set_between(hb, HBITMAP_LEVELS - 1, first, last) && in hbitmap_set()
492 static inline bool hb_reset_elem(unsigned long *elem, uint64_t start, uint64_t last) in hb_reset_elem() argument
497 assert((last >> BITS_PER_LEVEL) == (start >> BITS_PER_LEVEL)); in hb_reset_elem()
498 assert(start <= last); in hb_reset_elem()
500 mask = 2UL << (last & (BITS_PER_LONG - 1)); in hb_reset_elem()
510 uint64_t last) in hb_reset_between() argument
513 size_t lastpos = last >> BITS_PER_LEVEL; in hb_reset_between()
544 if (hb_reset_elem(&hb->levels[level][i], start, last)) { in hb_reset_between()
560 /* Compute range in the last layer. */ in hbitmap_reset()
562 uint64_t last = start + count - 1; in hbitmap_reset() local
573 start >> hb->granularity, last >> hb->granularity); in hbitmap_reset()
576 last >>= hb->granularity; in hbitmap_reset()
577 assert(last < hb->size); in hbitmap_reset()
579 hb->count -= hb_count_between(hb, first, last); in hbitmap_reset()
580 if (hb_reset_between(hb, HBITMAP_LEVELS - 1, first, last) && in hbitmap_reset()
619 /* Compute position and bit in the last layer. */ in hbitmap_get()
637 * aligned to serialization granularity too, except for last chunk.
643 uint64_t last = start + count - 1; in serialization_chunk() local
647 assert((last >> hb->granularity) < hb->size); in serialization_chunk()
648 if ((last >> hb->granularity) != hb->size - 1) { in serialization_chunk()
653 last = (last >> hb->granularity) >> BITS_PER_LEVEL; in serialization_chunk()
656 *el_count = last - start + 1; in serialization_chunk()
765 * that the last level is ok */ in hbitmap_deserialize_finish()