Skip to content

Commit 24659bd

Browse files
CaseyCarterjensmaurer
authored andcommitted
[mdspan.layout.stride.expo] Convert to integral type to perform math
[mdspan.layout.stride.cons] uses either a span or array of a type which we can only convert to `index_type` as the second argument to the exposition-only `REQUIRED-SPAN-SIZE`. We must perform that conversion before doing math with the result.
1 parent 5c7841b commit 24659bd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

source/containers.tex

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20419,8 +20419,12 @@
2041920419
\item
2042020420
otherwise \tcode{0}, if the size of the multidimensional index space \tcode{e} is 0,
2042120421
\item
20422-
otherwise \tcode{1} plus the sum of products of \tcode{(e.extent($r$) - 1)} and \tcode{strides[$r$]}
20423-
for all $r$ in the range $[0, \tcode{e.rank()})$.
20422+
otherwise \tcode{1} plus the sum of products of
20423+
\tcode{(e.extent($r$) - 1)} and
20424+
\begin{codeblock}
20425+
extents_type::@\exposid{index-cast}@(strides[@$r$@])
20426+
\end{codeblock}
20427+
for all $r$ in the range $[0, \tcode{e.rank()})$.
2042420428
\end{itemize}
2042520429

2042620430
\pnum

0 commit comments

Comments
 (0)