Skip to content

Commit

Permalink
Add wording for new <simd> header and [simd] subclause
Browse files Browse the repository at this point in the history
Plus a few formatting adjustments.

ChangeLog:

	* P1928/changelog.tex:
	* P1928/main.tex:
	* P1928/wording.tex:
	* wg21macros.sty:
  • Loading branch information
mattkretz committed Apr 25, 2024
1 parent 5dacf45 commit 9b8aac9
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 16 deletions.
5 changes: 3 additions & 2 deletions P1928/changelog.tex
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ \section{Changelog}
\item Spell out “iff” (\ref{wording.deducet}).
\item Fixed template argument to \nativeabi\ in the default template argument of \code{basic_simd_mask} (\ref{sec:simd.syn}).
\item Fixed default template argument to \code{simd_mask} to be consistent with \code{simd} (\ref{sec:simd.syn}).

\todo Add \code{<simd>} to the list of headers in 16.4.2.3
\item Add instructions to add \code{<simd>} to the table of headers in [headers].
\item Add instructions to add a new subclause to the table in [numerics.general].
\item Add instructions to add \code{<simd>} [diff.23.library].
\end{revision}
45 changes: 37 additions & 8 deletions P1928/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ \subsection{Simplify/generalize casts}\label{sec:casts}
\subsection{Add \code{simd_mask} generator constructor}

This constructor was added:
\begin{wgText}
\begin{wgText}\vskip-2ex
\begin{itemdecl}
template<class G> simd_mask(G&& gen) noexcept;
\end{itemdecl}
Expand Down Expand Up @@ -915,16 +915,45 @@ \section{Wording: Add Section 9 of N4808 with modifications}\label{sec:wording}
The following section presents the wording to be applied against the \CC{}
working draft.

\begin{wgText}[In {[version.syn]}, add]
\begin{codeblock}
#define __cpp_lib_simd YYYYMML // also in <simd>
\end{codeblock}
\bigskip
In {[headers]}, add the header {\wgTextFonts\wgAdd{\code{<simd>}}} to
{[tab:headers.cpp]}.

\bigskip
In {[numerics.general]}, add a new row to {[tab:numerics.summary]}:\\
\begingroup
\rmfamily\smaller[1]
\begin{tabular}{|lll|}
\hline
\wgAdd{[simd]} & \wgAdd{Data-parallel types} & \wgAdd{\code{<simd>}} \\
\hline
\end{tabular}
\endgroup
\par\vskip.5\baselineskip plus 2\baselineskip

\bigskip
In {[diff.23.library]}, modify:
\begin{wgText}[{[diff.23.library]}]
\pnum
\textbf{Affected subclause:} [headers]
\diffdef{Change} New headers.
\diffdef{Rationale} New functionality.
\diffdef{Effect on original feature} The following \CC{} headers are new: \tcode{<debugging>},
\tcode{<hazard_pointer>}, \tcode{<linalg>}, \tcode{<rcu>},\wgAdd{ \tcode{<simd>,}} and \tcode{<text_encoding>}.
Valid \CC{} 2023 code that \tcode{\#include}{s} headers with these names may be invalid in this revision of \CC{}.
\end{wgText}
Adjust the placeholder value as needed so as to denote this proposal's date of adoption.
\bigskip

\begin{wgText}[Add a new subclause after §28.8 {[numbers]}]
In {[version.syn]}, add the following and adjust the placeholder value as
needed so as to denote this proposal's date of adoption:
\begin{wgText}[{[version.syn]}]
\wgAdd{\tcode{\#define __cpp_lib_simd YYYYMML // also in <simd>}}
\end{wgText}

Add a new subclause after §28.9 {[linalg]}:
\begin{wgText}
\setcounter{WGClause}{28}
\setcounter{WGSubSection}{8}
\setcounter{WGSubSection}{9}
\lstset{%
columns=fullflexible,
deletedelim=**[is]{|-}{-|},
Expand Down
2 changes: 1 addition & 1 deletion P1928/wording.tex
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
\constraints Application of #1 to objects of type \tcode{value_type} is well-formed.
}

\rSec0[simd]{Data-Parallel Types}
\rSec0[simd]{Data-parallel types}
\rSec1[simd.general]{General}

\pnum
Expand Down
16 changes: 11 additions & 5 deletions wg21macros.sty
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@
\newcommand\wgItemRem{\color{WgRem}\item[\st{\mbox{ \textbullet }}]\hspace*{-\labelsep}\st{\mbox{\hspace*{\labelsep}}}}
\newenvironment{wgBAdd}{\color{WgAdd}}{\color{black}}
\newenvironment{wgBRem}{\color{WgRem}}{\color{black}}
\newcommand\wgTextFonts{\def\ttdefault{wgCodeFont}\rmfamily\smaller[1]}
\def\wgLabelPrefix{}%
\newenvironment{wgText}[1][]{%
\vskip.2\baselineskip plus 1\baselineskip
\begingroup%
\let\wgRealRef=\ref%
\renewcommand\ref[1]{\wgRealRef{sec:\wgLabelPrefix##1}}%
Expand All @@ -102,20 +104,20 @@
moredelim=**[is][\itshape]{|/}{/|}
}%
\let\type=\code%
\def\ttdefault{wgCodeFont}%
\par\rmfamily\smaller[1]\noindent\hrulefill%
\wgTextFonts%
\par\noindent\hrulefill%
\begingroup%
\def\arg{#1}%
\def\empty{}%
\ifx\arg\empty\else%
\hspace{1ex} #1%
\fi%
\endgroup\par
\endgroup\par\nopagebreak[4]\vskip.2\baselineskip%
}
{%
\par\noindent\hrulefill%
\par\nopagebreak[4]\vskip-.3\baselineskip\nopagebreak[4]\noindent\hrulefill%
\endgroup\par%
\vskip.5\baselineskip plus 2\baselineskip%
\vskip.9\baselineskip plus 4\baselineskip\pagebreak[1]%
}

%%--------------------------------------------------
Expand Down Expand Up @@ -412,3 +414,7 @@

\newcommand{\UNSP}[1]{\textit{\texttt{#1}}}
\newcommand{\seebelow}{\UNSP{see below}}

%% Change descriptions
\newcommand{\diffhead}[1]{\textbf{#1:}\space}
\newcommand{\diffdef}[1]{\ifvmode\else\hfill\break\fi\diffhead{#1}}

0 comments on commit 9b8aac9

Please sign in to comment.