Comparison based
Non-comparison based
Parallel Comparison based ?
Ideal :
Similar with merge sort
Another example: Odd-Even Transposition Sort
Generally
Time complexity:
(while ideal complexity's )
Parallelizing Merge-Sort
Then sorting network looks like this.
How about non-sorted arrays? (not bitonic!)
Network below builds bitonic sequence from unsorted arrays
Shear sort is a sorting algorithm to build a snake-like sequence using mesh
Alternate row and column sorting until list is fully sorted
Time complexity? (for mesh)
Algorithm Overview
Sequence:
Binary rep.:
bit 0:
build histogram
Zero | One |
---|---|
3 | 2 |
Calculate prefix sum for histogram
Zero | One |
---|---|
0 | 3 |
Find offset:
Find index (offset + prefix sum)
Move values:
Repeat for all bits