Comparison of several parallel sorting algorithms, using the Nvidia CUDA programming framework.
Comparison of several parallel sorting algorithms, using the Nvidia CUDA programming framework.
Run g++ random_generator.cpp -o generate
followed by ./generate
.
The numbers will be stored in a file titled random_dataset.txt
Run g++ reverse_sorted_generator.cpp -o generate_reverse
followed by ./generate_reverse
.
The numbers will be stored in a file titled reverse_dataset.txt
Run g++ sorted_generator.cpp -o generate_sorted
followed by ./generate_sorted
.
The numbers will be stored in a file titled sorted_dataset.txt
Note: The approach we used for this was to randomly carry out swaps after sorting the vector. Number of swaps = 0.1 x Number of Total Elements. This way atmost 20% of elements are out of place
Run g++ almost_sorted_generator.cpp -o generate_sorted
followed by ./generate_almost_sorted
.
The numbers will be stored in a file titled almost_sorted_dataset.txt
To generate the executable, runnvcc bitonic_sort.cu
to run the executable, run./a.out
To generate the executable, runnvcc -o mergesort.cu
to run the executable, run./a.out
important - since our QuickSort() implementation uses a recursive function on the device, we need to specify our architecture as sm_35
To generate the executable, runnvcc -arch=sm_35 -rdc=true quick.cu
to run the executable, run./a.out