unsafe fn recurse<T, F>(
v: *mut T,
buf: *mut T,
chunks: &[(usize, usize)],
into_buf: bool,
is_less: &F,
)
Expand description
Recursively merges pre-sorted chunks inside v
.
Chunks of v
are stored in chunks
as intervals (inclusive left and exclusive right bound).
Argument buf
is an auxiliary buffer that will be used during the procedure.
If into_buf
is true, the result will be stored into buf
, otherwise it will be in v
.
§Safety
The number of chunks must be positive and they must be adjacent: the right bound of each chunk must equal the left bound of the following chunk.
The buffer must be at least as long as v
.