[ENHANCEMENT]: Allow conversion between cuco::extent and cuda::std::extent #592
Labels
P2: Nice to have
Desired, but not necessary
type: improvement
Improvement / enhancement to an existing function
Is your feature request related to a problem? Please describe.
Introduction of
cuda::std::span
allows us to move away from the old-school but footgunny raw pointer + size interface.cuda::std::span
allows for passing acuda::std::extent
for the size of the span which can be either a runtime or compile time value.This is similar to our
cuco::extent
implementation, with the only difference that thecuco::
version allows for customizing the size type (for performance reasons) while thecuda::std::
implementation always usessize_t
.To make handling of
span
in cuco easier, it would be nice to be able to easily convert acuco::extent
to acuda::std::extent
.Describe the solution you'd like
Implement a conversion operator that maps
cuco::extent<SizeType, Size> -> cuda::std::extent<Size>
.For the inverse case
cuda::std::extent<Size> -> cuco::extent<size_t, Size>
there's the caveat that we can only usesize_t
as the size type.Describe alternatives you've considered
Travel back in time and standardize
std::extent<Size = dynamic_extent, SizeType = size_t>
;)Additional context
No response
The text was updated successfully, but these errors were encountered: