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
Merge Artur's changes due to feedback from SG1 & LWG
Revert change to inclusive_scan's 2nd signature
Add is_execution_policy_v variable template
Use the correct phrasing for is_execution_policy's specification
Add exception_list::what()
@@ -78,21 +78,25 @@ <h1>Effect of execution policies on algorithm execution</h1>
78
78
79
79
<p>
80
80
The applications of function objects in parallel algorithms invoked with an execution policy
81
-
of type <code>vector_execution_policy</code> are permitted to execute in an unordered fashion
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
82
in unspecified threads, and unsequenced within each thread.
83
-
83
+
<ins2>
84
+
<cxx-note>
85
+
This means that multiple function-object invocations may be interleaved on a single thread.
86
+
</cxx-note>
87
+
</ins2>
84
88
<cxx-note>
85
-
As a consequence, function objects governed by the <code>vector_execution_policy</code>
89
+
As a consequence, function objects governed by the <code><del2>vector_execution_policy</del2><ins2>parallel_vector_execution_policy</ins2></code>
86
90
policy must not synchronize with each other. Specifically, they must not acquire locks.
87
91
</cxx-note>
88
92
</p>
89
93
90
94
<cxx-example><pre>
91
-
using namespace std::experimental::parallel;
92
-
int x;
95
+
using namespace std::experimental::parallel<ins2>_v1</ins2>;
Assigns through each iterator <code>i</code> in <code>[result,result + (last - first))</code> the
653
-
value of <code><em>GENERALIZED_NONCOMMUTATIVE_SUM</em>(binary_op, init, *first, ..., (*first + i - result - 1))</code>.
669
+
value of <code><em>GENERALIZED_NONCOMMUTATIVE_SUM</em>(binary_op, init, *first, ..., <del2>(*first + i - result - 1)</del2><ins2>*(first + (i - result) - 1)</ins2>)</code>.
The primary difference between <code>exclusive_scan</code> and <code>inclusive_scan</code> is that
721
+
The <del2>primary</del2> difference between <code>exclusive_scan</code> and <code>inclusive_scan</code> is that
706
722
<code>exclusive_scan</code> excludes the <code>i</code>th input element from the <code>i</code>th sum.
707
723
If the <code>operator+</code> function is not mathematically associative, the behavior of
708
724
<code>inclusive_scan</code> may be non-deterministic.
@@ -728,8 +744,8 @@ <h1>Inclusive scan</h1>
728
744
729
745
<cxx-effects>
730
746
Assigns through each iterator <code>i</code> in <code>[result,result + (last - first))</code> the value of
731
-
<code><em>GENERALIZED_NONCOMMUTATIVE_SUM</em>(binary_op, *first, ..., (*first + i - result))</code> or
732
-
<code><em>GENERALIZED_NONCOMMUTATIVE_SUM</em>(binary_op, init, *first, ..., (*first + i - result))</code>
747
+
<code><em>GENERALIZED_NONCOMMUTATIVE_SUM</em>(binary_op, *first, ..., <del2>(*first + i - result)</del2><ins2>*(first + (i - result))</ins2>)</code> or
748
+
<code><em>GENERALIZED_NONCOMMUTATIVE_SUM</em>(binary_op, init, *first, ..., <del2>(*first + i - result)</del2><ins2>*(first + (i - result))</ins2>)</code>
733
749
if <code>init</code> is provided.
734
750
</cxx-effects>
735
751
@@ -747,7 +763,7 @@ <h1>Inclusive scan</h1>
747
763
</cxx-complexity>
748
764
749
765
<cxx-notes>
750
-
The primary difference between <code>exclusive_scan</code> and <code>inclusive_scan</code> is that
766
+
The <del2>primary</del2> difference between <code>exclusive_scan</code> and <code>inclusive_scan</code> is that
751
767
<code>inclusive_scan</code> includes the <code>i</code>th input element in the <code>i</code>th sum.
752
768
If <code>binary_op</code> is not mathematically associative, the behavior of
753
769
<code>inclusive_scan</code> may be non-deterministic.
0 commit comments