ORNL / ORNL/cpp-proposals-pub

P2642: Make sure rank 0 & 1 cases don't require storing extra state

Open
#304 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
29
Forks
26
PR merge metrics
No merged PRs in 30d

Description

Currently, it looks like the wording requires that the two layout mappings need to store extra state for the rank 1 case. We need to fix that.

One way to fix that would be to change the definition of unpadded-extent-type.

using <it>unpadded-extent-type</it> = /* see-below */; // exposition only

    If extents_type::rank() equals zero (OR ONE), then unpadded-extent-type names the type extents<index_type>.

    Otherwise, unpadded-extent-type names the type extents<index_type, extents_type::static_extent(0)>.

Fixing this issue would imply that the constructors taking a second padding argument (e.g., Size padding_value) should be constrained on rank() > 1.

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

Search the proposal text for unpadded-extent-type and the constructors taking a second padding argument. Check how the rank 0 and rank 1 cases are currently worded, then update the specification so those cases avoid extra state and the padding constructors are constrained to rank greater than 1.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.