Implementation of a recent merge sort parallelized algorithm, merge path from O. Green et al., 2014.
The goal of all these programs is to merge multiple arrays. For simplicity, the number of array and their length is a power of 2. The last program is parallelized and also sort before merging the arrays. Therefore, it performs a parallelized mergesort algorithm.
sequential_merge_path.cpp
: classical merge algorithm running on CPUmerge_path.cpp
: merge path algorithm from O. Green et al. running on CPU.merge_sort_path.cu
: parallelized mergesort algorithm. It starts to sort a big array, then uses a divide and conquer method to apply merge path from O Green et al. on GPU.
You need to compile merge_sort_path.cu
with cuRAND library :
nvcc merge_sort_path.cu -lcurand -std=c++11 -o merge_sort_path
The other .cpp
programs only need -std=c++11
to be compiled.