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
Copy file name to clipboardExpand all lines: algorithms.html
+22-9Lines changed: 22 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -7,24 +7,35 @@ <h1>In general</h1>
7
7
This clause describes components that C++ programs may use to perform operations on containers
8
8
and other sequences in parallel.
9
9
10
+
<cxx-sectionid="parallel.alg.general.user">
11
+
<h1>Requirements on user-provided function objects</h1>
12
+
13
+
<p>
14
+
<ins3>Function objects passed into parallel algorithms as objects of type <code>BinaryPredicate</code>,
15
+
<code>Compare</code>, and <code>BinaryOperation</code> shall not directly or indirectly modify
16
+
objects via their arguments.</ins3>
17
+
</p>
18
+
</cxx-section>
19
+
10
20
<cxx-sectionid="parallel.alg.general.exec">
11
21
<h1>Effect of execution policies on algorithm execution</h1>
12
22
13
23
<p>
14
24
Parallel algorithms have template parameters named <code>ExecutionPolicy</code> which describe
15
25
the manner in which the execution of these algorithms may be parallelized and the manner in
16
-
which they apply user-provided function objects.
26
+
which they apply <del3>user-provided function objects</del3><ins3>the element access functions</ins3>.
17
27
</p>
18
28
19
29
<p>
20
-
The applications of function objects in parallel algorithms invoked with an execution policy
21
-
object of type <code>sequential_execution_policy</code> execute in sequential order in the
22
-
calling thread.
30
+
The <del3>applications of function objects</del3><ins3>invocations of element access functions</ins3>
31
+
in parallel algorithms invoked with an execution policy object of type <code>sequential_execution_policy</code>
32
+
execute in sequential order in the calling thread.
23
33
</p>
24
34
25
35
<p>
26
-
The applications of function objects in parallel algorithms invoked with an execution policy
27
-
object of type <code>parallel_execution_policy</code> are permitted to execute in an unordered
36
+
The <del3>applications of function objects</del3><ins3>invocations of element access
37
+
functions</ins3> in parallel algorithms invoked with an execution policy object of
38
+
type <code>parallel_execution_policy</code> are permitted to execute in an unordered
28
39
fashion in unspecified threads, and indeterminately sequenced within each thread.
29
40
30
41
<cxx-note>
@@ -77,9 +88,11 @@ <h1>Effect of execution policies on algorithm execution</h1>
77
88
</cxx-example>
78
89
79
90
<p>
80
-
The applications of function objects in parallel algorithms invoked with an execution policy
81
-
of type <code><del2>vector_execution_policy</del2><ins2>parallel_vector_execution_policy</ins2></code> are permitted to execute in an unordered fashion
82
-
in unspecified threads, and unsequenced within each thread.
91
+
The <del3>applications of function objects</del3><ins3>invocations of element access functions</ins3>
92
+
in parallel algorithms invoked with an execution policy of type
Copy file name to clipboardExpand all lines: general.html
+47-6Lines changed: 47 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -72,11 +72,52 @@ <h1>Namespaces and headers</h1>
72
72
</pre>
73
73
74
74
<cxx-sectionid="parallel.general.defns">
75
-
<h1>Terms and definitions</h1>
76
-
77
-
<p>For the purposes of this document, the terms and definitions given in the C++ Standard and the following apply.</p>
78
-
79
-
<p>A <dfn>parallel algorithm</dfn> is a function template described by this Technical Specification declared in namespace <code>std::experimental::parallel<ins2>::v1</ins2></code> with a formal template parameter named <code>ExecutionPolicy</code>.</p>
80
-
</cxx-section>
75
+
<h1>Terms and definitions</h1>
76
+
77
+
<p>For the purposes of this document, the terms and definitions given in the C++ Standard and the following apply.</p>
78
+
79
+
<p>A <dfn>parallel algorithm</dfn> is a function template described by this Technical Specification declared in namespace <code>std::experimental::parallel<ins2>::v1</ins2></code> with a formal template parameter named <code>ExecutionPolicy</code>.</p>
80
+
81
+
82
+
<p>
83
+
<ins3>Parallel algorithms access objects indirectly accessible via their arguments by invoking the following functions:</ins3>
84
+
85
+
<ul>
86
+
<li>
87
+
<ins3>All operations of the categories of the iterators that the algorithm is instantiated with.</ins3>
88
+
</li>
89
+
90
+
<li>
91
+
<ins3>Functions on those sequence elements that are required by its specification.</ins3>
92
+
</li>
93
+
94
+
<li>
95
+
<ins3>User-provided function objects to be applied during the execution of the algorithm, if required by the specification.</ins3>
96
+
</li>
97
+
</ul>
98
+
99
+
<ins3>These functions are herein called <em>element access functions</em>.</ins3><pre>
100
+
</pre>
101
+
102
+
<cxx-example>
103
+
<ins3>The <code>sort</code> function may invoke the following element access functions:</ins3>
104
+
105
+
<ul>
106
+
<li>
107
+
<ins3>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