You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
cuda::std::mdspan doesn't trigger, in debug, an assertion when an out of bound access is performed via operator(), contrary to cuda::std::span (with its operator[]).
Describe the solution you'd like
cuda::std::mdspan should trigger an assertion, in debug, in both host and device just like cuda::std::span.
bernhardmgruber
changed the title
[FEA]: Add out of bound assertion to cuda::std::span on operator()
[FEA]: Add out of bound assertion to cuda::std::mdspan on operator()
Dec 5, 2024
Is this a duplicate?
Area
Thrust
Is your feature request related to a problem? Please describe.
cuda::std::mdspan doesn't trigger, in debug, an assertion when an out of bound access is performed via operator(), contrary to cuda::std::span (with its operator[]).
Describe the solution you'd like
cuda::std::mdspan should trigger an assertion, in debug, in both host and device just like cuda::std::span.
We will also have to update the following: https://github.com/NVIDIA/cccl/blob/main/docs/libcudacxx/standard_api/container_library/mdspan.rst
Describe alternatives you've considered
Using cuda::std::span but we want to promote cuda::std::mdspan as a safe multi-dimensional accessor
Additional context
Came in a discussion with @bernhardmgruber on slack. The goal is for it to be used in the "The Modern CUDA Developer’s Toolbox" future blogpost.
The text was updated successfully, but these errors were encountered: