Modified Levels of Parallel Odd-Even Transposition Sorting Network (OETSN) with GPU Computing using CUDA

Sorting huge data requires an enormous amount of time. The time needed for this task can be minimised using parallel processing devices like GPU. The odd-even transposition sorting network algorithm is based on the idea that each level uses an equal number of comparators to arrange data. The existing parallel OETSN algorithm compares the elements in each phase for any type of test case. If the elements are not in the increasing order, then they are swapped. In this way, the algorithm takes the same time for sorting and for unique test cases. In this paper, we propose an algorithm that is the modified version of the existing OETSN algorithm. Our approach reduces the number of levels in the OETSN based on the nature of the data. Time complexity is also reduced from O(n) to O(1) for sorted and zero test cases. The proposed algorithm is tested for six types of test case, which are uniform, Gaussian, zero, bucket, staggered and sorted. The comparison with existing techniques is also presented in this paper. After evaluation, the proposed modified version of OETSN is found to be more efficient in two types of test case i.e. sorted and zero test cases. GPU computing using CUDA hardware is used to test the algorithms. The speedup achieved by the parallel OETSN algorithm over sequential OETSN is also computed. The proposed approach achieves an improvement in execution time that is 981661.6 times faster in the sorted test case and 904620.7 times faster in the zero test case using 2500000 elements and 1024 threads in comparison to the existing parallel OETSN.

[1]  Pheng-Ann Heng,et al.  A Fast and Flexible Sorting Algorithm with CUDA , 2009, ICA3PP.

[2]  Gabriel Zachmann,et al.  GPU-ABiSort: optimal parallel sorting on stream architectures , 2006, Proceedings 20th IEEE International Parallel & Distributed Processing Symposium.

[3]  Michael E. Saks,et al.  The periodic balanced sorting network , 1989, JACM.

[4]  Xhemal Zenuni,et al.  A Version of Parallel Odd-Even Sorting Algorithm Implemented in CUDA Paradigm , 2015 .

[5]  Michael Garland,et al.  Designing efficient sorting algorithms for manycore GPUs , 2009, 2009 IEEE International Symposium on Parallel & Distributed Processing.

[6]  Behzad Mozaffari Optimization of Odd-Even Transposition network , 2010, 2010 2nd International Conference on Education Technology and Computer.

[7]  George Karypis,et al.  Introduction to Parallel Computing , 1994 .

[8]  M. J. Quinn,et al.  Parallel Computing: Theory and Practice , 1994 .

[9]  Omar Usman Khan,et al.  Fast Parallel Sorting Algorithms on GPUs , 2012 .

[10]  Salam N. Salloum,et al.  Fault tolerance analysis of odd-even transposition sorting networks , 1999, 1999 IEEE Pacific Rim Conference on Communications, Computers and Signal Processing (PACRIM 1999). Conference Proceedings (Cat. No.99CH36368).

[11]  Philippas Tsigas,et al.  GPU-Quicksort: A practical Quicksort algorithm for graphics processors , 2010, JEAL.

[12]  Akihiro Fujiwara,et al.  Sorting algorithms based on the odd-even transposition sort and the shearsort with DNA strands , 2005, FCS.

[13]  David A. Bader,et al.  GPUMemSort: A High Performance Graphics Co-processors Sorting Algorithm for Large Scale In-Memory Data , 2011 .

[14]  Amin Farmahini Farahani,et al.  Modular Design of High-Throughput, Low-Latency Sorting Units , 2013, IEEE Transactions on Computers.

[15]  Takuji Nishimura,et al.  Mersenne twister: a 623-dimensionally equidistributed uniform pseudo-random number generator , 1998, TOMC.

[16]  Daniel S. Hirschberg Fast parallel sorting algorithms , 1978, CACM.