Skip to content

Commit

Permalink
P3287R2. Add note about std::simd alias
Browse files Browse the repository at this point in the history
ChangeLog:

	* P3287_exploration_of_namespaces_for_simd/changelog.tex:
	* P3287_exploration_of_namespaces_for_simd/main.tex:
	* P3287_exploration_of_namespaces_for_simd/naming.tex:
  • Loading branch information
mattkretz committed Nov 13, 2024
1 parent fc8f05e commit 4ec4eee
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions P3287_exploration_of_namespaces_for_simd/changelog.tex
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ \section{Changelog}

\begin{revision}
\item Suggest and discuss \code{std::datapar::simd}, i.e. rename the namespace.
\item Note that \code{std::simd} could be an alias to \code{std::datapar::simd}.
\end{revision}
2 changes: 1 addition & 1 deletion P3287_exploration_of_namespaces_for_simd/main.tex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\newcommand\wgTitle{Exploration of namespaces for std::simd}
\newcommand\wgName{Matthias Kretz <[email protected]>}
\newcommand\wgDocumentNumber{D3287R2}
\newcommand\wgDocumentNumber{P3287R2}
\newcommand\wgGroup{LEWG}
\newcommand\wgTarget{\CC{}26}
\newcommand\wgAcknowledgements{Daniel Towner and Ruslan Arutyunyan contributed to this paper via discussions / reviews.}
Expand Down
15 changes: 15 additions & 0 deletions P3287_exploration_of_namespaces_for_simd/naming.tex
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@ \subsection{Namespace names}
This package is about expressing data-parallelism, which only incidentally
allows access to SIMD registers in a CPU.

Note that if the namespace and type names differ, and the type name can stand
on its own, it is possible to introduce an alias in the \code{std} namespace\footnote{
Thanks to Bryce for the suggestion!
}:
\smallskip\begin{lstlisting}
namespace std {
namespace datapar {
template<class T, class Abi> class basic_simd;
template<class T, @\simdsizetype@ N> using simd = basic_simd<T, … >;
}
using datapar::basic_simd;
using datapar::simd;
}
\end{lstlisting}
This is not proposed at this point.

\subsection{Class template names}
In any case, I suggest renaming \mask to \code{basic_mask}, and accordingly
Expand Down

0 comments on commit 4ec4eee

Please sign in to comment.