在CUDA Thrust中的排序

3

我正在尝试在cuda中使用基数排序。在研究过程中,我发现thrust已经内置了排序功能。

which sorting algorithm does thrust library use for sorting?? 
Is it  Radix Sort???
2个回答

6

以下是详细信息:

http://sbel.wisc.edu/Courses/ME964/Literature/thrustGPUgems2011.pdf http://www.greatlakesconsortium.org/events/manycore/files/TStaff-CUDA_Libraries.pdf

从第二个链接中获得:

thrust::sort将选择正确的算法

  • 内建类型(int、float等)使用基数排序
  • 在无法使用基数排序时,使用归并排序

如果想更深入地了解thrust实现的排序函数,可以阅读这篇技术论文:http://back40computing.googlecode.com/svn-history/r272/wiki/documents/RadixSortTR.pdf


0

Thrust 提供的两种排序算法之一是基数排序。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接