Skip to content

Commit 9d6c327

Browse files
committed
New issue for US 152-243: Rename submdspan_extents and submdspan_canonicalize_slices
1 parent 0f15167 commit 9d6c327

File tree

1 file changed

+116
-0
lines changed

1 file changed

+116
-0
lines changed

xml/issue4487.xml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4487" status="New">
5+
<title>Rename `submdspan_extents` and `submdspan_canonicalize_slices`</title>
6+
<section><sref ref="[mdspan.sub]"/></section>
7+
<submitter>Tomasz Kamiński</submitter>
8+
<date>16 Dec 2025</date>
9+
<priority>99</priority>
10+
11+
<discussion>
12+
<b>Addresses <a href="https://github.com/cplusplus/nbballot/issues/815">US 152-243</a>
13+
and <a href="https://github.com/cplusplus/nbballot/issues/817">PL-008</a>.</b>
14+
15+
<p>Rename `submdspan_extents` to `subextents` and `submdspan_canonicalize_slices` to `canonical_slices`.</p>
16+
</discussion>
17+
18+
<resolution>
19+
<p>
20+
This wording is relative to <paper num="N5032"/>.
21+
</p>
22+
23+
<ol>
24+
<li><p>Modify <sref ref="[mdspan.syn]"/> as follows:</p>
25+
26+
<blockquote>
27+
<pre>
28+
// <sref ref="[mdspan.sub]"/>, submdspan creation
29+
template&lt;class OffsetType, class LengthType, class StrideType&gt;
30+
struct strided_slice;
31+
32+
template&lt;class LayoutMapping&gt;
33+
struct submdspan_mapping_result;
34+
35+
struct full_extent_t { explicit full_extent_t() = default; };
36+
inline constexpr full_extent_t full_extent{};
37+
38+
template&lt;class IndexType, size_t... Extents, class... SliceSpecifiers&gt;
39+
constexpr auto sub<del>mdspan_</del>extents(const extents&lt;IndexType, Extents...&gt;&amp;, SliceSpecifiers...);
40+
41+
// <sref ref="[mdspan.sub.canonical]"/>, submdspan slice canonicalization
42+
template&lt;class IndexType, size_t... Extents, class... Slices&gt;
43+
constexpr auto <del>submdspan_canonicalize</del><ins>canonical</ins>_slices(const extents&lt;IndexType, Extents...&gt;&amp; src,
44+
Slices... slices);
45+
</pre>
46+
</blockquote>
47+
</li>
48+
49+
<li><p>Modify <sref ref="[mdspan.sub.canonical]"/> as follows:</p>
50+
51+
<blockquote>
52+
<h4>`submdspan` slice canonicalization</h4>
53+
<pre>
54+
template&lt;class IndexType, size_t... Extents, class... Slices&gt;
55+
constexpr auto <del>submdspan_canonicalize</del><ins>canonical</ins>_slices(const extents&lt;IndexType, Extents...&gt;&amp; src,
56+
Slices... slices);
57+
</pre>
58+
</blockquote>
59+
</li>
60+
61+
<li><p>Modify <sref ref="[mdspan.sub.extents]"/> as follows:</p>
62+
63+
<blockquote>
64+
<h4><sref ref="[mdspan.sub.extents]"/> <tt>sub<del>mdspan_</del>extents</tt> function</h4>
65+
66+
<pre>
67+
template&lt;class IndexType, size_t... Extents, class... SliceSpecifiers&gt;
68+
constexpr auto sub<del>mdspan_</del>extents(const extents&lt;IndexType, Extents...&gt;&amp; src,
69+
SliceSpecifiers... raw_slices);
70+
</pre>
71+
<blockquote>
72+
<p>-1- Let `slices` be the pack introduced by the following declaration:
73+
<pre>
74+
auto [...slices] = <del>submdspan_canonicalize</del><ins>canonical</ins>_slices(src, raw_slices...)
75+
</pre></p>
76+
</blockquote>
77+
</blockquote>
78+
</li>
79+
80+
<li><p>Modify <sref ref="[mdspan.sub.map.sliceable]"/> as follows:</p>
81+
<blockquote>
82+
<blockquote>
83+
<p>-5- <i>Returns</i>: An object `smr` of type `SMR` such that
84+
<ul>
85+
<li>-5.1- <tt>smr.mapping.extents() == sub<del>mdspan_</del>extents(m.extents(), valid_slices...)</tt> is `true`; and</li>
86+
<li>-5.2- [&hellip;]</li>
87+
</ul></p>
88+
</blockquote>
89+
</blockquote>
90+
</li>
91+
92+
<li><p>Modify <sref ref="[mdspan.sub.map.common]"/> as follows:</p>
93+
<blockquote>
94+
<blockquote>
95+
<p>-5- Let `sub_ext` be the result of <tt>sub<del>mdspan_</del>extents(extents(), slices...)</tt>
96+
and let `SubExtents` be `decltype(sub_ext)`.</p>
97+
</blockquote>
98+
</blockquote>
99+
</li>
100+
101+
<li><p>Modify <sref ref="[mdspan.sub.sub]"/> as follows:</p>
102+
<blockquote>
103+
<blockquote>
104+
<p>-2- Let `slices` be the pack introduced by the following declaration:
105+
<pre>
106+
auto [...slices] = <del>submdspan_canonicalize</del><ins>canonical</ins>_slices(src, raw_slices...)
107+
</pre></p>
108+
</blockquote>
109+
</blockquote>
110+
</li>
111+
112+
</ol>
113+
114+
</resolution>
115+
116+
</issue>

0 commit comments

Comments
 (0)