ORNL / ORNL/cpp-proposals-pub

P0009: Add design justification for static->dynamic and dynamic->static mdspan assignment

Open
#165 5 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

should they allow static -> dynamic conversion (seems fine)
should they allow dynamic -> static (note that this have UB)

Both of these cases are important. Static-to-dynamic conversion is "type
erasure," for when an implementation doesn't want to specialize for
compile-time extents. Dynamic-to-static conversion is "specialization" (the
opposite of type erasure), for when an implementation is willing to pay the
compile-time cost of specializing. A common use case for the latter is in
applications that solve partial differential equations through a variety of
different discretization methods. Many methods result in arrays with known
fixed extents, but making all of them compile-time constants might cost too
much compilation time, rather than just optimizing the most common methods.

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 by locating the P0009 proposal and its section on static-to-dynamic and dynamic-to-static mdspan assignment. Read the surrounding design discussion and existing comments, then add justification for both type erasure and specialization use cases; done means the proposal explains why each conversion matters.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.