merge sort source code

Hi all,

In the ipdps 2009 paper “Designing Efficient Sorting Algorithms for Manycore GPUs” by Satish, Harris and Garland, it is mentioned that the source code for both radix sort and merge sort will be made available part of the CUDA SDK. I know that radix sort is in there, but I haven’t been able to find merge sort. The only other sort algorithms in the SDK (2.3, and 3.0beta) are bitonic and odd-even mergesort, which seem to be from a different source.

Is the code for merge sort available anywhere?

Thanks,

George

You can check out Thrust's implementation of merge sort. The code was derived from the original implementation from that paper, though performance may be different due to Thrust’s stricter semantic requirements.

Thanks, I was aware of Thrust, it’s a great library! I was looking for the fastest version of mergesort though, for a performance comparison. I’m not sure how much overhead the template version incurs.

I’m trying to measure the speed of mergesort for an array of single-precision FP numbers btw.