Skip to content

Commit 02f040a

Browse files
committed
Merge branch 'v2' of github.com:cplusplus/parallelism-ts into flatten-n4706-diffs
2 parents 9216b52 + c235521 commit 02f040a

File tree

6 files changed

+39
-42
lines changed

6 files changed

+39
-42
lines changed

README.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
1-
Document Number: N4707
2-
Date: 2017-11-22
1+
Document Number: N4726
2+
Date: 2018-02-12
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, post-Albuquerque mailing
10+
# Parallelism TS Editor's Report, pre-Jacksonville mailing
1111

12-
N4706 is the proposed working draft of Parallelism TS Version 2. It contains changes to the Parallelism TS as directed by the committee at the Albuquerque meeting.
12+
N4725 is the proposed working draft of Parallelism TS Version 2. It contains editorial changes to the Parallelism TS.
1313

14-
N4706 updates the previous draft, N4696, published in the pre-Toronto mailing.
15-
16-
# Technical Changes
17-
18-
* Apply P0776R1 - Rebase the Parallelism TS onto the C++17 Standard
19-
* Apply P0075R2 - Template Library for Parallel For Loops
14+
N4725 updates the previous draft, N4706, published in the post-Toronto mailing.
2015

2116
# Acknowledgements
2217

23-
Thanks to Alisdair Meredith and Pablo Halpern for reviewing these changes.
18+
Thanks to Pablo Halpern and Matthias Kretz for suggesting editorial changes.
2419

algorithms.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ <h1>Wavefront Application</h1>
8383
<p>
8484
Let <i>f</i> be a function called for each argument list in a sequence of argument lists.
8585
<i>Wavefront application</i> of <i>f</i> requires that evaluation A<sub>i</sub> be sequenced
86-
before evaluation B<sub>i</sub> if i &lt; j and and:
86+
before evaluation B<sub>j</sub> if i &lt; j and:
8787

8888
<ul>
8989
<li>A<sub>i</sub> is sequenced before some evaluation B<sub>i</sub> and B<sub>i</sub> is horizontally matched with B<sub>j</sub>, or</li>
@@ -127,7 +127,7 @@ <h1>Header <code>&lt;experimental/algorithm&gt;</code> synopsis</h1>
127127

128128
// Exposition only: Suppress template argument deduction.
129129
template&lt;class T&gt; struct no_deduce { using type = T; };
130-
template&lt;class T&gt; struct no_dedude_t = typename no_deduce&lt;T&gt;::type;
130+
template&lt;class T&gt; struct no_dedu<ins>c</ins><del>d</del>e_t = typename no_deduce&lt;T&gt;::type;
131131

132132
<cxx-ref insynopsis="" to="parallel.alg.reductions"></cxx-ref> Support for reductions
133133
template&lt;class T, class BinaryOperation&gt;
@@ -287,7 +287,7 @@ <h1>Reductions</h1>
287287
</thead>
288288
</table>
289289

290-
<cxx-example>The following code updates each element of <code>y</code> and sets <code>s</code> ot the sum of the squares.
290+
<cxx-example>The following code updates each element of <code>y</code> and sets <code>s</code> to the sum of the squares.
291291
<pre>
292292
extern int n;
293293
extern float x[], y[], a;
@@ -330,12 +330,12 @@ <h1>Inductions</h1>
330330
<cxx-signature>template&lt;class T, class S&gt;
331331
<em>unspecified</em> induction(T&amp;&amp; var, S stride);</cxx-signature>
332332

333-
<cxx-returns>
334-
an induction object with induction value type <code>remove_cv_t&gt;remove_reference_t&gt;T&lt;&lt;</code>,
335-
initial value <code>var</code>, and (if specified) stride <code>stride</code>. If <code>T</code> is an lvalue reference
336-
to non-<code>const</code> type, then the object referenced by <code>var</code> becomes the live-out object for the
337-
induction object; otherwise there is no live-out object.
338-
</cxx-returns>
333+
<cxx-returns>
334+
an induction object with induction value type <code>remove_cv_t&lt;remove_reference_t&lt;T&gt;&gt;</code>,
335+
initial value <code>var</code>, and (if specified) stride <code>stride</code>. If <code>T</code> is an lvalue reference
336+
to non-<code>const</code> type, then the object referenced by <code>var</code> becomes the live-out object for the
337+
induction object; otherwise there is no live-out object.
338+
</cxx-returns>
339339
</cxx-function>
340340
</cxx-section>
341341

@@ -423,13 +423,13 @@ <h1>For loop</h1>
423423
The first element in the input sequence is <code>start</code>. Each subsequent element is generated by adding
424424
<code>stride</code> to the previous element, if <code>stride</code> is specified, otherwise by incrementing
425425
the previous element. <cxx-note>As described in the C++ standard, section [algorithms.general], arithmetic
426-
on non-random-access iterators is performed using advance and distance.</cxx-note> <cxx-note>The order of the
426+
on non-random-access iterators is performed using <code>advance</code> and <code>distance</code>.</cxx-note> <cxx-note>The order of the
427427
elements of the input sequence is important for determining ordinal position of an application of <em>f</em>,
428428
even though the applications themselves may be unordered.</cxx-note></p>
429429

430430
The first argument to <em>f</em> is an element from the input sequence. <cxx-note>if <code>I</code> is an
431431
iterator type, the iterators in the input sequence are not dereferenced before
432-
being passed to <em>f</em>.</cxx-note> For each member of the rest parameter pack
432+
being passed to <em>f</em>.</cxx-note> For each member of the <code>rest</code> parameter pack
433433
excluding <em>f</em>, an additional argument is passed to each application of <em>f</em> as follows:
434434

435435
<ul>
@@ -451,9 +451,9 @@ <h1>For loop</h1>
451451
Applies <em>f</em> exactly once for each element of the input sequence.
452452
</cxx-complexity>
453453

454-
<cxx-remarks>
455-
If <em>f</em> returns a result, the result is ignored.
456-
</cxx-remarks>
454+
<cxx-remarks>
455+
If <em>f</em> returns a result, the result is ignored.
456+
</cxx-remarks>
457457
</cxx-function>
458458
</cxx-section>
459459

@@ -556,7 +556,7 @@ <h1>Ordered update class</h1>
556556
</pre>
557557

558558
<p>
559-
An object of type <code>ordered_update_t<del>&gt;</del><ins>&lt;</ins>T<del>&lt;</del><ins>&gt;</ins></code> is a proxy for an object of type T
559+
An object of type <code>ordered_update_t&lt;T&gt;</code> is a proxy for an object of type T
560560
intended to be used within a parallel application of an element access function using a
561561
policy object of type <code>vector_policy</code>. Simple increments, assignments, and compound
562562
assignments to the object are forwarded to the proxied object, but are sequenced as though

exceptions.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ <h1>Header <code>&lt;experimental/exception_list&gt;</code> synopsis</h1>
66

77
namespace std::experimental {
88
inline namespace parallelism_v2 {
9+
910
class exception_list : public exception
1011
{
1112
public:
@@ -26,7 +27,7 @@ <h1>Header <code>&lt;experimental/exception_list&gt;</code> synopsis</h1>
2627
</p>
2728

2829
<p>
29-
The type <code>exception_list::iterator</code> shall fulfill the requirements of
30+
The type <code>exception_list::iterator</code> <ins>fulfills</ins><del>shall fulfill</del> the requirements of
3031
<code>ForwardIterator</code>.
3132
</p>
3233

execution_policies.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<cxx-clause id="parallel.execpol">
22
<h1>Execution policies</h1>
3+
34
<cxx-section id="parallel.execpol.synopsis">
45
<h1>Header <code>&lt;experimental/execution&gt;</code> synopsis</h1>
56

@@ -17,7 +18,7 @@ <h1>Header <code>&lt;experimental/execution&gt;</code> synopsis</h1>
1718

1819
<cxx-ref insynopsis="" to="parallel.execpol.objects"></cxx-ref>
1920
inline constexpr unsequenced_policy unseq{ <i>unspecified</i> };
20-
inline constexpr parallel_policy par{ <i>unspecified</i> };
21+
inline constexpr vector_policy vec{ <i>unspecified</i> };
2122
}
2223
}
2324
}
@@ -38,7 +39,7 @@ <h1>Unsequenced execution policy</h1>
3839

3940
<p><cxx-note>This overrides the usual guarantee from the C++ Standard, <cxx-ref in="cxx" to="intro.execution"></cxx-ref> [intro.execution] that function executions do not overlap with one another.</cxx-note></p>
4041

41-
<p>During the execution of a parallel algorithm with the <code>experimental::execution::unsequenced_policy</code> policy, if the invocation of an element access function exits via an uncaught exception, <code>terminate()</code> shall be called.</p>
42+
<p>During the execution of a parallel algorithm with the <code>experimental::execution::unsequenced_policy</code> policy, if the invocation of an element access function exits via an uncaught exception, <code>terminate()</code> will be called.</p>
4243

4344
</cxx-section>
4445

@@ -51,18 +52,18 @@ <h1>Vector execution policy</h1>
5152

5253
<p>The class <code>vector_policy</code> is an execution policy type used as a unique type to disambiguate parallel algorithm overloading and indicate that a parallel algorithm's execution may be vectorized. Additionally, such vectorization will result in an execution that respects the sequencing constraints of wavefront application ([parallel.alg.general.wavefront]). <cxx-note>The implementation thus makes stronger guarantees than for <code>unsequenced_policy</code>, for example.</cxx-note></p>
5354

54-
<p>The invocations of element access functions in parallel algorithms invoked with an execution policy of type <code>vector_policy</code> are permitted to execute in unordered fashion in the calling thread, unsequenced with respect to one another within the calling thread, subject to the sequencing constraints of wavefront application (<cxx-ref to="parallel.alg.general.wavefront"></cxx-ref>) for the last argument to <code>for_loop</code> or <code>for_loop_strided</code>.</p>
55+
<p>The invocations of element access functions in parallel algorithms invoked with an execution policy of type <code>vector_policy</code> are permitted to execute in unordered fashion in the calling thread, unsequenced with respect to one another within the calling thread, subject to the sequencing constraints of wavefront application (<cxx-ref to="parallel.alg.general.wavefront"></cxx-ref>) for the last argument to <code>for_loop</code>, <code>for_loop_n</code>, <code>for_loop_strided</code>, or <code>for_loop_strided_n</code>.</p>
5556

56-
<p>During the execution of a parallel algorithm with the <code>experimental::execution::vector_policy</code> policy, if the invocation of an element access function exits via an uncaught exception, <code>terminate()</code> shall be called.</p>
57+
<p>During the execution of a parallel algorithm with the <code>experimental::execution::vector_policy</code> policy, if the invocation of an element access function exits via an uncaught exception, <code>terminate()</code> will be called.</p>
5758

5859
</cxx-section>
5960

6061
<cxx-section id="parallel.execpol.objects">
6162
<h1>Execution policy objects</h1>
6263

6364
<pre>
64-
constexpr execution::unsequenced_policy unseq{};
65-
constexpr execution::vector_policy vec{};
65+
inline constexpr execution::unsequenced_policy unseq{};
66+
inline constexpr execution::vector_policy vec{};
6667
</pre>
6768

6869
<p>The header <code>&lt;experimental/execution&gt;</code> declares a global object associated with each type of execution policy defined by this Technical Specification.</p>

front_matter.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<cxx-titlepage stage="draft">
2-
<cxx-docnum>N4706</cxx-docnum>
2+
<cxx-docnum>N4725</cxx-docnum>
33
<cxx-project-number>19570</cxx-project-number>
4-
<time pubdate="">2017-11-22</time>
5-
<cxx-revises><a href="http://wg21.link/N4698">N4698</a></cxx-revises>
4+
<time pubdate="">2018-02-12</time>
5+
<cxx-revises><a href="http://wg21.link/N4706">N4706</a></cxx-revises>
66
<cxx-editor>
77
Jared Hoberock<br/>
88
NVIDIA Corporation<br/>

task_block.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ <h1>Header <code>&lt;experimental/task_block&gt;</code> synopsis</h1>
1212
class task_block;
1313

1414
template&lt;class F&gt;
15-
void define_task_block(F&& f);
15+
void define_task_block(F&amp;&amp; f);
1616

1717
template&lt;class f&gt;
18-
void define_task_block_restore_thread(F&& f);
18+
void define_task_block_restore_thread(F&amp;&amp; f);
1919
}
2020
}
2121
</pre>
@@ -70,12 +70,12 @@ <h1>Class <code>task_block</code></h1>
7070
~task_block();
7171

7272
public:
73-
task_block(const task_block&) = delete;
74-
task_block& operator=(const task_block&) = delete;
75-
void operator&() const = delete;
73+
task_block(const task_block&amp;) = delete;
74+
task_block&amp; operator=(const task_block&amp;) = delete;
75+
void operator&amp;() const = delete;
7676

7777
template&lt;class F&gt;
78-
void run(F&& f);
78+
void run(F&amp;&amp; f);
7979

8080
void wait();
8181
};

0 commit comments

Comments
 (0)