You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
N4725 is the proposed working draft of Parallelism TS Version 2. It contains editorial changes to the Parallelism TS.
12
+
NXXXX is the proposed working draft of Parallelism TS Version 2. It contains normative changes as directed by the ISO C++ Standards Committee at the 2018 Jacksonville meeting and editorial changes to the Parallelism TS.
13
13
14
-
N4725 updates the previous draft, N4706, published in the post-Toronto mailing.
14
+
NXXXX updates the previous draft, N4725, published in the pre-Jacksonville mailing.
15
+
16
+
NYYYY is document NXXXX reformatted as a PDTS draft document.
17
+
18
+
## Normative Changes
19
+
20
+
* Apply the proposed wording in [P0214R9](https://wg21.link/P0214R9) (Data-Parallel Vector Types & Operations).
15
21
16
22
# Acknowledgements
17
23
18
-
Thanks to Pablo Halpern and Matthias Kretz for suggesting editorial changes.
24
+
Thanks to Alisdair Meredith for suggesting editorial changes.
<cxx-requires>T shall meet the requirements of <code>CopyConstructible</code> and <code>MoveAssignable</code>.></cxx-requires>
240
+
<cxx-requires>T shall meet the requirements of <code>CopyConstructible</code> and <code>MoveAssignable</code>.</cxx-requires>
242
241
243
242
<cxx-returns>a reduction object of unspecified type having reduction value type <code>T</code>, reduction identity and combiner operation as specified in table <cxx-refto="reduction-identities-and-combiner-operations"></cxx-ref> and using the object referenced by <code>var</code> as its live-out object.</cxx-returns>
244
243
@@ -288,7 +287,7 @@ <h1>Reductions</h1>
288
287
</thead>
289
288
</table>
290
289
291
-
<cxx-example>The following code updates each element of <code>y</code> and sets <code>s</code><ins>to</ins><del>ot</del> 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.
292
291
<pre>
293
292
extern int n;
294
293
extern float x[], y[], a;
@@ -302,7 +301,6 @@ <h1>Reductions</h1>
302
301
);
303
302
</pre>
304
303
</cxx-example>
305
-
</ins>
306
304
</cxx-function>
307
305
</cxx-section>
308
306
@@ -333,7 +331,7 @@ <h1>Inductions</h1>
333
331
<em>unspecified</em> induction(T&& var, S stride);</cxx-signature>
334
332
335
333
<cxx-returns>
336
-
an induction object with induction value type <code>remove_cv_t<ins><</ins><del>></del>remove_reference_t<ins><</ins><del>></del>T<ins>>></ins><del><<</del></code>,
334
+
an induction object with induction value type <code>remove_cv_t<remove_reference_t<T>></code>,
337
335
initial value <code>var</code>, and (if specified) stride <code>stride</code>. If <code>T</code> is an lvalue reference
338
336
to non-<code>const</code> type, then the object referenced by <code>var</code> becomes the live-out object for the
339
337
induction object; otherwise there is no live-out object.
@@ -425,13 +423,13 @@ <h1>For loop</h1>
425
423
The first element in the input sequence is <code>start</code>. Each subsequent element is generated by adding
426
424
<code>stride</code> to the previous element, if <code>stride</code> is specified, otherwise by incrementing
427
425
the previous element. <cxx-note>As described in the C++ standard, section [algorithms.general], arithmetic
428
-
on non-random-access iterators is performed using <ins><code>advance</code></ins><del>advance</del> and <ins><code>distance</code></ins><del>distance</del>.</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
429
427
elements of the input sequence is important for determining ordinal position of an application of <em>f</em>,
430
428
even though the applications themselves may be unordered.</cxx-note></p>
431
429
432
430
The first argument to <em>f</em> is an element from the input sequence. <cxx-note>if <code>I</code> is an
433
431
iterator type, the iterators in the input sequence are not dereferenced before
434
-
being passed to <em>f</em>.</cxx-note> For each member of the <ins><code>rest</code></ins><del>rest</del> parameter pack
432
+
being passed to <em>f</em>.</cxx-note> For each member of the <code>rest</code> parameter pack
435
433
excluding <em>f</em>, an additional argument is passed to each application of <em>f</em> as follows:
436
434
437
435
<ul>
@@ -478,7 +476,7 @@ <h1>No vec</h1>
478
476
<cxx-returns>
479
477
the result of <code>f</code>.
480
478
</cxx-returns>
481
-
479
+
482
480
<cxx-notes>
483
481
If <code>f</code> exits via an exception, then <code>terminate</code> will be called, consistent
484
482
with all other potentially-throwing operations invoked with <code>vector_policy</code> execution.
<p><cxx-note>This overrides the usual guarantee from the C++ Standard, <cxx-refin="cxx" to="intro.execution"></cxx-ref> [intro.execution] that function executions do not overlap with one another.</cxx-note></p>
41
41
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><ins>will</ins><del>shall</del> 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>
<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>
54
54
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-refto="parallel.alg.general.wavefront"></cxx-ref>) for the last argument to <code>for_loop</code><ins>, for_loop_n,</ins><del>or </del><code>for_loop_strided</code><ins>, or <code>for_loop_strided_n</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-refto="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>
56
56
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><ins>will</ins><del>shall</del> 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>
<p>The header <code><experimental/execution></code> declares a global object associated with each type of execution policy defined by this Technical Specification.</p>
0 commit comments