Abstract

Thread parallelism of sorting algorithms is studied. The OpenMP directives are implemented into three opensource sorting algorithms, i.e., merge sort, quick sort, and counting sort. The merge sort and the quick sort adopt a recursive algorithm and are thread-parallelized with the OMP TASK directive which is supported over OpenMP 3.0. It is found that the switching to O(n2) sorting algorithms effectively accelerate the recursive sorting algorithms parallelized with the OMP TASK directive. The counting sort parallelized with the OMP DO directive give both faster computational speed and higher scalability than the two recursive sorting algorithms. However, the parallel counting sort requires additional memory spaces that increase in proportion to the number of threads.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call