mdspan icon indicating copy to clipboard operation
mdspan copied to clipboard

Constraint on `layout_{left|right|stride}::stride` is not implemented

Open youyu3 opened this issue 1 year ago • 6 comments

Per http://eel.is/c++draft/mdspan.layout.left.obs#5, should have

constexpr index_type stride(rank_type i) const; Constraints: extents_­type​::​rank() > 0 is true

But is not implemented, for example: https://github.com/kokkos/mdspan/blob/stable/include/experimental/__p0009_bits/layout_left.hpp#L206

stride(0) returns 1 for a 0-D mapping (stdex::extents<size_t>).

youyu3 avatar Oct 20 '22 17:10 youyu3