An Optimal Hardware-Algorithm for Sorting Using a Fixed-Size Parallel Sorting Device