Constraint on `layout_{left|right|stride}::stride` is not implemented
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 507
- Forks
- 87
- Avg merge
- 15h 27m
- Merged PRs (30d)
- 2
Description
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() > 0istrue
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>).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with include/experimental/__p0009_bits/layout_left.hpp at the referenced stride implementation, then inspect the corresponding layout_right and layout_stride implementations. Compare their stride signatures with the cited C++ standard constraint and verify the zero-dimensional mapping behavior; done means the constraint is represented consistently and the relevant behavior is covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100