allendaicool / thrust

Automatically exported from code.google.com/p/thrust
Apache License 2.0
0 stars 0 forks source link

improve radix_sort keyBits optimization #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Instead of looking for the maximum over the keys sorting keys in [0,max] we
should also compute the minimum and only sort [0, max - min] by subtracting
min from all the keys.

This process can be achieved with essentially no cost, since the min
reduction can be fused with the max reduction and the key - min
transformation can be fused with the current preprocess/postprocess steps.

This will provide an especially significant speedup for signed integers
with negative values near 0.

Original issue reported on code.google.com by wnbell on 4 Sep 2009 at 5:08

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r524.

Original comment by wnbell on 13 Oct 2009 at 3:39