Professional Documents
Culture Documents
PARALLEL QUICK
SORT
Week14_Lecture40
Parallel Quicksort 2
(Approach 1)
Start a process to find pivot and partition the list into two, p < =p > p.
At each step, start p processes proportional to n partitions.
Each process finds the pivot element and divides the list based on the selected
pivot.
Finally processes values are merged, and a sorted list is returned.
Pictorial
This method is actually not optimized as the pivot has
been chosen poorly. representation
The time complexity we get here is O(n²).
IMPLEMENTATION
OF PARALLEL
QUICK SORT
USING OPENMP
Implementation [1/4] 6