Skip to content

radix_bits parameter in BlockRadixRank::RankKeys #3964

Answered by gevtushenko
JohnMansell asked this question in CUB
Discussion options

You must be logged in to vote

Hello @JohnMansell!

For a while, radix rank was an implementation detail of radix sort that just happened to be in the public namespace. This makes its interface not exactly user friendly. The missing context here is that radix rank doesn't rank all bits in the keys. Instead, it ranks up to RADIX_BITS in the keys. In other words, it does one pass only. To rank more than RADIX_BITS and get output ranks in the same thread as the one having the original input key, you'd have to add a loop that also exchanges keys along with values to preserve original order. Something along the following lines:

  // --- CUB Templates
  constexpr int block_threads = NUM_POINTS;
  using block_radix_rank      =…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@JohnMansell
Comment options

@gevtushenko
Comment options

Answer selected by JohnMansell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
CUB
Labels
None yet
2 participants