Static assert arithmetic types in basic radix sort API
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 487
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 296
Description
As part of https://github.com/NVIDIA/cub/pull/671 we introduced support of user-defined types in radix sort. To improve user experience, we should static assert that the key type is supported by `cub::Traits` (`detail::radix::is_fundamental_type::value`) and direct users to `DecomposerT` overloads otherwise.
In order to make the error message readable, we should also follow the pattern of `detail::radix::decomposer_check_t` and SFINAE out trampoline function to avoid instantiating dispatch layer.
Contributor guide
Research direction
Start by reading PR #671 and the basic radix sort API, then trace cub::Traits, detail::radix::is_fundamental_type, and decomposer_check_t through the trampoline and dispatch layer. Done means unsupported key types produce a readable static assertion directing users to DecomposerT overloads without instantiating the dispatch layer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100