Skip to content

Commit bf8b784

Browse files
committed
Fixup: Fix various mistakes I've made, fix hboxes, apply menial changes like punctuation
1 parent 4f95712 commit bf8b784

File tree

1 file changed

+40
-53
lines changed

1 file changed

+40
-53
lines changed

source/containers.tex

Lines changed: 40 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -25262,15 +25262,10 @@
2526225262
The subset viewed by the created \tcode{mdspan} is determined by
2526325263
the \tcode{SliceSpecifier} arguments.
2526425264

25265-
%FIXME: WEIRD: the paper inconsistently uses math font and code font for the "S"
25266-
% that we are defining.
25267-
% To my understanding, we should aim to use code fonts for types,
25268-
% so this math font $S$ should be replaced.
2526925265
\pnum
2527025266
Given a signed or unsigned integer type \tcode{IndexType},
2527125267
a type $S$ is a
25272-
%FIXME: the way I marked up this definition is almost certainly not the way it should be done
25273-
\defnx{\tcode{submdspan} slide type for \tcode{IndexType}}{\tcode{submdspan}!slice type}
25268+
\defnx{\tcode{submdspan} slice type for \tcode{IndexType}}{\tcode{submdspan}!slice type for \tcode{IndexType}}
2527425269
if at least one of the following holds:
2527525270
\begin{itemize}
2527625271
\item
@@ -25281,8 +25276,7 @@
2528125276
$S$ is a specialization of \tcode{strided_slice} and
2528225277
\tcode{is_convertible_v<$X$, IndexType>} is \tcode{true} for $X$ denoting
2528325278
\tcode{$S$::offset_type},
25284-
%FIXME: Oxford comma
25285-
\tcode{$S$::extent_type} and
25279+
\tcode{$S$::extent_type}, and
2528625280
\tcode{$S$::stride_type}; or
2528725281
\item
2528825282
all of the following hold:
@@ -25293,22 +25287,22 @@
2529325287
\item
2529425288
\tcode{sizeof...(ls)} is equal to 2, and
2529525289
\item
25296-
\tcode{(is_convertible_v<decltype(std::move(ls))>, IndexType> && ...)} is \tcode{true}.
25290+
\tcode{(is_convertible_v<decltype(std::move(ls)), IndexType> \&\& ...)} is \tcode{true}.
2529725291
\end{itemize}
2529825292
\end{itemize}
2529925293

2530025294
\pnum
2530125295
Given a signed or unsigned integer type \tcode{IndexType},
2530225296
a type $S$ is a
25303-
\defnx{canonical \tcode{submdspan} index type for \tcode{IndexType}}{\tcode{submdspan}!canonical index type}
25304-
if $S$ is either \tcode{IndexType} or \tcode{constant_wrapper<V>}
25297+
\defnx{canonical \tcode{submdspan} index type for \tcode{IndexType}}{\tcode{submdspan}!canonical index type for \tcode{IndexType}}
25298+
if $S$ is either \tcode{IndexType} or \tcode{constant_wrapper<v>}
2530525299
for some value \tcode{v} of type \tcode{IndexType},
2530625300
such that \tcode{v} is greater than or equal to zero.
2530725301

2530825302
\pnum
2530925303
Given a signed or unsigned integer type \tcode{IndexType},
2531025304
a type $S$ is a
25311-
\defnx{canonical \tcode{submdspan} slice type for \tcode{IndexType}}{\tcode{submdspan}!canonical slice type}
25305+
\defnx{canonical \tcode{submdspan} slice type for \tcode{IndexType}}{\tcode{submdspan}!canonical slice type for \tcode{IndexType}}
2531225306
if exactly one of the following is \tcode{true}:
2531325307
\begin{itemize}
2531425308
\item
@@ -25330,7 +25324,7 @@
2533025324
\end{itemize}
2533125325

2533225326
\pnum
25333-
A type $S$ is a \defnadj{collapsing}{slice type} if
25327+
A type \tcode{S} is a \defnadj{collapsing}{slice type} if
2533425328
it is neither \tcode{full_extent_t} nor
2533525329
a specialization of \tcode{strided_slice}.
2533625330
\begin{note}
@@ -25354,29 +25348,25 @@
2535425348
Given an object \tcode{e} of type \tcode{E} that is a specialization of \tcode{extents}, and
2535525349
an object \tcode{s} of type \tcode{S}
2535625350
that is a canonical \tcode{submdspan} slice type for \tcode{E::index_type},
25357-
the \defnx{\tcode{submdspan} slice range of \tcode{s} for the $k^\text{th}$ extent of \tcode{E}}{\tcode{submdspan}!slice range}
25358-
of \tcode{e} is:
25351+
the \defnx{\tcode{submdspan} slice range of \tcode{s} for the $k^\text{th}$ extent of \tcode{e}}{\tcode{submdspan}!slice range of \tcode{s} for the $k^\text{th}$ extent of \tcode{e}}
25352+
is:
2535925353
\begin{itemize}
2536025354
\item
2536125355
\range{$0$}{e.extent($k$)},
2536225356
if \tcode{S} is \tcode{full_extent_t};
2536325357
\item
2536425358
\range{E::index_type(s.offset)}{E::index_type(s.offset + s.extent)},
25365-
if \tcode{S} is a specialization of \tcode{strided_slice}; otherwise
25359+
if \tcode{S} is a specialization of \tcode{stri\-ded_slice}; otherwise
2536625360
\item
2536725361
\range{\tcode{E::index_type(s)}}{$\tcode{E::index_type(s)} + 1$}
2536825362
\end{itemize}
2536925363

2537025364
\pnum
2537125365
Given a type \tcode{E} that is a specialization of \tcode{extents},
2537225366
a type \tcode{S} is a
25373-
%FIXME: the trailing comma here makes no grammatical sense
25374-
\defnx{valid \tcode{submdspan} slice type for the $k^\text{th}$ extent of \tcode{E}}{\tcode{submdspan}!valid slice type},
25367+
\defnx{valid \tcode{submdspan} slice type for the $k^\text{th}$ extent of \tcode{E}}{\tcode{submdspan}!valid slice type for the $k^\text{th}$ extent of \tcode{E}}
2537525368
if \tcode{S} is a canonical slice type for \tcode{E::index_type}, and
25376-
for
25377-
%FIXME: this is weird ... what is "x"?
25378-
%Maybe say "for a value x"?
25379-
$x$ equal to \tcode{E::static_extent($k$)},
25369+
for $x$ equal to \tcode{E::static_extent($k$)},
2538025370
either $x$ is equal to \tcode{dynamic_extent}; or
2538125371
\begin{itemize}
2538225372
\item
@@ -25405,7 +25395,7 @@
2540525395
that is a specialization of \tcode{extents} and
2540625396
an object \tcode{s} of type \tcode{S},
2540725397
\tcode{s} is a
25408-
\defnx{valid \tcode{submdspan} slice for the $k^\text{th}$ extent of \tcode{e}}{\tcode{submdspan}!valid slice}
25398+
\defnx{valid \tcode{submdspan} slice for the $k^\text{th}$ extent of \tcode{e}}{\tcode{submdspan}!valid slice for the $k^\text{th}$ extent of \tcode{e}}
2540925399
if
2541025400
\begin{itemize}
2541125401
\item
@@ -25490,9 +25480,9 @@
2549025480
\rSec4[mdspan.sub.helpers]{Exposition-only helpers}
2549125481

2549225482
\pnum
25493-
\indexlibraryglobal{\exposid{MAP_RANK}}%
25483+
\indexlibraryglobal{\tcode{\placeholder{MAP_RANK}}}%
2549425484
For a pack \tcode{p} and an integer $i$,
25495-
let \tcode{\exposid{MAP_RANK}(p, $i$)} be the number of elements \tcode{p...[$j$]}
25485+
let \tcode{\placeholder{MAP_RANK}(p, $i$)} be the number of elements \tcode{p...[$j$]}
2549625486
for $0 \le j < i$ whose types are not collapsing slice types.
2549725487

2549825488
\begin{itemdecl}
@@ -25502,7 +25492,7 @@
2550225492

2550325493
\begin{itemdescr}
2550425494
\pnum
25505-
The concept \tcode{\exposconcept{is_strided-slice}<T>}
25495+
The concept \tcode{\exposconcept{is-strided-slice}<T>}
2550625496
is satisfied and modeled if and only
2550725497
if \tcode{T} is a specialization of \tcode{strided_slice}.
2550825498
\end{itemdescr}
@@ -25517,7 +25507,7 @@
2551725507
\pnum
2551825508
\mandates
2551925509
If \tcode{S} models \exposconcept{integral-constant-like},
25520-
then \tcode{extents<IndexType>::\exposid{index-cast}(S::value)}
25510+
then \tcode{extents<IndexType>::\exposid{index-cast}(S::val\-ue)}
2552125511
is representable as a value of type \tcode{IndexType}.
2552225512

2552325513
\pnum
@@ -25613,7 +25603,7 @@
2561325603
is a \tcode{submdspan} slice type for \tcode{IndexType}, and
2561425604
\item
2561525605
\tcode{decltype(canonical-slice<IndexType>(slices...[k]))}
25616-
is a valid submdspan slice type for the $k^\text{th}$ extent of
25606+
is a valid \tcode{submdspan} slice type for the $k^\text{th}$ extent of
2561725607
\tcode{extents<IndexType, Extents...>}.
2561825608
\end{itemize}
2561925609

@@ -25655,11 +25645,11 @@
2565525645
For each rank index $k$ of \tcode{src}:
2565625646
\begin{itemize}
2565725647
\item
25658-
\tcode{SliceSpecifiers...[k]}
25648+
\tcode{SliceSpecifiers...[$k$]}
2565925649
is a \tcode{submdspan} slice type for \tcode{IndexType}, and
2566025650
\item
25661-
\tcode{decltype(slices...[k])} is a valid \tcode{submdspan} slice type
25662-
for the $k^\text{th}$ extent of \tcode{extents<IndexType, Extents...>}.
25651+
\tcode{decltype(slices...[$k$])} is a valid \tcode{submdspan} slice type
25652+
for the $k^\text{th}$ extent of \tcode{extents<\brk{}Index\-Type, Extents...>}.
2566325653
\end{itemize}
2566425654

2566525655
\pnum
@@ -25674,12 +25664,12 @@
2567425664
\begin{itemize}
2567525665
\item
2567625666
\tcode{SubExtents::rank()} equals
25677-
\tcode{\exposid{MAP_RANK}(slices, Extents::rank())}; and
25667+
\tcode{\placeholder{MAP_RANK}(slices, Extents::rank())}; and
2567825668

2567925669
\item
2568025670
for each rank index $k$ of \tcode{Extents} such that
2568125671
the type of \tcode{slices...[$k$]} is not a collapsing slice type,
25682-
\tcode{SubExt\-ents::static_extent(\exposid{MAP_RANK}(slices, $k$))}
25672+
\tcode{SubExt\-ents::static_extent(\placeholder{MAP_RANK}(slices, $k$))}
2568325673
equals the following, where $\Sigma_k$
2568425674
denotes the type of \tcode{slices...[$k$]}:
2568525675

@@ -25716,7 +25706,7 @@
2571625706
A value \tcode{ext} of type \tcode{SubExtents} such that
2571725707
for each rank index $k$ of \tcode{extents<IndexType, Extents...>},
2571825708
where the type of \tcode{slices...[$k$]} is not a collapsing slice type,
25719-
\tcode{ext.extent(\exposid{MAP_RANK}(slices, $k$))}
25709+
\tcode{ext.extent(\placeholder{MAP_RANK}(slices, $k$))}
2572025710
equals the following,
2572125711
where $\sigma_k$ denotes \tcode{slices...[$k$]}:
2572225712
\begin{itemize}
@@ -25777,13 +25767,11 @@
2577725767
\item
2577825768
the expression \tcode{submdspan_mapping(m, invalid_slices...)} is ill-formed, and
2577925769
\item
25780-
%FIXME: is ISO going to like a bullet ending in a colon?
2578125770
the following expression is well-formed and has the specified semantics:
25782-
\end{itemize}
25783-
25784-
\begin{itemdecl}
25771+
\begin{codeblock}
2578525772
submdspan_mapping(m, valid_slices...)
25786-
\end{itemdecl}
25773+
\end{codeblock}
25774+
\end{itemize}
2578725775

2578825776
\begin{itemdescr}
2578925777
\pnum
@@ -25793,7 +25781,7 @@
2579325781
\item \tcode{SM} meets the layout mapping requirements\iref{mdspan.layout.policy.reqmts},
2579425782
\item \tcode{SM::extents_type} is a specialization of \tcode{extents},
2579525783
\item \tcode{SM::extents_type::rank()} equals
25796-
\tcode{\exposid{MAP_RANK}(valid_slices, M_rank)}, and
25784+
\tcode{\placeholder{MAP_RANK}(valid_slices, M_rank)}, and
2579725785
\item \tcode{SM::extents_type::index_type} denotes \tcode{IT}.
2579825786
\end{itemize}
2579925787

@@ -25803,10 +25791,10 @@
2580325791
\begin{itemize}
2580425792
\item
2580525793
\tcode{smr.mapping.extents() == submdspan_extents(m.extents(), valid_slices...)}
25806-
is \tcode{true}; and
25794+
is \tcode{true};\newline and
2580725795
\item
2580825796
for each integer pack \tcode{i}
25809-
which is a multidimensional index in \tcode{smr.mapping.extents()},
25797+
which is a multidimensional index in \tcode{smr.mapping.extents()},\newline
2581025798
\tcode{smr.mapping(i...) + smr.offset == m(j)} is \tcode{true},
2581125799
where \tcode{j} is an integer pack such that
2581225800
\begin{itemize}
@@ -25821,8 +25809,7 @@
2582125809
for extent $\rho$ of \tcode{m.extents()}, and
2582225810
\item
2582325811
zero if the type of \tcode{valid_slices...[$\rho$]} is a collapsing slice type,
25824-
%FIXME: the comma before "otherwise" seems wrong
25825-
\tcode{i...[MAP_RANK(valid_slices,$\rho$)]}, otherwise.
25812+
\tcode{i...[MAP_RANK(valid_slices,$\rho$)]} otherwise.
2582625813
\end{itemize}
2582725814
\end{itemize}
2582825815
\end{itemize}
@@ -25884,15 +25871,14 @@
2588425871
an \tcode{array<SubExtents::index_type, SubExtents::rank()>}
2588525872
such that for each rank index $k$ of \tcode{extents()}
2588625873
for which the type of \tcode{slices...[$k$]} is not a collapsing slice type,
25887-
\tcode{sub_strides[\exposid{MAP_RANK}(slices,$k$)]} equals:
25874+
\tcode{sub_strides[\placeholder{MAP_RANK}(slices,$k$)]} equals:
2588825875
\begin{itemize}
2588925876
\item
2589025877
\tcode{stride(k) * s.stride}
2589125878
%FIXME: this doesn't make any sense.
2589225879
%How can an lvalue like "s" be the specialization of a type?
2589325880
if \tcode{s} is a specialization of \tcode{strided_slice} and
25894-
\tcode{s.stride < s.extent} is \tcode{true}
25895-
%FIXME: comma?
25881+
\tcode{s.stride < s.extent} is \tcode{true},
2589625882
where \tcode{s} is \tcode{slices...[$k$]};
2589725883
\item
2589825884
otherwise, \tcode{stride($k$)}.
@@ -25909,7 +25895,7 @@
2590925895
equals \tcode{extents().extent($k$)}
2591025896
for any rank index $k$ of \tcode{extents()}, then
2591125897
let \tcode{offset} be a value of type \tcode{size_t} equal to
25912-
\tcode{operator().required_span_size()}.
25898+
\tcode{required_span_size()}.
2591325899
Otherwise,
2591425900
let \tcode{offset} be a value of type \tcode{size_t} equal to
2591525901
\tcode{operator()(ls...)}.
@@ -25952,7 +25938,7 @@
2595225938
\end{itemize}
2595325939
\begin{note}
2595425940
If the above conditions are true,
25955-
all \tcode{SpliceSpecifiers...[$k$]} with $k$ larger than \tcode{SubExtents::rank() - 1}
25941+
all \tcode{SpliceSpecifiers...[$k$]} with $k$ larger than \tcode{SubExtents\brk{}::rank\brk{}() - 1}
2595625942
are convertible to \tcode{index_type}.
2595725943
\end{note}
2595825944
\item
@@ -25963,7 +25949,7 @@
2596325949
\end{codeblock}
2596425950
if for a value $u$ for which $u+1$ is
2596525951
the smallest value $p$ larger than zero
25966-
for which \tcode{SliceSpecifiers...[p]} is a unit-stride slice type,
25952+
for which \tcode{SliceSpecifiers...\brk{}[\brk{}p]} is a unit-stride slice type,
2596725953
the following conditions are met:
2596825954
\begin{itemize}
2596925955
\item
@@ -26028,7 +26014,8 @@
2602826014
\end{itemize}
2602926015
\begin{note}
2603026016
If the above conditions are true,
26031-
all \tcode{SliceSpecifiers...[$k$]} with $k < \tcode{\exposid{rank_} - SubExtents::rank()}$
26017+
all \tcode{SliceSpecifiers...[$k$]} with\newline
26018+
$k < \tcode{\exposid{rank_} - SubExtents::rank()}$
2603226019
are convertible to \tcode{index_type}.
2603326020
\end{note}
2603426021
\item
@@ -26137,7 +26124,7 @@
2613726124
\end{codeblock}
2613826125
if for a value $u$
2613926126
for which \tcode{$u$ + 1} is the smallest value $p$ larger than zero
26140-
for which \tcode{SliceSpecifiers...[$p$]} is a unit-stride slice type,
26127+
for which \tcode{Slice\-Speci\-fiers\brk{}...[\brk{}$p$]} is a unit-stride slice type,
2614126128
the following conditions are met:
2614226129
\begin{itemize}
2614326130
\item
@@ -26219,7 +26206,7 @@
2621926206
\item
2622026207
for each $k$ in the range
2622126208
%FIXME: drive-by fix the broken parenthesis
26222-
\range{\exposid{rank_} - SubExtents::rank() - $u$ + 1}{\exposid{rank_} - $u$ - 1)},
26209+
\range{\exposid{rank_} - SubExtents::rank() - $u$ + 1}{\exposid{rank_} - $u$ - 1)},\newline
2622326210
\tcode{SliceSpecifiers...[$k$]} denotes \tcode{full_extent_t}; and
2622426211
\item
2622526212
for $k$ equal to \tcode{\exposid{rank_} - SubExtents::rank() - $u$},\newline

0 commit comments

Comments
 (0)