Skip to content

YoooR/cuda-mergesort

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gpu-mergesort

A parallel implementation of mergesort, using CUDA to perform the sorting on the GPU.

It reads in signed integers from stdin. There is no checking if the characters it reads are actually numerical, so if you give him non-numeric characters, it will read them according to their character code and happily keep going :)

Example of how it sorts:

Input:          8 3 1 9 1 2 7 5 9 3 6 4 2 0 2 5
Threads: |    t1    |    t2    |    t3    |    t4    |
         | 8 3 1 9  | 1 2 7 5  | 9 3 6 4  | 2 0 2 5  |
         |  38 19   |  12 57   |  39 46   |  02 25   |
         |   1398   |   1257   |   3469   |   0225   |
         +----------+----------+----------+----------+
         |          t1         |          t2         |
         |       11235789      |       02234569      |
         +---------------------+---------------------+
         |                     t1                    |
         |      0 1 1 2 2 2 3 3 4 5 5 6 7 8 9 9      |

Output is the original list, sorted.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Cuda 52.2%
  • Makefile 47.8%