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
N4407 is the latest Parallelism TS Working Draft. It contains editorial changes to the Parallelism TS to address whitespace and other formatting issues.
12
+
N4505 is the latest Parallelism TS Working Draft. It contains editorial and technical changes to the Parallelism TS to apply the following revisions:
13
13
14
-
N4407 updates the previous draft, N4352, published in the midterm mailing.
14
+
* N4274 - Relaxing Packing Rules for Exceptions Thrown by Parallel Algorithms - Proposed Wording (Revision 1)
15
+
* Feature test macro for the Parallelism TS
15
16
16
-
N4409 is document N4407 reformatted as a TS document. It updates N4354, which was published in the midterm mailing.
17
+
N4505 updates the previous draft, N4407, published in the pre-Lenexa mailing.
18
+
19
+
N4507 is document N4505 reformatted as a TS document. It updates N4409, which was published in the pre-Lenexa mailing.
20
+
21
+
## Technical Changes
22
+
23
+
* Applied N4274, which relaxes the exception packaging rules for exceptions thrown by parallel algorithms. Additionally, changed instances of "terminates with (exception)" phrasing to "exits via (exception)", as directed by the Library Working Group.
24
+
25
+
* Introduced the feature test macro `__cpp_lib_experimental_parallel_algorithm` for the functionality of the Parallelism TS as directed by SG1.
17
26
18
27
## Editorial Changes
19
28
20
-
Eliminated spurious whitespace and paragraph numbers and manually broke code lines which were spilling into the margin.
29
+
* Promoted subsection 1.3.1, which was incorrectly grouped under section 1.3, to section 1.4.
If the execution policy object is of type <code>sequential_execution_policy</code> or
22
-
<code>parallel_execution_policy</code>, the execution of the algorithm terminates with an
23
-
<code>exception_list</code> exception. All uncaught exceptions thrown during
24
-
the invocations of element access functionsshall be contained in the
25
-
<code>exception_list</code>.<pre>
22
+
<code>parallel_execution_policy</code>, the execution of the algorithm <ins>exits via</ins><del>terminates with</del> an
23
+
<del><code>exception_list</code></del> exception. <ins>The exception shall be an <code>exception_list</code> containing all</ins><del>All</del> uncaught exceptions thrown during
24
+
the invocations of element access functions<ins>, or optionally the uncaught exception if there was only one</ins><del>shall be contained in the
25
+
<code>exception_list</code></del>.<pre>
26
26
</pre>
27
27
28
28
<cxx-note>
29
-
For example, the number of invocations of the user-provided function object in
30
-
<code>for_each</code> is unspecified. When <code>for_each</code> is executed sequentially,
31
-
only one exception will be contained in the <code>exception_list</code> object.
29
+
For example, <del>the number of invocations of the user-provided function object in
30
+
<code>for_each</code> is unspecified. W</del><ins>w</ins>hen <code>for_each</code> is executed sequentially,
31
+
<ins>if an invocation of the user-provided function object throws an exception, <code>for_each</code> can exit via the uncaught exception, or throw an <code>exception_list</code> containing the original exception.
32
+
<del>only one exception will be contained in the <code>exception_list</code> object.</del>
32
33
</cxx-note><pre>
33
34
</pre>
34
35
35
36
<cxx-note>
36
37
These guarantees imply that, unless the algorithm has failed to allocate memory and
37
-
terminated with <code>std::bad_alloc</code>, all exceptions thrown during the execution of
38
+
<ins>exits via</ins><del>terminated with</del><code>std::bad_alloc</code>, all exceptions thrown during the execution of
38
39
the algorithm are communicated to the caller. It is unspecified whether an algorithm implementation will "forge ahead" after
39
40
encountering and capturing a user exception.
40
41
</cxx-note><pre>
41
42
</pre>
42
43
<cxx-note>
43
-
The algorithm may terminate with the <code>std::bad_alloc</code> exception even if one or more
44
-
user-provided function objects have terminated with an exception. For example, this can happen when an algorithm fails to allocate memory while
44
+
The algorithm may <ins>exit via</ins><del>terminate with</del> the <code>std::bad_alloc</code> exception even if one or more
45
+
user-provided function objects have <ins>exited via</ins><del>terminated with</del> an exception. For example, this can happen when an algorithm fails to allocate memory while
45
46
creating or adding elements to the <code>exception_list</code> object.
Copy file name to clipboardexpand all lines: general.html
+69-31
Original file line number
Diff line number
Diff line change
@@ -70,51 +70,89 @@ <h1>Namespaces and headers</h1>
70
70
<pre>
71
71
<code> #include <meow></code>
72
72
</pre>
73
+
</cxx-section>
73
74
74
-
<cxx-sectionid="parallel.general.defns">
75
-
<h1>Terms and definitions</h1>
75
+
<cxx-sectionid="parallel.general.defns">
76
+
<h1>Terms and definitions</h1>
77
+
78
+
<p>For the purposes of this document, the terms and definitions given in the C++ Standard and the following apply.</p>
79
+
80
+
<p>A <dfn>parallel algorithm</dfn> is a function template described by this Technical Specification declared in namespace <code>std::experimental::parallel::v1</code> with a formal template parameter named <code>ExecutionPolicy</code>.</p>
76
81
77
-
<p>For the purposes of this document, the terms and definitions given in the C++ Standard and the following apply.</p>
82
+
<p>
83
+
Parallel algorithms access objects indirectly accessible via their arguments by invoking the following functions:
78
84
79
-
<p>A <dfn>parallel algorithm</dfn> is a function template described by this Technical Specification declared in namespace <code>std::experimental::parallel::v1</code> with a formal template parameter named <code>ExecutionPolicy</code>.</p>
85
+
<ul>
86
+
<li>
87
+
All operations of the categories of the iterators that the algorithm is instantiated with.
88
+
</li>
80
89
81
-
<p>
82
-
Parallel algorithms access objects indirectly accessible via their arguments by invoking the following functions:
90
+
<li>
91
+
Functions on those sequence elements that are required by its specification.
92
+
</li>
93
+
94
+
<li>
95
+
User-provided function objects to be applied during the execution of the algorithm, if required by the specification.
96
+
</li>
97
+
98
+
<ins><li>
99
+
Operations on those function objects required by the specification.
100
+
101
+
<cxx-note>
102
+
See clause 25.1 of <em>C++ Standard Algorithms Library</em>.
103
+
</cxx-note>
104
+
</li></ins>
105
+
</ul>
106
+
107
+
These functions are herein called <em>element access functions</em>.
108
+
109
+
<cxx-example>
110
+
The <code>sort</code> function may invoke the following element access functions:
83
111
84
112
<ul>
85
113
<li>
86
-
All operations of the categories of the iterators that the algorithm is instantiated with.
114
+
Methods of the random-access iterator of the actual template argument, as per 24.2.7, as implied by the name of the
0 commit comments