Lines Matching full:hi
469 /* Each level of quicksort uses a lo and a hi index */ in xfarray_sortinfo_alloc()
545 xfarray_idx_t hi) in xfarray_isort() argument
549 loff_t len = xfarray_pos(si->array, hi - lo + 1); in xfarray_isort()
552 trace_xfarray_isort(si, lo, hi); in xfarray_isort()
560 sort(scratch, hi - lo + 1, si->array->obj_size, si->cmp_fn, NULL); in xfarray_isort()
567 * Sort the records from lo to hi (inclusive) if they are all backed by the
575 xfarray_idx_t hi) in xfarray_foliosort() argument
580 uint64_t len = xfarray_pos(si->array, hi - lo + 1); in xfarray_foliosort()
593 trace_xfarray_foliosort(si, lo, hi); in xfarray_foliosort()
597 sort(startp, hi - lo + 1, si->array->obj_size, si->cmp_fn, NULL); in xfarray_foliosort()
652 xfarray_idx_t hi) in xfarray_qsort_pivot() argument
658 xfarray_idx_t step = (hi - lo) / (XFARRAY_QSORT_PIVOT_NR - 1); in xfarray_qsort_pivot()
677 *idxp = hi; in xfarray_qsort_pivot()
761 xfarray_idx_t hi) in xfarray_qsort_push() argument
893 * and hi after selecting a pivot, we will try to retain the xfile memory
913 xfarray_idx_t lo, hi; in xfarray_sort() local
932 hi = si_hi[si->stack_depth]; in xfarray_sort()
934 trace_xfarray_qsort(si, lo, hi); in xfarray_sort()
937 if (lo >= hi) { in xfarray_sort()
946 ret = xfarray_foliosort(si, lo, hi); in xfarray_sort()
955 if (xfarray_want_isort(si, lo, hi)) { in xfarray_sort()
956 error = xfarray_isort(si, lo, hi); in xfarray_sort()
964 error = xfarray_qsort_pivot(si, lo, hi); in xfarray_sort()
969 * Rearrange a[lo..hi] such that everything smaller than the in xfarray_sort()
973 while (lo < hi) { in xfarray_sort()
977 * Decrement hi until it finds an a[hi] less than the in xfarray_sort()
980 error = xfarray_sort_scan(si, hi, &p); in xfarray_sort()
983 while (xfarray_sort_cmp(si, p, pivot) >= 0 && lo < hi) { in xfarray_sort()
984 hi--; in xfarray_sort()
985 error = xfarray_sort_scan(si, hi, &p); in xfarray_sort()
995 /* Copy that item (a[hi]) to a[lo]. */ in xfarray_sort()
996 if (lo < hi) { in xfarray_sort()
1009 while (xfarray_sort_cmp(si, p, pivot) <= 0 && lo < hi) { in xfarray_sort()
1021 /* Copy that item (a[lo]) to a[hi]. */ in xfarray_sort()
1022 if (lo < hi) { in xfarray_sort()
1023 error = xfarray_sort_store(si, hi--, scratch); in xfarray_sort()
1043 error = xfarray_qsort_push(si, si_lo, si_hi, lo, hi); in xfarray_sort()