kokkos / kokkos/mdspan

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

Open
#201 6 comments 0 reactions 0 assignees View on GitHub

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() > 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>).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.