NVIDIA / cuCollections

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Switch to cuda::std::span once available

sleeepyjack opened this issue · comments

Our hash function implementations currently make use of the following function signature:

template <typename Extent>
constexpr result_type __host__ __device__ compute_bytes(std::byte const* data, Extent size) const noexcept

We should switch to cuda::std::span instead of raw pointers, once rapidsai/rapids-cmake#399 is resolved.

Using cuda::std::span may lose the benefit of the static extent.

Span supports a static extent as a second size_t tparam - though not as elegant as our extent type. Since compute_hash is user-facing, it's better to require a proper span argument rather than a raw pointer and size.