Parallel k-Means Image Segmentation Using Sort, Scan and Connected Components on a GPU
Sorting networks and their applications