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: general.html
+41-2Lines changed: 41 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -71,12 +71,51 @@ <h1>Namespaces and headers</h1>
71
71
<code> #include <meow></code>
72
72
</pre>
73
73
74
-
<cxx-sectionid="parallel.general.defns">
74
+
<cxx-sectionid="parallel.general.defns">
75
75
<h1>Terms and definitions</h1>
76
76
77
77
<p>For the purposes of this document, the terms and definitions given in the C++ Standard and the following apply.</p>
78
78
79
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>
80
+
81
+
<p>
82
+
<ins>Parallel algorithms access objects indirectly accessible via their arguments by invoking the following functions:</ins>
83
+
84
+
<ul>
85
+
<li>
86
+
<ins>All operations of the categories of the iterators that the algorithm is instantiated with.</ins>
87
+
</li>
88
+
89
+
<li>
90
+
<ins>Functions on those sequence elements that are required by its specification.</ins>
91
+
</li>
92
+
93
+
<li>
94
+
<ins>User-provided function objects to be applied during the execution of the algorithm, if required by the specification.</ins>
95
+
</li>
96
+
</ul>
97
+
98
+
<ins>These functions are herein called <em>element access functions</em>.</ins><pre>
99
+
</pre>
100
+
101
+
<cxx-example>
102
+
<ins>The <code>sort</code> function may invoke the following element access functions:</ins>
103
+
104
+
<ul>
105
+
<li>
106
+
<ins>Methods of the random-access iterator of the actual template argument, as per 24.2.7, as implied by the name of the
<ppara_num="1" id="parallel.general.defns.1">For the purposes of this document, the terms and definitions given in the C++ Standard and the following apply.</p>
867
871
868
872
<ppara_num="2" id="parallel.general.defns.2">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>
873
+
874
+
<ppara_num="3" id="parallel.general.defns.3">
875
+
<ins>Parallel algorithms access objects indirectly accessible via their arguments by invoking the following functions:</ins>
876
+
877
+
</p><ul>
878
+
<li>
879
+
<ins>All operations of the categories of the iterators that the algorithm is instantiated with.</ins>
880
+
</li>
881
+
882
+
<li>
883
+
<ins>Functions on those sequence elements that are required by its specification.</ins>
884
+
</li>
885
+
886
+
<li>
887
+
<ins>User-provided function objects to be applied during the execution of the algorithm, if required by the specification.</ins>
888
+
</li>
889
+
</ul>
890
+
891
+
<ins>These functions are herein called <em>element access functions</em>.</ins><pre></pre>
892
+
893
+
<cxx-example>
894
+
895
+
<spanclass="nowrap">[ <em>Example:</em></span>
896
+
897
+
<ins>The <code>sort</code> function may invoke the following element access functions:</ins>
898
+
899
+
<ul>
900
+
<li>
901
+
<ins>Methods of the random-access iterator of the actual template argument, as per 24.2.7, as implied by the name of the
<header><spanclass="section-number">2.1</span><h1data-bookmark-label="2.1 In general">In general</h1><spanstyle="float:right"><ahref="#parallel.execpol.general">[parallel.execpol.general]</a></span></header>
891
938
892
939
893
-
<ppara_num="1" id="parallel.execpol.general.1">This clause describes classes that represent <dfn>execution policies</dfn>. An
940
+
<ppara_num="1" id="parallel.execpol.general.1">
941
+
<del>This clause describes classes that represent <dfn>execution policies</dfn>. An
894
942
<dfn>execution policy</dfn> is an object that expresses the requirements on the ordering
895
943
of functions invoked as a consequence of the invocation of a standard
896
944
algorithm. Execution policies afford standard algorithms the discretion to
897
-
execute in parallel.</p>
945
+
execute in parallel.</del>
946
+
<ins>This clause describes classes that are <dfn>execution policy</dfn> types. An object
947
+
of an execution policy type indicates to an algorithm whether it is allowed to execute
948
+
in parallel and expresses the requirements on the element access functions.</ins>
949
+
</p>
898
950
899
951
<cxx-example>
900
952
@@ -1260,9 +1312,10 @@ <h1>Contents</h1>
1260
1312
the algorithm throws a <code>std::bad_alloc</code> exception.
This clause describes components that C++ programs may use to perform operations on containers
1471
1524
and other sequences in parallel.
1472
1525
1526
+
<cxx-sectionid="parallel.alg.general.user">
1527
+
1528
+
1529
+
<section>
1530
+
<header><spanclass="section-number">4.1.1</span><h1data-bookmark-label="4.1.1 Requirements on user-provided function objects">Requirements on user-provided function objects</h1><spanstyle="float:right"><ahref="#parallel.alg.general.user">[parallel.alg.general.user]</a></span></header>
1531
+
1532
+
1533
+
<ppara_num="1" id="parallel.alg.general.user.1">
1534
+
<ins>Function objects passed into parallel algorithms as objects of type <code>BinaryPredicate</code>,
1535
+
<code>Compare</code>, and <code>BinaryOperation</code> shall not directly or indirectly modify
1536
+
objects via their arguments.</ins>
1537
+
</p>
1538
+
1539
+
</section>
1540
+
</cxx-section>
1541
+
1473
1542
<cxx-sectionid="parallel.alg.general.exec">
1474
1543
1475
1544
1476
1545
<section>
1477
-
<header><spanclass="section-number">4.1.1</span><h1data-bookmark-label="4.1.1 Effect of execution policies on algorithm execution">Effect of execution policies on algorithm execution</h1><spanstyle="float:right"><ahref="#parallel.alg.general.exec">[parallel.alg.general.exec]</a></span></header>
1546
+
<header><spanclass="section-number">4.1.2</span><h1data-bookmark-label="4.1.2 Effect of execution policies on algorithm execution">Effect of execution policies on algorithm execution</h1><spanstyle="float:right"><ahref="#parallel.alg.general.exec">[parallel.alg.general.exec]</a></span></header>
1478
1547
1479
1548
1480
1549
1481
1550
<ppara_num="1" id="parallel.alg.general.exec.1">
1482
1551
Parallel algorithms have template parameters named <code>ExecutionPolicy</code> which describe
1483
1552
the manner in which the execution of these algorithms may be parallelized and the manner in
1484
-
which they apply user-provided function objects.
1553
+
which they apply <del>user-provided function objects</del><ins>the element access functions</ins>.
1485
1554
</p>
1486
1555
1487
1556
<ppara_num="2" id="parallel.alg.general.exec.2">
1488
-
The applications of function objects in parallel algorithms invoked with an execution policy
1489
-
object of type <code>sequential_execution_policy</code> execute in sequential order in the
1490
-
calling thread.
1557
+
The <del>applications of function objects</del><ins>invocations of element access functions</ins>
1558
+
in parallel algorithms invoked with an execution policy object of type
1559
+
<code>sequential_execution_policy</code> execute in sequential order in the calling thread.
1491
1560
</p>
1492
1561
1493
1562
<ppara_num="3" id="parallel.alg.general.exec.3">
1494
-
The applications of function objects in parallel algorithms invoked with an execution policy
1495
-
object of type <code>parallel_execution_policy</code> are permitted to execute in an unordered
1496
-
fashion in unspecified threads, and indeterminately sequenced within each thread.
1563
+
The <del>applications of function objects</del><ins>invocations of element access functions</ins>
1564
+
in parallel algorithms invoked with an execution policy object of type
1565
+
<code>parallel_execution_policy</code> are permitted to execute in an unordered fashion in
1566
+
unspecified threads, and indeterminately sequenced within each thread.
0 commit comments