Sort the column data in a two-dimensional array

I have some two-dimensional data (300 rows × 128k columns), and I need to sort each column. Is there an efficient method to do this?

You could use cub. cub::DeviceSegmentedRadixSort — CUB 104.0 documentation

An alternative to the segmented sort would be to call a separate sorting kernel per row. You would need to Benchmark both versions to see which is faster

1 Like