NVIDIA / cccl

CUDA Core Compute Libraries
https://nvidia.github.io/cccl/
Other
1.19k stars 146 forks source link

[FEA]: `cuda::span<T, Properties...>` a safe view over - heterogeneous - memory #2133

Open miscco opened 2 months ago

miscco commented 2 months ago

We want to extent the property based design for safe heterogeneous memory accesses to view types.

This will most likely require us to implement an iterator type that does the right and then guard all direct memory accesses.

bernhardmgruber commented 2 months ago

I was thinking about span and using it over raw pointers in some of the CUB agents the other night. I wondered whether we need a customizable index type, so we can use a 32-bit integer to store the length. mdspan has this customization and IIRC the proposal authors were motivated by GPU codes as use case for this feature.