kokkos / mdspan

Reference implementation of mdspan targeting C++23
Other
417 stars 69 forks source link

Choice of std::size_t for subscripts? #105

Closed stigrs closed 2 years ago

stigrs commented 2 years ago

The C++ Core Guidelines recommends signed integers for subscripts (ES.107). Given the need for mdspan in scientific computing, it seems like a signed integer for subscripts would be more appropriate. Also for calling BLAS.

mhoemmen commented 2 years ago

If you'll take a look at the changelog in the mdspan proposal P0009, LEWG asked us to change from signed integers to size_t, to make mdspan consistent with span and other Standard Library components. This wasn't our idea, but we made the change before R11 (we're at R14 now) as requested by the working group.