Skip to content

Commit 6522a4b

Browse files
committed
Fixes to TS v2 as requested by ISO
1 parent 5bbd003 commit 6522a4b

16 files changed

+153
-51
lines changed

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1-
Document Number: N4774
2-
Date: 2018-10-08
1+
Document Number: NXXXX+1
2+
Date: 2018-XX-XX
33
Revises:
44
Project: Programming Language C++
55
Project Number: TS 19570
66
Reply-to: Jared Hoberock
77
NVIDIA Corporation
88
99

10-
# Parallelism TS Editor's Report, pre-San Diego mailing
10+
# Parallelism TS Editor's Report, post-San Diego mailing
1111

12-
N4773 is the proposed working draft of Parallelism TS Version 2. It contains editorial changes to the Parallelism TS working draft.
12+
NXXXX is the proposed working draft of Parallelism TS Version 2. It contains editorial changes to the Parallelism TS working draft.
1313

14-
N4773 updates the previous draft, N4755, published in the post-Rapperswil mailing.
14+
NXXXX updates the previous draft, N4473, published in the pre-San Diego mailing.
1515

1616
## Normative Changes
1717

18-
* None.
18+
XXX TODO
1919

2020
## Editorial Changes
2121

22-
* Eliminate mistakenly applied `noexcept` from `copy_to` and `copy_from`.
23-
* Various typographical corrections.
22+
* Various changes requested by ISO.
2423

2524
# Acknowledgements
2625

27-
Thanks to Matthias Kretz for correcting `copy_to` and `copy_from` and Hubert Tong for submitting editorial changes.
26+
Thanks to Hubert Tong, Richard Smith, Casey Carter, and Jens Maurer for ISO-approved wording suggestions.
2827

src/algorithms.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
\rSec1[parallel.alg.wavefront]{Wavefront Application}
66

77
\pnum
8-
For the purposes of this section, an \defn{evaluation} is a value
8+
For the purposes of this subclause, an \defn{evaluation} is a value
99
computation or side effect of an expression, or an execution of a statement.
1010
Initialization of a temporary object is considered a subexpression of the
1111
expression that necessitates the temporary object.
@@ -57,7 +57,7 @@
5757
In the following, $X_i$ and $X_j$ refer to evaluations of the same expression
5858
or statement contained in the application of an element access function
5959
corresponding to the $i^\text{th}$ and $j^\text{th}$ elements of the input sequence.
60-
\begin{note}There might be several evaluations $X_k$, $Y_k$, etc. of a single
60+
\begin{note}There can be several evaluations $X_k$, $Y_k$, etc. of a single
6161
expression or statement in application $k$, for example, if the expression or
6262
statement appears in a loop within the element access function.\end{note}
6363

@@ -182,7 +182,7 @@
182182
\pnum
183183
An algorithm uses reduction objects by allocating an unspecified number
184184
of instances, known as \defn{accumulators}, of the reduction value type. \begin{note}An
185-
implementation might, for example, allocate an accumulator for each thread in
185+
implementation can, for example, allocate an accumulator for each thread in
186186
its private thread pool.\end{note} Each accumulator is initialized with the
187187
object's reduction identity, except that the live-out object (which was
188188
initialized by the caller) comprises one of the accumulators. The algorithm
@@ -280,7 +280,7 @@
280280
\rSec2[parallel.alg.inductions]{Inductions}
281281

282282
\pnum
283-
Each of the function templates in this section return an \defn{induction object} of unspecified type having an \defn{induction value type} and encapsulating an initial value $i$ of that type and, optionally, a $stride$.
283+
Each of the function templates in this subclause return an \defn{induction object} of unspecified type having an \defn{induction value type} and encapsulating an initial value $i$ of that type and, optionally, a $stride$.
284284

285285
\pnum
286286
For each element in the input range, an algorithm over input sequence $S$ computes an \defn{induction value} from an induction variable and ordinal position $p$ within $S$ by the formula $i + p * stride$ if a stride was specified or $i + p$ otherwise. This induction value is passed to the element access function.
@@ -349,7 +349,7 @@
349349
The first argument to $f$ is an element from the input sequence.\begin{note}If \tcode{I} is an iterator type, the iterators in the input sequence are not dereferenced before being passed to $f$.\end{note} For each member of the \tcode{rest} parameter pack excluding $f$, an additional argument is passed to each application of $f$ as follows:
350350

351351
\begin{itemize}
352-
\item If the pack member is an object returned by a call to a reduction function listed in section \ref{parallel.alg.reductions}, then the additional argument is a reference to an accumulator of that reduction object.
352+
\item If the pack member is an object returned by a call to a reduction function listed in subclause \ref{parallel.alg.reductions}, then the additional argument is a reference to an accumulator of that reduction object.
353353

354354
\item If the pack member is an object returned by a call to \tcode{induction}, then the additional argument is the induction value for that induction object corresponding to the position of the application of $f$ in the input sequence.
355355
\end{itemize}

src/config-reg.tex

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
%!TEX root = ts.tex
2+
%%--------------------------------------------------
3+
%% Version numbers
4+
\newcommand{\docno}{ISO/IEC TS 19570:2018(E)}
5+
\newcommand{\prevdocno}{N4755}
6+
\newcommand{\tsver}{201806}
7+
8+
%% Title
9+
\newcommand{\doctitle}{\Cpp Extensions for Parallelism Version 2}
10+
11+
%% Release date
12+
\newcommand{\reldate}{2018-10-08}
13+
14+
\newcommand{\copyrightyear}{2018}
15+
16+
%% Library chapters

src/config.tex renamed to src/config-wd.tex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77

88
%% Title
99
\newcommand{\doctitle}{\Cpp Extensions for Parallelism Version 2}
10-
% \newcommand{\frtitle}{\Cpp Extensions for Parallelism Version 2}
1110

1211
%% Release date
13-
%\newcommand{\reldate}{\today}
1412
\newcommand{\reldate}{2018-10-08}
1513

1614
\newcommand{\copyrightyear}{2018}

src/cover-reg.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
\vfill
2424

25+
% bring the title a quarter page down as requested by ISO
26+
\vspace{2.75in}
2527
\textbf{\LARGE Programming Languages --- \doctitle}
2628

2729
% Langages de programmation --- \frtitle

src/executionpolicies.tex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,5 @@
9393

9494
\pnum
9595
The header \tcode{<experimental/execution>} declares a global object
96-
associated with each type of execution policy defined by this Technical
97-
Specification.
96+
associated with each type of execution policy defined by this document.
9897

src/foreword.tex

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
%!TEX root = ts.tex
2+
3+
\rSec0[parallel.foreword]{Foreword}
4+
5+
\pnum
6+
ISO (the International Organization for Standardization) and IEC (the
7+
International Electrotechnical Commission) form the specialized system for
8+
worldwide standardization. National bodies that are members of ISO or IEC
9+
participate in the development of International Standards through technical
10+
committees established by the respective organization to deal with particular
11+
fields of technical activity. ISO and IEC technical committees collaborate in
12+
fields of mutual interest. Other international organizations, governmental and
13+
non-governmental, in liaison with ISO and IEC, also take part in the work. In
14+
the field of information technology, ISO and IEC have established a joint
15+
technical committee, ISO/IEC JTC 1.
16+
17+
\pnum
18+
The procedures used to develop this document and those intended for its
19+
further maintenance are described in the ISO/IEC Directives, Part 1. In
20+
particular, the different approval criteria needed for the different types of
21+
document should be noted. This document was drafted in accordance with the
22+
editorial rules of the ISO/IEC Directives, Part 2 (see \url{www.iso.org/directives}).
23+
24+
\pnum
25+
Attention is drawn to the possibility that some of the elements of this
26+
document may be the subject of patent rights. ISO and IEC shall not be held
27+
responsible for identifying any or all such patent rights. Details of any
28+
patent rights identified during the development of the document will be in the
29+
Introduction and/or on the ISO list of patent declarations received (see
30+
\url{www.iso.org/patents}).
31+
32+
\pnum
33+
Any trade name used in this document is information given for the convenience
34+
of users and does not constitute an endorsement.
35+
36+
\pnum
37+
For an explanation of the voluntary nature of standards, the meaning of ISO
38+
specific terms and expressions related to conformity assessment, as well as
39+
information about ISO's adherence to the World Trade Organization (WTO)
40+
principles in the Technical Barriers to Trade (TBT) see
41+
\url{www.iso.org/iso/foreword.html}.
42+
43+
\pnum
44+
This document was prepared by Technical Committee ISO/IEC JTC 1, \textit{Information
45+
technology}, Subcommittee SC 22, \textit{Programming languages, their environments and
46+
system software interfaces}.
47+
48+
\pnum
49+
This second edition cancels and replaces the first edition (ISO/IEC 19570:2015)
50+
which has been technically revised.
51+
52+
\pnum
53+
The main changes compared to the previous edition are as follows:
54+
55+
\begin{itemize}
56+
\item Eliminate previously standardized functionality.
57+
\item Introduce task block.
58+
\item Introduce vector and wavefront policies.
59+
\item Introduce a template library for parallel for loops.
60+
\item Introduce data-parallel vector types.
61+
\end{itemize}
62+
63+
Any feedback or questions on this document should be directed to the user's national standards body. A complete listing of these bodies can be found at \url{www.iso.org/members.html}.
64+

src/front-reg.tex

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
%!TEX root = ts.tex
2+
\input{cover-reg}
3+
4+
%%--------------------------------------------------
5+
%% The table of contents
6+
% \markboth{\contentsname}{}
7+
8+
%% Include table of contents. Do not list "Contents"
9+
%% within it (per ISO request) but do include a
10+
%% bookmark for it in the PDF.
11+
\phantomsection
12+
\pdfbookmark{\contentsname}{toctarget}
13+
\hypertarget{toctarget}{\tableofcontents*}
14+
15+
\setcounter{tocdepth}{5}
16+
17+
\input{foreword}

src/front.tex renamed to src/front-wd.tex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
%!TEX root = ts.tex
22
\input{cover-wd}
3-
% \input{cover-reg}
43

54
%%--------------------------------------------------
65
%% The table of contents
@@ -15,4 +14,4 @@
1514

1615
\setcounter{tocdepth}{5}
1716

18-
%\input{preface}
17+
\input{foreword}

src/general.tex

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@
44

55
\rSec1[parallel.general.namespaces]{Namespaces and headers}
66

7-
\pnum Since the extensions described in this Technical Specification are
7+
\pnum Since the extensions described in this document are
88
experimental and not part of the \Cpp Standard Library, they should not be
99
declared directly within namespace \tcode{std}. Unless otherwise specified, all
10-
components described in this Technical Specification are declared in namespace
10+
components described in this document are declared in namespace
1111
\tcode{std\colcol{}experimental\colcol{}parallelism_v2}.
1212

13-
\begin{note}Once standardized, the components described by this Technical
14-
Specification are expected to be promoted to namespace \tcode{std}.\end{note}
13+
\begin{note}Once standardized, the components described by this document
14+
are expected to be promoted to namespace \tcode{std}.\end{note}
1515

1616
\pnum
17-
Each header described in this technical specification shall import the contents of \tcode{std\colcol{}experimental\colcol{}parallelism_v2} into \tcode{std\colcol{}experimental} as if by
17+
Each header described in this document shall import the contents of \tcode{std\colcol{}experimental\colcol{}parallelism_v2} into \tcode{std\colcol{}experimental} as if by
1818
\begin{codeblock}
1919
namespace std::experimental {
2020
inline namespace parallelism_v2 {}
2121
}
2222
\end{codeblock}
2323

2424
\pnum Unless otherwise specified, references to such entities described in this
25-
Technical Specification are assumed to be qualified with
25+
document are assumed to be qualified with
2626
\tcode{std::experimental::parallelism_v2}, and references to entities described
2727
in the \Cpp Standard Library are assumed to be qualified with \tcode{std::}.
2828

@@ -34,12 +34,12 @@
3434

3535
\rSec1[parallel.general.features]{Feature-testing recommendations}
3636

37-
\pnum An implementation that provides support for this Technical Specification shall define the feature test macro(s) in \tref{tab:parallel.general.features}.
37+
\pnum An implementation that provides support for this document shall define the feature test macro(s) in \tref{tab:parallel.general.features}.
3838

3939
\begin{floattable}{Feature-test macro(s)}{tab:parallel.general.features}
4040
{ x{2.1cm} | x{1cm} | x{4.4cm} | c | x{5.35cm} }
4141
\topline
42-
\lhdr{Title} & \chdr{Section} & \chdr{Macro Name} & \chdr{Value} & \rhdr{Header} \\
42+
\lhdr{Title} & \chdr{Subclause} & \chdr{Macro Name} & \chdr{Value} & \rhdr{Header} \\
4343
\capsep
4444
Task Block & \ref{parallel.taskblock} & \tcode{__cpp_lib_experimental_parallel_task_block} & 201711 & \tcode{<experimental/exception_list> \ <experimental/task_block>} \\
4545
\hline

src/references.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020
The C++ Standard Library components described in ISO/IEC 14882:2017 clauses 28, 29.8 and 23.10.10 are herein called the \defn{C++ Standard Algorithms Library}.
2121

2222
\pnum
23-
Unless otherwise specified, the whole of the C++ Standard's Library introduction (\CppXref{library}) is included into this Technical Specification by reference.
23+
Unless otherwise specified, the whole of the C++ Standard's Library introduction (\CppXref{library}) is included into this document by reference.

src/scope.tex

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,20 @@
33
\rSec0[parallel.scope]{Scope}
44

55
\pnum
6-
This Technical Specification describes requirements for implementations of an
7-
interface that computer programs written in the \Cpp programming language may
6+
This document describes requirements for implementations of an
7+
interface that computer programs written in the \Cpp programming language can
88
use to invoke algorithms with parallel execution. The algorithms described by
9-
this Technical Specification are realizable across a broad class of
9+
this document are realizable across a broad class of
1010
computer architectures.
1111

1212
\pnum
13-
This Technical Specification is non-normative. Some of the functionality
14-
described by this Technical Specification may be considered for standardization
15-
in a future version of \Cpp, but it is not currently part of any \Cpp standard.
16-
Some of the functionality in this Technical Specification may never be
17-
standardized, and other functionality may be standardized in a substantially
18-
changed form.
13+
There is a possibility of a subset of the functionality described by this
14+
document being standardized in a future version of \Cpp, but it is not
15+
currently part of any \Cpp standard. There is a possibility of some of the
16+
functionality in this document never being standardized, or of it being
17+
standardized in a substantially changed form.
1918

2019
\pnum
21-
The goal of this Technical Specification is to build widespread existing
20+
The goal of this document is to build widespread existing
2221
practice for parallelism in the \Cpp programming language. It gives
2322
advice on extensions to those vendors who wish to provide them.

src/simd.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@
246246
\pnum
247247
The header \tcode{<experimental/simd>} defines class templates, tag types, trait types, and function templates for element-wise operations on data-parallel objects.
248248

249-
\rSec2[parallel.simd.abi]{\tcode{simd} ABI tags}
249+
\rSec1[parallel.simd.abi]{\tcode{simd} ABI tags}
250250

251251
\begin{codeblock}
252252
namespace simd_abi {
@@ -332,7 +332,7 @@
332332
The behavior of a program that adds specializations for \tcode{deduce} is undefined.
333333
\end{itemdescr}
334334

335-
\rSec2[parallel.simd.traits]{\tcode{simd} type traits}
335+
\rSec1[parallel.simd.traits]{\tcode{simd} type traits}
336336

337337
\begin{itemdecl}
338338
template<class T> struct is_abi_tag { @\seebelow@ };
@@ -466,7 +466,7 @@
466466
Where present, the member typedef \tcode{type} names \tcode{simd<T, Abi1>} if \tcode V is \tcode{simd<T, Abi0>} or \tcode{simd_mask<T, Abi1>} if \tcode V is \tcode{simd_mask<T, Abi0>}.
467467
\end{itemdescr}
468468

469-
\rSec2[parallel.simd.whereexpr]{Where expression class templates}
469+
\rSec1[parallel.simd.whereexpr]{Where expression class templates}
470470

471471
\begin{codeblock}
472472
template<class M, class T> class const_where_expression {

src/styles.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
\makepagestyle{cpppage}
2424
\makeevenhead{cpppage}{\textbf{\docno}}{}{}
25-
\makeoddhead{cpppage}{\textbf{\docno}}{}{}
25+
\makeoddhead{cpppage}{\begin{flushright}\textbf{\docno}\end{flushright}}{}{}
2626
\makeevenfoot{cpppage}{\leftmark}{\copyright\,ISO/IEC {\copyrightyear} -- All rights reserved}{\thepage}
2727
\makeoddfoot{cpppage}{\leftmark}{\copyright\,ISO/IEC {\copyrightyear} -- All rights reserved}{\thepage}
2828

src/taskblock.tex

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
of \tcode{define_task_block} or \tcode{define_task_block_restore_thread} and
9494
\defn{nearest enclosing} means the most recent invocation that has not yet
9595
completed. Code designated for execution in another thread by means other
96-
than the facilities in this section (e.g., using \tcode{thread} or
96+
than the facilities in this subclause (e.g., using \tcode{thread} or
9797
\tcode{async}) are not enclosed in the task block and a
9898
\tcode{task_block} passed to (or captured by) such code is not active within
9999
that code. Performing any operation on a \tcode{task_block} that is not
@@ -124,8 +124,6 @@
124124
Implementations are encouraged to diagnose the above error at translation time.
125125
\end{note}
126126

127-
\rSec2[parallel.taskblock.class.run]{\tcode{task_block} member function template \tcode{run}}
128-
129127
\begin{itemdecl}
130128
template<class F> void run(F&& f);
131129
\end{itemdecl}
@@ -168,8 +166,6 @@
168166

169167
\end{itemdescr}
170168

171-
\rSec2[parallel.taskblock.class.wait]{\tcode{task_block} member function \tcode{wait}}
172-
173169
\begin{itemdecl}
174170
void wait();
175171
\end{itemdecl}

0 commit comments

Comments
 (0)