Skip to main content

bitonic_sort

Function bitonic_sort 

Source
pub fn bitonic_sort(data: &[f64]) -> Vec<f64>
Expand description

Bitonic sort in ascending order.

Works on arrays whose length is a power of two. Pads the input with f64::INFINITY if needed and trims back afterwards.

This CPU reference mirrors a GPU bitonic sort which operates in O(n log² n) compare-and-swap steps.