Skip to content

Commit 1b741ef

Browse files
committed
Flatten diffs in [parallel.alg.reductions]
1 parent a3a2db7 commit 1b741ef

File tree

1 file changed

+50
-62
lines changed

1 file changed

+50
-62
lines changed

algorithms.html

Lines changed: 50 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,8 @@ <h1>Header <code>&lt;experimental/algorithm&gt;</code> synopsis</h1>
186186
</cxx-section>
187187

188188
<cxx-section id="parallel.alg.reductions">
189-
<h1><ins>Reductions</ins></h1>
189+
<h1>Reductions</h1>
190190

191-
<ins>
192191
<p>
193192
Each of the function templates in this subclause ([parallel.alg.reductions]) returns a <em>reduction object</em>
194193
of unspecified type having a <em>reduction value type</em> and encapsulating a <em>reduction identity</em> value for the reduction, a
@@ -212,93 +211,83 @@ <h1><ins>Reductions</ins></h1>
212211
to commutative operations closely related to the combiner operation. For example if the combiner is <code>plus&lt;T&gt;</code>, incrementing
213212
the accumulator would be consistent with the combiner but doubling it or assigning to it would not.</cxx-note>
214213
</p>
215-
</ins>
216214

217215
<cxx-function>
218-
<cxx-signature><ins>template&lt;class T, class BinaryOperation&gt;
219-
<em>unspecified</em> reduction(T&amp; var, const T&amp; identity, BinaryOperation combiner);</ins></cxx-signature>
216+
<cxx-signature>template&lt;class T, class BinaryOperation&gt;
217+
<em>unspecified</em> reduction(T&amp; var, const T&amp; identity, BinaryOperation combiner);</cxx-signature>
220218

221-
<ins>
222-
<cxx-requires><ins>T shall meet the requirements of <code>CopyConstructible</code> and <code>MoveAssignable</code>. The expression <code>var = combiner(var, var)</code> shall be well-formed.</ins></cxx-requires>
223-
</ins>
219+
<cxx-requires>T shall meet the requirements of <code>CopyConstructible</code> and <code>MoveAssignable</code>. The expression <code>var = combiner(var, var)</code> shall be well-formed.</cxx-requires>
224220

225-
<ins>
226-
<cxx-returns><ins>a reduction object of unspecified type having reduction value type <code>T</code>, reduction identity <code>identity</code>, combiner function object <code>combiner</code>, and using the object referenced by <code>var</code> as its live-out object.</ins></cxx-returns>
227-
</ins>
221+
<cxx-returns>a reduction object of unspecified type having reduction value type <code>T</code>, reduction identity <code>identity</code>, combiner function object <code>combiner</code>, and using the object referenced by <code>var</code> as its live-out object.</cxx-returns>
228222
</cxx-function>
229223

230224
<cxx-function>
231-
<cxx-signature><ins>template&lt;class T&gt;
232-
<em>unspecified</em> reduction_plus(T&amp; var);</ins></cxx-signature>
233-
<cxx-signature><ins>template&lt;class T&gt;
234-
<em>unspecified</em> reduction_multiplies(T&amp; var);</ins></cxx-signature>
235-
<cxx-signature><ins>template&lt;class T&gt;
236-
<em>unspecified</em> reduction_bit_and(T&amp; var);</ins></cxx-signature>
237-
<cxx-signature><ins>template&lt;class T&gt;
238-
<em>unspecified</em> reduction_bit_or(T&amp; var);</ins></cxx-signature>
239-
<cxx-signature><ins>template&lt;class T&gt;
240-
<em>unspecified</em> reduction_bit_xor(T&amp; var);</ins></cxx-signature>
241-
<cxx-signature><ins>template&lt;class T&gt;
242-
<em>unspecified</em> reduction_min(T&amp; var);</ins></cxx-signature>
243-
<cxx-signature><ins>template&lt;class T&gt;
244-
<em>unspecified</em> reduction_max(T&amp; var);</ins></cxx-signature>
245-
246-
<ins>
247-
<cxx-requires><ins>T shall meet the requirements of <code>CopyConstructible</code> and <code>MoveAssignable</code>.</ins></cxx-requires>
248-
</ins>
249-
250-
<ins>
251-
<cxx-returns><ins>a reduction object of unspecified type having reduction value type <code>T</code>, reduction identity and combiner operation as specified in table <cxx-ref to="reduction-identities-and-combiner-operations"></cxx-ref> and using the object referenced by <code>var</code> as its live-out object.</ins></cxx-returns>
252-
</ins>
225+
<cxx-signature>template&lt;class T&gt;
226+
<em>unspecified</em> reduction_plus(T&amp; var);</cxx-signature>
227+
<cxx-signature>template&lt;class T&gt;
228+
<em>unspecified</em> reduction_multiplies(T&amp; var);</cxx-signature>
229+
<cxx-signature>template&lt;class T&gt;
230+
<em>unspecified</em> reduction_bit_and(T&amp; var);</cxx-signature>
231+
<cxx-signature>template&lt;class T&gt;
232+
<em>unspecified</em> reduction_bit_or(T&amp; var);</cxx-signature>
233+
<cxx-signature>template&lt;class T&gt;
234+
<em>unspecified</em> reduction_bit_xor(T&amp; var);</cxx-signature>
235+
<cxx-signature>template&lt;class T&gt;
236+
<em>unspecified</em> reduction_min(T&amp; var);</cxx-signature>
237+
<cxx-signature>template&lt;class T&gt;
238+
<em>unspecified</em> reduction_max(T&amp; var);</cxx-signature>
239+
240+
<cxx-requires>T shall meet the requirements of <code>CopyConstructible</code> and <code>MoveAssignable</code>.</cxx-requires>
241+
242+
<cxx-returns>a reduction object of unspecified type having reduction value type <code>T</code>, reduction identity and combiner operation as specified in table <cxx-ref to="reduction-identities-and-combiner-operations"></cxx-ref> and using the object referenced by <code>var</code> as its live-out object.</cxx-returns>
253243

254244
<table is="cxx-table" class="column-rules" id=reduction-identities-and-combiner-operations>
255-
<caption><ins>Reduction identities and combiner operations</ins></caption>
245+
<caption>Reduction identities and combiner operations</caption>
256246
<thead>
257247
<tr>
258-
<th><ins>Function</ins></th>
259-
<th><ins>Reduction Identity</ins></th>
260-
<th><ins>Combiner Operation</ins></th>
248+
<th>Function</th>
249+
<th>Reduction Identity</th>
250+
<th>Combiner Operation</th>
261251
</tr>
262252
<tr>
263-
<th><ins><code>reduction_plus</code></ins></th>
264-
<th><ins><code>T()</code></ins></th>
265-
<th><ins><code>x + y</code></ins></th>
253+
<th><code>reduction_plus</code></th>
254+
<th><code>T()</code></th>
255+
<th><code>x + y</code></th>
266256
</tr>
267257
<tr>
268-
<th><ins><code>reduction_multiplies</code></ins></th>
269-
<th><ins><code>T(1)</code></ins></th>
270-
<th><ins><code>x * y</code></ins></th>
258+
<th><code>reduction_multiplies</code></th>
259+
<th><code>T(1)</code></th>
260+
<th><code>x * y</code></th>
271261
</tr>
272262
<tr>
273-
<th><ins><code>reduction_bit_and</code></ins></th>
274-
<th><ins><code>(~T())</code></ins></th>
275-
<th><ins><code>X &amp; y</code></ins></th>
263+
<th><code>reduction_bit_and</code></th>
264+
<th><code>(~T())</code></th>
265+
<th><code>X &amp; y</code></th>
276266
</tr>
277267
<tr>
278-
<th><ins><code>reduction_bit_or</code></ins></th>
279-
<th><ins><code>T()</code></ins></th>
280-
<th><ins><code>x | y</code></ins></th>
268+
<th><code>reduction_bit_or</code></th>
269+
<th><code>T()</code></th>
270+
<th><code>x | y</code></th>
281271
</tr>
282272
<tr>
283-
<th><ins><code>reduction_bit_xor</code></ins></th>
284-
<th><ins><code>T()</code></ins></th>
285-
<th><ins><code>x ^ y</code></ins></th>
273+
<th><code>reduction_bit_xor</code></th>
274+
<th><code>T()</code></th>
275+
<th><code>x ^ y</code></th>
286276
</tr>
287277
<tr>
288-
<th><ins><code>reduction_min</code></ins></th>
289-
<th><ins><code>var</code></ins></th>
290-
<th><ins><code>min(x, y)</code></ins></th>
278+
<th><code>reduction_min</code></th>
279+
<th><code>var</code></th>
280+
<th><code>min(x, y)</code></th>
291281
</tr>
292282
<tr>
293-
<th><ins><code>reduction_max</code></ins></th>
294-
<th><ins><code>var</code></ins></th>
295-
<th><ins><code>max(x, y)</code></ins></th>
283+
<th><code>reduction_max</code></th>
284+
<th><code>var</code></th>
285+
<th><code>max(x, y)</code></th>
296286
</tr>
297287
</thead>
298288
</table>
299289

300-
<ins>
301-
<cxx-example><ins>The following code updates each element of <code>y</code> and sets <code>s</code> ot the sum of the squares.
290+
<cxx-example>The following code updates each element of <code>y</code> and sets <code>s</code> ot the sum of the squares.
302291
<pre>
303292
extern int n;
304293
extern float x[], y[], a;
@@ -311,8 +300,7 @@ <h1><ins>Reductions</ins></h1>
311300
}
312301
);
313302
</pre>
314-
</ins></cxx-example>
315-
</ins>
303+
</cxx-example>
316304
</cxx-function>
317305
</cxx-section>
318306

0 commit comments

Comments
 (0)