Skip to content

Commit 59dfefc

Browse files
committed
Merge pull request #11 from jaredhoberock/master
Changes for Artur's review with LWG for Thursday morning
2 parents 8500943 + 1515fae commit 59dfefc

File tree

1 file changed

+64
-56
lines changed

1 file changed

+64
-56
lines changed

algorithms.html

Lines changed: 64 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ <h1>For each</h1>
481481
</cxx-section>
482482

483483
<cxx-section id="parallel.alg.added.numeric.synop">
484-
<h1>Header <code>&lt;experimental/numeric&gt;</code></h1>
484+
<h1>Header <code>&lt;experimental/numeric&gt;</code><ins2> synopsis</ins2></h1>
485485

486486
<pre>
487487
namespace std {
@@ -522,7 +522,7 @@ <h1>Header <code>&lt;experimental/numeric&gt;</code></h1>
522522
OutputIterator
523523
inclusive_scan(InputIterator first, InputIterator last,
524524
OutputIterator result,
525-
T init);
525+
BinaryOperation binary_op);
526526
template&lt;class InputIterator, class OutputIterator,
527527
class T, class BinaryOperation&gt;
528528
OutputIterator
@@ -549,22 +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-
<code>typename iterator_traits&lt;InputIterator&gt;::value_type{}</code>
554-
shall be a valid expression. The <code>operator+</code> function associated with
555-
<code>iterator_traits&lt;InputIterator&gt;::value_type</code> shall not invalidate iterators or
556-
subranges, nor modify elements in the range <code>[first,last)</code>.
557-
</cxx-requires>
552+
<del2>
553+
<cxx-requires>
554+
<code>typename iterator_traits&lt;InputIterator&gt;::value_type{}</code>
555+
shall be a valid expression. The <code>operator+</code> function associated with
556+
<code>iterator_traits&lt;InputIterator&gt;::value_type</code> shall not invalidate iterators or
557+
subranges, nor modify elements in the range <code>[first,last)</code>.
558+
</cxx-requires>
558559

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

563-
<cxx-notes>
564-
The primary difference between <code>reduce</code> and <code>accumulate</code> is that the behavior
565-
of <code>reduce</code> may be non-deterministic for non-associative or non-commutative
566-
<code>operator+</code>.
567-
</cxx-notes>
564+
<cxx-notes>
565+
The primary difference between <code>reduce</code> and <code>accumulate</code> is that the behavior
566+
of <code>reduce</code> may be non-deterministic for non-associative or non-commutative
567+
<code>operator+</code>.
568+
</cxx-notes>
569+
</del2>
568570
</cxx-function>
569571

570572
<cxx-function>
@@ -577,19 +579,21 @@ <h1>Reduce</h1>
577579
<code>reduce(first, last, init, plus&lt;&gt;())</code>
578580
</cxx-returns>
579581

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

585-
<cxx-complexity>
586-
O(<code>last - first</code>) applications of <code>operator+</code>.
587-
</cxx-complexity>
588+
<cxx-complexity>
589+
O(<code>last - first</code>) applications of <code>operator+</code>.
590+
</cxx-complexity>
588591

589-
<cxx-notes>
590-
The primary difference between <code>reduce</code> and <code>accumulate</code> is that the behavior
591-
of <code>reduce</code> may be non-deterministic for non-associative or non-commutative <code>operator+</code>.
592-
</cxx-notes>
592+
<cxx-notes>
593+
The primary difference between <code>reduce</code> and <code>accumulate</code> is that the behavior
594+
of <code>reduce</code> may be non-deterministic for non-associative or non-commutative <code>operator+</code>.
595+
</cxx-notes>
596+
</del2>
593597
</cxx-function>
594598

595599
<cxx-function>
@@ -636,22 +640,24 @@ <h1>Exclusive scan</h1>
636640
<code>exclusive_scan(first, last, result, init, plus&lt;&gt;())</code>
637641
</cxx-returns>
638642

639-
<cxx-requires>
640-
The <code>operator+</code> function associated with <code>iterator_traits&lt;InputIterator&gt;::value_type</code> shall
641-
not invalidate iterators or subranges, nor modify elements in the ranges <code>[first,last)</code> or
642-
<code>[result,result + (last - first))</code>.
643-
</cxx-requires>
643+
<del2>
644+
<cxx-requires>
645+
The <code>operator+</code> function associated with <code>iterator_traits&lt;InputIterator&gt;::value_type</code> shall
646+
not invalidate iterators or subranges, nor modify elements in the ranges <code>[first,last)</code> or
647+
<code>[result,result + (last - first))</code>.
648+
</cxx-requires>
644649

645-
<cxx-complexity>
650+
<cxx-complexity>
646651
O(<code>last - first</code>) applications of <code>operator+</code>.
647-
</cxx-complexity>
652+
</cxx-complexity>
648653

649-
<cxx-notes>
650-
The primary difference between <code>exclusive_scan</code> and <code>inclusive_scan</code> is that
651-
<code>exclusive_scan</code> excludes the <code>i</code>th input element from the <code>i</code>th sum.
652-
If the <code>operator+</code> function is not mathematically associative, the behavior of
653-
<code>exclusive_scan</code> may be non-deterministic.
654-
</cxx-notes>
654+
<cxx-notes>
655+
The primary difference between <code>exclusive_scan</code> and <code>inclusive_scan</code> is that
656+
<code>exclusive_scan</code> excludes the <code>i</code>th input element from the <code>i</code>th sum.
657+
If the <code>operator+</code> function is not mathematically associative, the behavior of
658+
<code>exclusive_scan</code> may be non-deterministic.
659+
</cxx-notes>
660+
</del2>
655661
</cxx-function>
656662

657663
<cxx-function>
@@ -683,7 +689,7 @@ <h1>Exclusive scan</h1>
683689
</cxx-complexity>
684690

685691
<cxx-notes>
686-
The primary difference between <code>exclusive_scan</code> and <code>inclusive_scan</code> is that
692+
The <del2>primary</del2> difference between <code>exclusive_scan</code> and <code>inclusive_scan</code> is that
687693
<code>exclusive_scan</code> excludes the <code>i</code>th input element from the <code>i</code>th
688694
sum. If <code>binary_op</code> is not mathematically associative, the behavior of
689695
<code>exclusive_scan</code> may be non-deterministic.
@@ -706,23 +712,25 @@ <h1>Inclusive scan</h1>
706712
<code>inclusive_scan(first, last, result, plus&lt;&gt;())</code>
707713
</cxx-returns>
708714

709-
<cxx-requires>
710-
The <code>operator+</code> function associated with
711-
<code>iterator_traits&lt;InputIterator&gt;::value_type</code> shall not invalidate iterators or
712-
subranges, nor modify elements in the ranges <code>[first,last)</code> or
713-
<code>[result,result + (last - first))</code>.
714-
</cxx-requires>
715+
<del2>
716+
<cxx-requires>
717+
The <code>operator+</code> function associated with
718+
<code>iterator_traits&lt;InputIterator&gt;::value_type</code> shall not invalidate iterators or
719+
subranges, nor modify elements in the ranges <code>[first,last)</code> or
720+
<code>[result,result + (last - first))</code>.
721+
</cxx-requires>
715722

716-
<cxx-complexity>
717-
O(<code>last - first</code>) applications of <code>operator+</code>.
718-
</cxx-complexity>
723+
<cxx-complexity>
724+
O(<code>last - first</code>) applications of <code>operator+</code>.
725+
</cxx-complexity>
719726

720-
<cxx-notes>
721-
The <del2>primary</del2> difference between <code>exclusive_scan</code> and <code>inclusive_scan</code> is that
722-
<code>exclusive_scan</code> excludes the <code>i</code>th input element from the <code>i</code>th sum.
723-
If the <code>operator+</code> function is not mathematically associative, the behavior of
724-
<code>inclusive_scan</code> may be non-deterministic.
725-
</cxx-notes>
727+
<cxx-notes>
728+
The primary difference between <code>exclusive_scan</code> and <code>inclusive_scan</code> is that
729+
<code>exclusive_scan</code> excludes the <code>i</code>th input element from the <code>i</code>th sum.
730+
If the <code>operator+</code> function is not mathematically associative, the behavior of
731+
<code>inclusive_scan</code> may be non-deterministic.
732+
</cxx-notes>
733+
</del2>
726734
</cxx-function>
727735

728736
<cxx-function>

0 commit comments

Comments
 (0)