Struct timely_sort::MSBRadixSorter
[−]
[src]
pub struct MSBRadixSorter<T> { /* fields omitted */ }
Methods
impl<T> RadixSorter<T>
[src]
fn new() -> Self
fn push<U: Unsigned, F: Fn(&T) -> U>(&mut self, element: T, bytes: F)
fn push_batch<U: Unsigned, F: Fn(&T) -> U>(&mut self, batch: Vec<T>, bytes: F)
fn finish<U: Unsigned, F: Fn(&T) -> U, L: Fn(&mut [T])>(&mut self,
bytes: F,
action: L)
-> Vec<Vec<T>>
bytes: F,
action: L)
-> Vec<Vec<T>>
fn recycle(&mut self, buffers: Vec<Vec<T>>)
fn sort<U: Unsigned, F: Fn(&T) -> U, L: Fn(&mut [T])>(&mut self,
source: &mut Vec<Vec<T>>,
bytes: F,
action: L)
source: &mut Vec<Vec<T>>,
bytes: F,
action: L)
Radix sorts a sequence of buffers, possibly stopping early on small batches and calling action
.
The intent of sort
is to allow us to do top-down radix sorting with the option to exit early if
the sizes of elements to sort are small enough. Of course, just exiting early doesn't sort the data,
so we have an action
you get to apply to finish things off. We could make this sort by radix, but
there are several use cases where we need to follow up with additional sorting / compaction and would
like to hook this clean-up method anyhow.