kokkos / mdspan

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

Fix mdspan::size() return type & precondition #168

Closed mhoemmen closed 2 years ago

mhoemmen commented 2 years ago
  1. Make mdspan::size() return size_t (per P0009R18), instead of size_type.

  2. Make sure that mdspan::size() does not overflow unless the product of the extents is not representable as a value of type size_t.

  3. Add tests for both (1) and (2).

Fixes #167.

mhoemmen commented 2 years ago

Thanks Christian! : - D