Lines Matching full:bins
31 /* The number of non-empty bins */
58 struct histogram bins; member
119 * offset, keeping track of the number of non-empty bins, and the index of the first and last
122 static inline void measure_bins(const struct task task, struct histogram *bins) in measure_bins() argument
127 * Subtle invariant: bins->used and bins->size[] are zero because the sorting code clears in measure_bins()
131 bins->first = U8_MAX; in measure_bins()
132 bins->last = 0; in measure_bins()
137 u32 size = ++bins->size[bin]; in measure_bins()
139 /* Track non-empty bins. */ in measure_bins()
141 bins->used += 1; in measure_bins()
142 if (bin < bins->first) in measure_bins()
143 bins->first = bin; in measure_bins()
145 if (bin > bins->last) in measure_bins()
146 bins->last = bin; in measure_bins()
165 * @bins: the histogram of the sizes of each pile
174 struct histogram *bins, sort_key_t *first_key, in push_bins() argument
180 for (bin = bins->first; ; bin++) { in push_bins()
181 u32 size = bins->size[bin]; in push_bins()
201 if (--bins->used == 0) in push_bins()
238 struct histogram *bins = &sorter->bins; in uds_radix_sort() local
275 measure_bins(task, bins); in uds_radix_sort()
283 &insertion_task_list, pile, bins, task.first_key, in uds_radix_sort()
286 memset(bins, 0, sizeof(*bins)); in uds_radix_sort()
290 /* Now bins->used is zero again. */ in uds_radix_sort()
296 end = task.last_key - bins->size[bins->last]; in uds_radix_sort()
297 bins->size[bins->last] = 0; in uds_radix_sort()
315 fence += bins->size[bin]; in uds_radix_sort()
316 bins->size[bin] = 0; in uds_radix_sort()
319 /* Now bins->size[] is all zero again. */ in uds_radix_sort()