Issaquah (Feb 2023) P2642 presentation
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- documentation
Research direction
Start by reading the P2642 use cases and errata in this issue, then review implementation PR 237 in the kokkos/mdspan repository. The issue discusses presentation material and specification corrections, but does not identify files, tests, or a clear completion condition.
Written by the indexing model from the issue text.
Description
P2642 (padded mdspan layouts)
Use cases
-
Overaligned access to the beginning of each contiguous segment of elements
-
Representing column-major or row-major matrices whose stride is greater than the number of rows
-
"Pitched allocations*
-
Critical use case for matrix algorithms; the layout of BLAS and LAPACK
-
Use case for padding_stride=0 (at compile time)
Leftmost (for layout_left_padded; rightmost for layout_right_padded)
extent is zero at compile time: extents<Integral, 0, ...>.
template<int Value>
using Int = integral_constant<int, Value>;
layout_left::mapping<extents<int, 0, 10>> mapping{};
mdspan m{nullptr, mapping};
auto m_sub = submdspan(m, tuple{Int<0>{}, Int<0>{}}, full_extent);
Before P2642, m_sub would have mapping type
layout_stride::mapping<extents<int, 0, 10>>.
After P2642, m_sub would have mapping type
layout_left_padded<0>::mapping<extents<int, 0, 10>>.
Errata
-
.extents()returns by value, not by const reference-
[mdspan.layout.reqmts] specifies that
.extents()returnsconst extents_type&, butlayout_{left,right}_padded::mapping::extentsin P2642 returnsextents_type. -
layout_{left,right}_padded::mappingdoes not store the user'sextentsobject-
It stores the "padded extents"
-
Effectively a "
layout_{left,right}of a bigger array"
-
-
Fix: Change to return
const extents_type&; rely on lifetime extension
-
-
Specification of
layout_left_padded<ps>::mapping(const layout_left_padded<ps>::mapping<OtherExtents>&)converting constructors andoperator==may need adjustments, so that the spec as written can deduce the inputpadding_stridetemplate argument. (See comments below.)- Consider adding a public member to
layout_{left,right}_padded::mappingso users can get thepadding_stridetemplate argument without needing to write a traits class
- Consider adding a public member to
Implementation
PR 237 in https://github.com/kokkos/mdspan
- Dominant language
- HTML
- Stars
- 29
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from ORNL/cpp-proposals-pub
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
ORNL/cpp-proposals-pub#394 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
ORNL/cpp-proposals-pub#393 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ORNL/cpp-proposals-pub#297 ·
-
P3242: LWG ReviewOpen
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ORNL/cpp-proposals-pub#484 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
ORNL/cpp-proposals-pub#483 · 2 comments ·
All issues in ORNL/cpp-proposals-pub
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Netcracker/qubership-ai-packages#266 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
modelcontextprotocol/php-sdk#746 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
githubnext/gh-aw-workshop#5790 ·
Maintainers usually reply within 1 day
-
bot-found documentation priority: P3
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
madenvel/KalinkaPlayer#602 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day