Open sleeepyjack opened 2 years ago
Initial prototype: https://godbolt.org/z/Kj763Teon
This approach still needs some refinement but enables us to use fully variadic ctors if we opt for strong types for all parameters. We could also use this in member functions to pass optional parameters,e.g., pass an optional CUDA stream to one of the bulk functions.
Build on gcc works but nvcc fails to understand the deduction guide. Investigating...
New version: tested on gcc, nvcc 11.0-11.7 and has better diagnostics: https://godbolt.org/z/5Ghac54E6
Part of #110 (Refactor of open address data structures)
Development branch: NVIDIA/cuCollections/refactor
Synopsis
To make it convenient to construct a static_set or other data structures with a variety of configuration parameters, we want to use a variadic constructor pattern.
TODOs
https://godbolt.org/z/T4oP1nsoWhttps://godbolt.org/z/Kj763Teonhttps://godbolt.org/z/5Ghac54E6get_or_default<T>
function looking for a concrete typeT
, it could look for the first type that satisfies a given concept C, e.g.,get_or_default<C>
. If necessary, use unique member tags to disambiguate a concept.get_or_error<T>
.References