pub fn sorted_int<T: Ord + Copy>(data: &[T]) -> Vec64<T>Expand description
Creates a new sorted copy of integer data in a Vec64 container.
Clones input data into a Vec64 and sorts it using the optimised integer sorting algorithm. Returns a new sorted container while leaving the original data unchanged.
§Type Parameters
T: Integer type implementingOrd + Copy(i8, i16, i32, i64, u8, u16, u32, u64, etc.)
§Parameters
data: Source slice to be copied and sorted
§Returns
A new Vec64<T> containing the sorted elements from the input slice.
§Usage Example
ⓘ
use simd_kernels::kernels::sort::sorted_int;
let data = [64i32, 34, 25, 12, 22, 11, 90];
let sorted = sorted_int(&data);
// sorted contains [11, 12, 22, 25, 34, 64, 90]
// original data unchanged