Skip to content

Commit 1515fae

Browse files
committed
Don't number the eliminated clauses of reduce, exclusive_scan, & inclusive_scan
1 parent 92e2f06 commit 1515fae

File tree

1 file changed

+36
-44
lines changed

1 file changed

+36
-44
lines changed

algorithms.html

Lines changed: 36 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -549,26 +549,24 @@ <h1>Reduce</h1>
549549
<code>reduce(first, last, typename iterator_traits&lt;InputIterator&gt;::value_type{})</code>
550550
</cxx-returns>
551551

552-
<cxx-requires>
553-
<del2>
552+
<del2>
553+
<cxx-requires>
554554
<code>typename iterator_traits&lt;InputIterator&gt;::value_type{}</code>
555555
shall be a valid expression. The <code>operator+</code> function associated with
556556
<code>iterator_traits&lt;InputIterator&gt;::value_type</code> shall not invalidate iterators or
557557
subranges, nor modify elements in the range <code>[first,last)</code>.
558-
</del2>
559-
</cxx-requires>
558+
</cxx-requires>
560559

561-
<cxx-complexity>
562-
<del2>O(<code>last - first</code>) applications of <code>operator+</code>.</del2>
563-
</cxx-complexity>
560+
<cxx-complexity>
561+
O(<code>last - first</code>) applications of <code>operator+</code>.
562+
</cxx-complexity>
564563

565-
<cxx-notes>
566-
<del2>
564+
<cxx-notes>
567565
The primary difference between <code>reduce</code> and <code>accumulate</code> is that the behavior
568566
of <code>reduce</code> may be non-deterministic for non-associative or non-commutative
569567
<code>operator+</code>.
570-
</del2>
571-
</cxx-notes>
568+
</cxx-notes>
569+
</del2>
572570
</cxx-function>
573571

574572
<cxx-function>
@@ -581,23 +579,21 @@ <h1>Reduce</h1>
581579
<code>reduce(first, last, init, plus&lt;&gt;())</code>
582580
</cxx-returns>
583581

584-
<cxx-requires>
585-
<del2>
582+
<del2>
583+
<cxx-requires>
586584
The <code>operator+</code> function associated with <code>T</code> shall not invalidate iterators
587585
or subranges, nor modify elements in the range <code>[first,last)</code>.
588-
</del2>
589-
</cxx-requires>
586+
</cxx-requires>
590587

591-
<cxx-complexity>
592-
<del2>O(<code>last - first</code>) applications of <code>operator+</code>.</del2>
593-
</cxx-complexity>
588+
<cxx-complexity>
589+
O(<code>last - first</code>) applications of <code>operator+</code>.
590+
</cxx-complexity>
594591

595-
<cxx-notes>
596-
<del2>
592+
<cxx-notes>
597593
The primary difference between <code>reduce</code> and <code>accumulate</code> is that the behavior
598594
of <code>reduce</code> may be non-deterministic for non-associative or non-commutative <code>operator+</code>.
599-
</del2>
600-
</cxx-notes>
595+
</cxx-notes>
596+
</del2>
601597
</cxx-function>
602598

603599
<cxx-function>
@@ -644,26 +640,24 @@ <h1>Exclusive scan</h1>
644640
<code>exclusive_scan(first, last, result, init, plus&lt;&gt;())</code>
645641
</cxx-returns>
646642

647-
<cxx-requires>
648-
<del2>
643+
<del2>
644+
<cxx-requires>
649645
The <code>operator+</code> function associated with <code>iterator_traits&lt;InputIterator&gt;::value_type</code> shall
650646
not invalidate iterators or subranges, nor modify elements in the ranges <code>[first,last)</code> or
651647
<code>[result,result + (last - first))</code>.
652-
</del2>
653-
</cxx-requires>
648+
</cxx-requires>
654649

655-
<cxx-complexity>
656-
<del2>O(<code>last - first</code>) applications of <code>operator+</code>.</del2>
657-
</cxx-complexity>
650+
<cxx-complexity>
651+
O(<code>last - first</code>) applications of <code>operator+</code>.
652+
</cxx-complexity>
658653

659-
<cxx-notes>
660-
<del2>
654+
<cxx-notes>
661655
The primary difference between <code>exclusive_scan</code> and <code>inclusive_scan</code> is that
662656
<code>exclusive_scan</code> excludes the <code>i</code>th input element from the <code>i</code>th sum.
663657
If the <code>operator+</code> function is not mathematically associative, the behavior of
664658
<code>exclusive_scan</code> may be non-deterministic.
665-
</del2>
666-
</cxx-notes>
659+
</cxx-notes>
660+
</del2>
667661
</cxx-function>
668662

669663
<cxx-function>
@@ -718,27 +712,25 @@ <h1>Inclusive scan</h1>
718712
<code>inclusive_scan(first, last, result, plus&lt;&gt;())</code>
719713
</cxx-returns>
720714

721-
<cxx-requires>
722-
<del2>
715+
<del2>
716+
<cxx-requires>
723717
The <code>operator+</code> function associated with
724718
<code>iterator_traits&lt;InputIterator&gt;::value_type</code> shall not invalidate iterators or
725719
subranges, nor modify elements in the ranges <code>[first,last)</code> or
726720
<code>[result,result + (last - first))</code>.
727-
</del2>
728-
</cxx-requires>
721+
</cxx-requires>
729722

730-
<cxx-complexity>
731-
<del2>O(<code>last - first</code>) applications of <code>operator+</code>.</del2>
732-
</cxx-complexity>
723+
<cxx-complexity>
724+
O(<code>last - first</code>) applications of <code>operator+</code>.
725+
</cxx-complexity>
733726

734-
<cxx-notes>
735-
<del2>
727+
<cxx-notes>
736728
The primary difference between <code>exclusive_scan</code> and <code>inclusive_scan</code> is that
737729
<code>exclusive_scan</code> excludes the <code>i</code>th input element from the <code>i</code>th sum.
738730
If the <code>operator+</code> function is not mathematically associative, the behavior of
739731
<code>inclusive_scan</code> may be non-deterministic.
740-
</del2>
741-
</cxx-notes>
732+
</cxx-notes>
733+
</del2>
742734
</cxx-function>
743735

744736
<cxx-function>

0 commit comments

Comments
 (0)