Skip to content

Commit 1471897

Browse files
committed
Insert colored diffs to reflect the changes since the post-Issaquah mailing.
1 parent 76f01dc commit 1471897

File tree

2 files changed

+91
-59
lines changed

2 files changed

+91
-59
lines changed

algorithms.html

Lines changed: 56 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ <h1>Effect of execution policies on algorithm execution</h1>
133133

134134
<p>
135135
Algorithms invoked with an execution policy object of type <code>execution_policy</code>
136-
execute internally as if invoked with the contained execution policy object.
136+
execute internally as if invoked with <del>instances of type <code>sequential_execution_policy</code>,
137+
<code>parallel_execution_policy</code>, or an implementation-defined execution policy type depending
138+
on the dynamic value of the <code>execution_policy</code> object.</del>
139+
<ins>the contained execution policy object.</ins>
137140
</p>
138141

139142
<p>
@@ -148,8 +151,10 @@ <h1><code>ExecutionPolicy</code> algorithm overloads</h1>
148151
<p>
149152
Parallel algorithms coexist alongside their sequential counterparts as overloads
150153
distinguished by a formal template parameter named <code>ExecutionPolicy</code>. This
151-
is the first template parameter and corresponds to the parallel algorithm's first function
152-
parameter, whose type is <code>ExecutionPolicy&amp;&amp;</code>.
154+
<del>template parameter corresponds to the parallel algorithm's first function parameter, whose
155+
type is <code>ExecutionPolicy</code></del>
156+
<ins>is the first template parameter and corresponds to the parallel algorithm's first function
157+
parameter, whose type is <code>ExecutionPolicy&amp;&amp;</code></ins>.
153158
</p>
154159

155160
<p>
@@ -158,16 +163,18 @@ <h1><code>ExecutionPolicy</code> algorithm overloads</h1>
158163
</p>
159164

160165
<p>
161-
Parallel algorithms shall not participate in overload resolution unless
162-
<code>is_execution_policy&lt;ExecutionPolicy&gt;::value</code> is <code>true</code>.
166+
Parallel algorithms
167+
<del>have the requirement <code>is_execution_policy&lt;ExecutionPolicy&gt;::value</code> is <code>true</code></del>
168+
<ins>shall not participate in overload resolution unless
169+
<code>is_execution_policy&lt;ExecutionPolicy&gt;::value</code> is <code>true</code></ins>.
163170
</p>
164171

165172
<p>The algorithms listed in <cxx-ref to="tab.parallel.algorithms"></cxx-ref> shall have <code>ExecutionPolicy</code> overloads.</p>
166173

167174
<table is="cxx-table" id="tab.parallel.algorithms" class="list">
168175
<caption>Table of parallel algorithms</caption>
169176
<tr>
170-
<td>adjacent_difference</td>
177+
<td><ins>adjacent_difference</ins></td>
171178
<td>adjacent_find</td>
172179
<td>all_of</td>
173180
<td>any_of</td>
@@ -203,7 +210,7 @@ <h1><code>ExecutionPolicy</code> algorithm overloads</h1>
203210
<td>inclusive_scan</td>
204211
</tr>
205212
<tr>
206-
<td>inner_product</td>
213+
<td><ins>inner_product</ins></td>
207214
<td>inplace_merge</td>
208215
<td>is_heap</td>
209216
<td>is_heap_until</td>
@@ -378,9 +385,11 @@ <h1>For each</h1>
378385
its <code>Function</code> parameter, since parallelization may not permit efficient state
379386
accumulation.
380387

381-
Unlike its sequential form, the parallel overload of <code>for_each</code> requires
382-
<code>Function</code> to meet the requirements of <code>CopyConstructible</code>, but not
383-
<code>MoveConstructible</code>.
388+
<ins>
389+
Unlike its sequential form, the parallel overload of <code>for_each</code> requires
390+
<code>Function</code> to meet the requirements of <code>CopyConstructible</code>, but not
391+
<code>MoveConstructible</code>.
392+
</ins>
384393
</cxx-notes>
385394
</cxx-function>
386395

@@ -410,47 +419,49 @@ <h1>For each</h1>
410419
</cxx-effects>
411420

412421
<cxx-returns>
413-
<code>first + n</code> for non-negative values of <code>n</code> and <code>first</code> for negative values.
422+
<code>first + n</code><ins> for non-negative values of <code>n</code> and <code>first</code> for negative values</ins>.
414423
</cxx-returns>
415424

416425
<cxx-remarks>
417426
If <code>f</code> returns a result, the result is ignored.
418427
</cxx-remarks>
419428
</cxx-function>
420429

421-
<cxx-function>
422-
<cxx-signature>
423-
template&lt;class ExecutionPolicy,
424-
class InputIterator, class Size, class Function&gt;
425-
InputIterator for_each_n(ExecutionPolicy &amp;&amp; exec,
426-
InputIterator first, Size n,
427-
Function f);
428-
</cxx-signature>
429-
430-
<cxx-effects>
431-
Applies <code>f</code> to the result of dereferencing every iterator in the range
432-
<code>[first,first + n)</code>, starting from <code>first</code> and proceeding to <code>first + n - 1</code>.
433-
434-
<cxx-note>
435-
If the type of <code>first</code> satisfies the requirements of a mutable iterator,
436-
<code>f</code> may apply nonconstant functions through the dereferenced iterator.
437-
</cxx-note>
438-
</cxx-effects>
439-
440-
<cxx-returns>
441-
<code>first + n</code> for non-negative values of <code>n</code> and <code>first</code> for negative values.
442-
</cxx-returns>
443-
444-
<cxx-remarks>
445-
If <code>f</code> returns a result, the result is ignored.
446-
</cxx-remarks>
447-
448-
<cxx-notes>
449-
Unlike its sequential form, the parallel overload of <code>for_each_n</code> requires
450-
<code>Function</code> to meet the requirements of <code>CopyConstructible</code>, but not
451-
<code>MoveConstructible</code>.
452-
</cxx-notes>
453-
</cxx-function>
430+
<ins>
431+
<cxx-function>
432+
<cxx-signature>
433+
template&lt;class ExecutionPolicy,
434+
class InputIterator, class Size, class Function&gt;
435+
InputIterator for_each_n(ExecutionPolicy &amp;&amp; exec,
436+
InputIterator first, Size n,
437+
Function f);
438+
</cxx-signature>
439+
440+
<cxx-effects>
441+
Applies <code>f</code> to the result of dereferencing every iterator in the range
442+
<code>[first,first + n)</code>, starting from <code>first</code> and proceeding to <code>first + n - 1</code>.
443+
444+
<cxx-note>
445+
If the type of <code>first</code> satisfies the requirements of a mutable iterator,
446+
<code>f</code> may apply nonconstant functions through the dereferenced iterator.
447+
</cxx-note>
448+
</cxx-effects>
449+
450+
<cxx-returns>
451+
<code>first + n</code><ins> for non-negative values of <code>n</code> and <code>first</code> for negative values.
452+
</cxx-returns>
453+
454+
<cxx-remarks>
455+
If <code>f</code> returns a result, the result is ignored.
456+
</cxx-remarks>
457+
458+
<cxx-notes>
459+
Unlike its sequential form, the parallel overload of <code>for_each_n</code> requires
460+
<code>Function</code> to meet the requirements of <code>CopyConstructible</code>, but not
461+
<code>MoveConstructible</code>.
462+
</cxx-notes>
463+
</cxx-function>
464+
</ins>
454465
</cxx-section>
455466

456467
<cxx-section id="parallel.alg.novel.numeric.synop">
@@ -587,7 +598,7 @@ <h1>Reduce</h1>
587598

588599
<cxx-notes>
589600
The primary difference between <code>reduce</code> and <code>accumulate</code> is that the behavior
590-
of <code>reduce</code> may be non-deterministic for non-associative or non-commutative <code>binary_op</code>.
601+
of <code>reduce</code> may be non-deterministic for non-associative or non-commutative <del><code>operator+</code></del><ins><code>binary_op</code></ins>.
591602
</cxx-notes>
592603
</cxx-function>
593604
</cxx-section>

execution_policies.html

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ <h1>Dynamic execution policy</h1>
172172
<cxx-example>
173173
<pre>std::vector&lt;float&gt; sort_me = ...
174174

175-
using namespace std::experimental::parallel;
176-
execution_policy exec = seq;
175+
<ins>using namespace std::experimental::parallel;</ins>
176+
<del><code>std::</code></del>execution_policy exec = <del><code>std::</code></del>seq;
177177

178178
if(sort_me.size() &gt; threshold)
179179
{
@@ -194,10 +194,17 @@ <h1><code>execution_policy</code> construct/assign</h1>
194194

195195
<cxx-effects>Constructs an <code>execution_policy</code> object with a copy of <code>exec</code>'s state.</cxx-effects>
196196

197-
<cxx-remarks>
198-
This constructor shall not participate in overload resolution unless
199-
<code>is_execution_policy&lt;T&gt;::value</code> is <code>true</code>.
200-
</cxx-remarks>
197+
<del>
198+
<cxx-requires>
199+
<code>is_execution_policy&lt;T&gt;::value</code> is <code>true</code>.
200+
</cxx-requires>
201+
</del>
202+
<ins>
203+
<cxx-remarks>
204+
This constructor shall not participate in overload resolution unless
205+
<code>is_execution_policy&lt;T&gt;::value</code> is <code>true</code>.
206+
</cxx-remarks>
207+
</ins>
201208
</cxx-function>
202209

203210
<cxx-function>
@@ -207,10 +214,17 @@ <h1><code>execution_policy</code> construct/assign</h1>
207214

208215
<cxx-returns><code>*this</code>.
209216

210-
<cxx-remarks>
211-
This operator shall not partipate in overload resolution unless
212-
<code>is_execution_policy&lt;T&gt;::value</code> is <code>true</code>.
213-
</cxx-remarks>
217+
<del>
218+
<cxx-requires>
219+
<code>is_execution_policy&lt;T&gt;::value</code> is <code>true</code>.
220+
</cxx-requires>
221+
</del>
222+
<ins>
223+
<cxx-remarks>
224+
This operator shall not partipate in overload resolution unless
225+
<code>is_execution_policy&lt;T&gt;::value</code> is <code>true</code>.
226+
</cxx-remarks>
227+
</ins>
214228
</cxx-function>
215229
</cxx-section>
216230

@@ -233,10 +247,17 @@ <h1><code>execution_policy</code> object access</h1>
233247

234248
<cxx-returns>If <code>target_type() == typeid(T)</code>, a pointer to the stored execution policy object; otherwise a null pointer.</cxx-returns>
235249

236-
<cxx-remarks>
237-
This function shall not participate in overload resolution unless
238-
<code>is_execution_policy&lt;T&gt;</code> is <code>true</code>.
239-
</cxx-remarks>
250+
<del>
251+
<cxx-requires>
252+
<code>is_execution_policy&lt;T&gt;::value</code> is <code>true</code>.
253+
</cxx-requires>
254+
</del>
255+
<ins>
256+
<cxx-remarks>
257+
This function shall not participate in overload resolution unless
258+
<code>is_execution_policy&lt;T&gt;</code> is <code>true</code>.
259+
</cxx-remarks>
260+
</ins>
240261
</cxx-function>
241262

242263
</cxx-section>

0 commit comments

Comments
 (0)