Skip to content

Commit dcf235a

Browse files
committed
Eliminate redlining from [parallel.alg.forloop]
1 parent 9af868f commit dcf235a

File tree

1 file changed

+68
-80
lines changed

1 file changed

+68
-80
lines changed

algorithms.html

Lines changed: 68 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -342,52 +342,50 @@ <h1>Inductions</h1>
342342
</cxx-section>
343343

344344
<cxx-section id="parallel.alg.forloop">
345-
<h1><ins>For loop</ins></h1>
345+
<h1>For loop</h1>
346346

347347
<cxx-function>
348-
<cxx-signature><ins>template&lt;class I, class... Rest&gt;
349-
void for_loop(no_deduce_t&lt;I&gt; start, I finish, Rest&amp;&amp;... rest);</ins></cxx-signature>
348+
<cxx-signature>template&lt;class I, class... Rest&gt;
349+
void for_loop(no_deduce_t&lt;I&gt; start, I finish, Rest&amp;&amp;... rest);</cxx-signature>
350350

351-
<cxx-signature><ins>template&lt;class ExecutionPolicy,
351+
<cxx-signature>template&lt;class ExecutionPolicy,
352352
class I, class... Rest&gt;
353353
void for_loop(ExecutionPolicy&amp;&amp; exec,
354354
no_deduce_t&lt;I&gt; start, I finish, Rest&amp;&amp;... rest);
355355

356-
</ins></cxx-signature>
356+
</cxx-signature>
357357

358-
<cxx-signature><ins>template&lt;class I, class S, class... Rest&gt;
358+
<cxx-signature>template&lt;class I, class S, class... Rest&gt;
359359
void for_loop_strided(no_deduce_t&lt;I&gt; start, I finish,
360-
S stride, Rest&amp;&amp;... rest);</ins></cxx-signature>
360+
S stride, Rest&amp;&amp;... rest);</cxx-signature>
361361

362-
<cxx-signature><ins>template&lt;class ExecutionPolicy,
362+
<cxx-signature>template&lt;class ExecutionPolicy,
363363
class I, class S, class... Rest&gt;
364364
void for_loop_strided(ExecutionPolicy&amp;&amp; exec,
365365
no_deduce_t&lt;I&gt; start, I finish,
366366
S stride, Rest&amp;&amp;... rest);
367367

368-
</ins></cxx-signature>
368+
</cxx-signature>
369369

370-
<cxx-signature><ins>template&lt;class I, class Size, class... Rest&gt;
371-
void for_loop_n(I start, Size n, Rest&amp;&amp;... rest);</ins></cxx-signature>
370+
<cxx-signature>template&lt;class I, class Size, class... Rest&gt;
371+
void for_loop_n(I start, Size n, Rest&amp;&amp;... rest);</cxx-signature>
372372

373-
<cxx-signature><ins>template&lt;class ExecutionPolicy,
373+
<cxx-signature>template&lt;class ExecutionPolicy,
374374
class I, class Size, class... Rest&gt;
375375
void for_loop_n(ExecutionPolicy&amp;&amp; exec,
376376
I start, Size n, Rest&amp;&amp;... rest);
377377

378-
</ins></cxx-signature>
378+
</cxx-signature>
379379

380-
<cxx-signature><ins>template&lt;class I, class Size, class S, class... Rest&gt;
381-
void for_loop_n_strided(I start, Size n, S stride, Rest&amp;&amp;... rest);</ins></cxx-signature>
380+
<cxx-signature>template&lt;class I, class Size, class S, class... Rest&gt;
381+
void for_loop_n_strided(I start, Size n, S stride, Rest&amp;&amp;... rest);</cxx-signature>
382382

383-
<cxx-signature><ins>template&lt;class ExecutionPolicy,
383+
<cxx-signature>template&lt;class ExecutionPolicy,
384384
class I, class Size, class S, class... Rest&gt;
385385
void for_loop_n_strided(ExecutionPolicy&amp;&amp; exec,
386-
I start, Size n, S stride, Rest&amp;&amp;... rest);</ins></cxx-signature>
386+
I start, Size n, S stride, Rest&amp;&amp;... rest);</cxx-signature>
387387

388-
<ins>
389388
<cxx-requires>
390-
<ins>
391389
For the overloads with an <code>ExecutionPolicy</code>, <code>I</code> shall be an integral type
392390
or meet the requirements of a forward iterator type; otherwise, <code>I</code> shall be an integral
393391
type or meet the requirements of an input iterator type. <code>Size</code> shall be an integral type
@@ -399,75 +397,65 @@ <h1><ins>For loop</ins></h1>
399397
followed by exactly one invocable element-access function, <em>f</em>. For the overloads with an
400398
<code>ExecutionPolicy</code>, <em>f</em> shall meet the requirements of <code>CopyConstructible</code>;
401399
otherwise, <em>f</em> shall meet the requirements of <code>MoveConstructible</code>.
402-
</ins>
403400
</cxx-requires>
404-
</ins>
405401

406-
<ins>
407402
<cxx-effects>
408-
<ins>
409-
Applies <em>f</em> to each element in the <em>input sequence</em>, as described below, with additional
410-
arguments corresponding to the reductions and inductions in the <code>rest</code> parameter pack. The
411-
length of the input sequence is:
412-
413-
<ul>
414-
<li>
415-
<code>n</code>, if specified,
416-
</li>
417-
418-
<li>
419-
otherwise <code>finish - start</code> if neither <code>n</code> nor <code>stride</code> is specified,
420-
</li>
421-
422-
<li>
423-
otherwise <code>1 + (finish-start-1)/stride</code> if <code>stride</code> is positive,
424-
</li>
425-
426-
<li>
427-
otherwise <code>1 + (start-finish-1)/-stride</code>.
428-
</li>
429-
</ul>
430-
431-
The first element in the input sequence is <code>start</code>. Each subsequent element is generated by adding
432-
<code>stride</code> to the previous element, if <code>stride</code> is specified, otherwise by incrementing
433-
the previous element. <cxx-note>As described in the C++ standard, section [algorithms.general], arithmetic
434-
on non-random-access iterators is performed using advance and distance.</cxx-note> <cxx-note>The order of the
435-
elements of the input sequence is important for determining ordinal position of an application of <em>f</em>,
436-
even though the applications themselves may be unordered.</cxx-note></p>
437-
438-
The first argument to <em>f</em> is an element from the input sequence. <cxx-note>if <code>I</code> is an
439-
iterator type, the iterators in the input sequence are not dereferenced before
440-
being passed to <em>f</em>.</cxx-note> For each member of the rest parameter pack
441-
excluding <em>f</em>, an additional argument is passed to each application of <em>f</em> as follows:
442-
443-
<ul>
444-
<li>
445-
If the pack member is an object returned by a call to a reduction function listed in section
446-
[parallel.alg.reductions], then the additional argument is a reference to an accumulator of that reduction
447-
object.
448-
</li>
449-
450-
<li>
451-
If the pack member is an object returned by a call to <code>induction</code>, then the additional argument is the
452-
induction value for that induction object corresponding to the position of the application of <em>f</em> in the input
453-
sequence.
454-
</li>
455-
</ul>
456-
</ins>
403+
Applies <em>f</em> to each element in the <em>input sequence</em>, as described below, with additional
404+
arguments corresponding to the reductions and inductions in the <code>rest</code> parameter pack. The
405+
length of the input sequence is:
406+
407+
<ul>
408+
<li>
409+
<code>n</code>, if specified,
410+
</li>
411+
412+
<li>
413+
otherwise <code>finish - start</code> if neither <code>n</code> nor <code>stride</code> is specified,
414+
</li>
415+
416+
<li>
417+
otherwise <code>1 + (finish-start-1)/stride</code> if <code>stride</code> is positive,
418+
</li>
419+
420+
<li>
421+
otherwise <code>1 + (start-finish-1)/-stride</code>.
422+
</li>
423+
</ul>
424+
425+
The first element in the input sequence is <code>start</code>. Each subsequent element is generated by adding
426+
<code>stride</code> to the previous element, if <code>stride</code> is specified, otherwise by incrementing
427+
the previous element. <cxx-note>As described in the C++ standard, section [algorithms.general], arithmetic
428+
on non-random-access iterators is performed using advance and distance.</cxx-note> <cxx-note>The order of the
429+
elements of the input sequence is important for determining ordinal position of an application of <em>f</em>,
430+
even though the applications themselves may be unordered.</cxx-note></p>
431+
432+
The first argument to <em>f</em> is an element from the input sequence. <cxx-note>if <code>I</code> is an
433+
iterator type, the iterators in the input sequence are not dereferenced before
434+
being passed to <em>f</em>.</cxx-note> For each member of the rest parameter pack
435+
excluding <em>f</em>, an additional argument is passed to each application of <em>f</em> as follows:
436+
437+
<ul>
438+
<li>
439+
If the pack member is an object returned by a call to a reduction function listed in section
440+
[parallel.alg.reductions], then the additional argument is a reference to an accumulator of that reduction
441+
object.
442+
</li>
443+
444+
<li>
445+
If the pack member is an object returned by a call to <code>induction</code>, then the additional argument is the
446+
induction value for that induction object corresponding to the position of the application of <em>f</em> in the input
447+
sequence.
448+
</li>
449+
</ul>
457450
</cxx-effects>
458-
</ins>
459451

460-
<ins>
461452
<cxx-complexity>
462-
<ins>Applies <em>f</em> exactly once for each element of the input sequence.</ins>
453+
Applies <em>f</em> exactly once for each element of the input sequence.
463454
</cxx-complexity>
464-
</ins>
465455

466-
<ins>
467-
<cxx-remarks>
468-
<ins>If <em>f</em> returns a result, the result is ignored.</ins>
469-
</cxx-remarks>
470-
</ins>
456+
<cxx-remarks>
457+
If <em>f</em> returns a result, the result is ignored.
458+
</cxx-remarks>
471459
</cxx-function>
472460
</cxx-section>
473461

0 commit comments

Comments
 (0)