kokkos / mdspan

Reference implementation of mdspan targeting C++23
Other
398 stars 65 forks source link

Fix CUDA errors in submdspan about int to size_t narrowing #350

Closed aprokop closed 1 month ago

aprokop commented 2 months ago

I was getting errors on CUDA 11.5.2 with GCC 9.3.0:

<snip>/kokkos/core/src/../../tpls/mdspan/include/mdspan/../experimental/__p2630_bits/submdspan_mapping.hpp(134): error: invalid narrowing conversion from "int" to "size_t"
<snip>/kokkos/core/src/../../tpls/mdspan/include/mdspan/../experimental/__p2630_bits/submdspan_mapping.hpp(364): error: invalid narrowing conversion from "int" to "size_t"

when building Kokkos develop (24454fa82).

I don't really know what I'm doing, so feel free to edit however you need. This fixes it for this particular build, but probably not the best way to go.

ndellingwood commented 1 month ago

@crtrott can this be merged and patched into Kokkos? Lots of warnings showing up in Cuda builds