Skip to content

Commit

Permalink
Use simd-size-type for generator ctor calls
Browse files Browse the repository at this point in the history
Refs: mattkretz/std-simd-feedback#83

ChangeLog:

	* P1928/main.tex: Add bullet point about generator ctor.
	* P1928/wording.tex: Change size_t to \simdsizetype.
  • Loading branch information
mattkretz committed Aug 31, 2023
1 parent e48fe57 commit 315efb1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions P1928/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ \subsection{Make use of \code{int} and \code{size_t} consistent}\label{sec:simds
Different to the TS, this paper uses \code{\simdsizetype} for
\begin{itemize}
\item the SIMD width (number of elements),
\item the generator constructor call argument,
\item the subscript operator arguments, and
\item the \mask reductions that return an integral value.
\end{itemize}
Expand Down
16 changes: 11 additions & 5 deletions P1928/wording.tex
Original file line number Diff line number Diff line change
Expand Up @@ -758,10 +758,12 @@

\begin{itemdescr}
\pnum\constraints
\tcode{basic_simd(gen(integral_constant<size_t, i>()))} is well-formed \foralli.
\tcode{basic_simd(gen(integral_constant<\simdsizetype, i>()))} is well-formed
\foralli.

\pnum\effects
Constructs an object where the $i^\text{th}$ element is initialized to \tcode{gen(integral_constant<size_t, i>())}.
Constructs an object where the $i^\text{th}$ element is initialized to
\tcode{gen(integral_constant<\simdsizetype, i>())}.

\pnum
The calls to \tcode{gen} are unsequenced with respect to each other. Vectorization-unsafe standard library functions may not be invoked by \tcode{gen} (\iref{algorithms.parallel.exec}). \tcode{gen} is invoked exactly once for each $i$.
Expand Down Expand Up @@ -1131,7 +1133,9 @@

\begin{itemdescr}
\pnum\mandates
\tcode{binary_op} can be invoked with two arguments of type \tcode{basic_simd<T, A1>} returning \tcode{basic_simd<T, A1>} for every \tcode{A1} that is an ABI tag type.
\tcode{binary_op} can be invoked with two arguments of type
\tcode{basic_simd<T, A1>} returning \tcode{basic_simd<T, A1>} for every
\tcode{A1} that is an ABI tag type.

\pnum\returns
\tcode{\placeholdernc{GENERALIZED_SUM}(binary_op, x.data[$i$], ...)} \foralli (\iref{numerics.defns}).
Expand Down Expand Up @@ -1614,10 +1618,12 @@

\begin{itemdescr}
\pnum\constraints
\tcode{static_cast<bool>(gen(integral_constant<size_t, i>()))} is well-formed \foralli.
\tcode{static_cast<bool>(gen(integral_constant<\simdsizetype, i>()))} is
well-formed \foralli.

\pnum\effects
Constructs an object where the $i^\text{th}$ element is initialized to \tcode{gen(integral_constant<size_t, i>())}.
Constructs an object where the $i^\text{th}$ element is initialized to
\tcode{gen(integral_constant<\simdsizetype, i>())}.

\pnum
The calls to \tcode{gen} are unsequenced with respect to each other.
Expand Down

0 comments on commit 315efb1

Please sign in to comment.