Skip to content

Commit d5160c6

Browse files
committed
[mdspan.submdspan.extents] Factor out common result expression
1 parent 3b2a8ee commit d5160c6

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

source/containers.tex

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21817,20 +21817,17 @@
2181721817
\returns
2181821818
A value \tcode{ext} of type \tcode{SubExtents} such that
2181921819
for each $k$
21820-
for which \tcode{\placeholder{map-rank}[$k$] != dynamic_extent} is \tcode{true}:
21820+
for which \tcode{\placeholder{map-rank}[$k$] != dynamic_extent} is \tcode{true},
21821+
\tcode{ext.extent(\placeholder{map-rank}[$k$])} equals:
2182121822

2182221823
\begin{itemize}
2182321824
\item
21824-
\tcode{ext.extent(\placeholder{map-rank}[$k$])} equals
21825-
\tcode{$s_k$.extent == 0 ? 0 : 1 + (\exposid{de-ice}($s_k$.extent) - 1) /}\linebreak{}
21826-
\tcode{\exposid{de-ice}($s_k$.stride)}
21825+
\tcode{$s_k$.extent == 0 ? 0 : 1 + (\exposid{de-ice}($s_k$.extent) - 1) / \exposid{de-ice}($s_k$.stride)}
2182721826
if $S_k$ is a specialization of \tcode{strided_slice},
2182821827

2182921828
\item
2183021829
otherwise,
21831-
\tcode{ext.extent(\placeholder{map-rank}[$k$])} equals
21832-
\tcode{\exposid{last_}<$k$>(src, slices...) -}
21833-
\tcode{\exposid{first_}<Index-\linebreak{}Type, $k$>(slices...)}.
21830+
\tcode{\exposid{last_}<$k$>(src, slices...) - \exposid{first_}<IndexType, $k$>(slices...)}.
2183421831
\end{itemize}
2183521832
\end{itemdescr}
2183621833

0 commit comments

Comments
 (0)