P2630: Kona (2022/11/11) LEWG feedback

Open
#310 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp

Research direction

Read the submdspan sections discussed in this issue, then review Barry's P2279 for the customization-point context. The work is complete when the listed wording errors are corrected and the open design questions about customization points, constexpr, constraints, integral_constant, tuple conversion, and strides have documented resolutions.

Written by the indexing model from the issue text.

Description

submdspan Kona 2022/11/11 feedback

"The SliceSpecifier template argument(s)" in (2) should be SliceSpecifiers (typo).

Bikeshed: strided_index_range is obviously not a range in the sense of the "ranges" library.

Does src-indices need to be constexpr? In general, do these functions need to be constexpr?

submdspan_extents:

  • Should the constraints be mandates instead?

  • Typo: (2) says src.extents(), should be src_exts.extents()

  • Why the difference between constraints and mandates? What's the goal? Note that the Mandates would subsume ... we could probably get rid of the Constraints there.

  • Rather than requiring integral_constant, should we consider requiring it to be a "core constant literal type"? hana like? Expect some off-line comments to clarify this request.

submdspan_mapping

  • Do we run into the problems that CPOs solve? Specifically making it hard to debug where exactly it landed? -- Users generally wouldn't call these functions, so users don't have to do the ADL dance. However, if this were a hidden friend, then you would only be able to call these by ADL. Some additional benefits. We could explore this.

  • Use the state of the art for customization points; maybe tag_invoke if it is considered the state of the art.

Specializations of submdspan_mapping

(6) is missing a close angle bracket (array<SubExtents::index_type, SubExtents::rank()>).

sub_map was not introduced before (3.1) (the Mandates that starts with is_same_v and checks the extents with submdspan_extents result). (sub_map should be something like declval<decltype(submdspan_mapping(...))>.)

submdspan

(Effects rely on CTAD, but that's OK.)

Any design questions

  1. Customization point design?
  2. integral_constant?
  3. Convertibility to tuple
  4. stride design

IL: Niebloids are used in ranges, tag_invoke is used for sender/receivers. I would suggest looking at the paper by Barry (https://wg21.link/P2279) and applying a more "modern-style" CP mechanism.

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

  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.

More from ORNL/cpp-proposals-pub

All issues in ORNL/cpp-proposals-pub

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.