kokkos / mdspan

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

`submdspan` conventions #62

Closed tpadioleau closed 3 years ago

tpadioleau commented 3 years ago

Is there a reason to use [begin, end[ when taking a submdspan with pairs ? It is a different convention from subspan in std::span that uses the pair (offset, count).

I also noticed that it is a free function whereas in std::span it is a member function.

Thomas P.

mhoemmen commented 3 years ago
  1. Inclusive begin, exclusive end has precedence in other languages, such as Python. It's the C-style indexing version of what Fortran does.
  2. span came from an early version of mdspan, so it might be more apt to ask this question of span ; - ) .
  3. P0009 went through a lot of review (it's on R12++ now).
tpadioleau commented 3 years ago

Thank you for explaining the rationale behind the choices.