@@ -549,26 +549,24 @@ <h1>Reduce</h1>
549
549
< code > reduce(first, last, typename iterator_traits<InputIterator>::value_type{})</ code >
550
550
</ cxx-returns >
551
551
552
- < cxx-requires >
553
- < del2 >
552
+ < del2 >
553
+ < cxx-requires >
554
554
< code > typename iterator_traits<InputIterator>::value_type{}</ code >
555
555
shall be a valid expression. The < code > operator+</ code > function associated with
556
556
< code > iterator_traits<InputIterator>::value_type</ code > shall not invalidate iterators or
557
557
subranges, nor modify elements in the range < code > [first,last)</ code > .
558
- </ del2 >
559
- </ cxx-requires >
558
+ </ cxx-requires >
560
559
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 >
564
563
565
- < cxx-notes >
566
- < del2 >
564
+ < cxx-notes >
567
565
The primary difference between < code > reduce</ code > and < code > accumulate</ code > is that the behavior
568
566
of < code > reduce</ code > may be non-deterministic for non-associative or non-commutative
569
567
< code > operator+</ code > .
570
- </ del2 >
571
- </ cxx-notes >
568
+ </ cxx-notes >
569
+ </ del2 >
572
570
</ cxx-function >
573
571
574
572
< cxx-function >
@@ -581,23 +579,21 @@ <h1>Reduce</h1>
581
579
< code > reduce(first, last, init, plus<>())</ code >
582
580
</ cxx-returns >
583
581
584
- < cxx-requires >
585
- < del2 >
582
+ < del2 >
583
+ < cxx-requires >
586
584
The < code > operator+</ code > function associated with < code > T</ code > shall not invalidate iterators
587
585
or subranges, nor modify elements in the range < code > [first,last)</ code > .
588
- </ del2 >
589
- </ cxx-requires >
586
+ </ cxx-requires >
590
587
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 >
594
591
595
- < cxx-notes >
596
- < del2 >
592
+ < cxx-notes >
597
593
The primary difference between < code > reduce</ code > and < code > accumulate</ code > is that the behavior
598
594
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 >
601
597
</ cxx-function >
602
598
603
599
< cxx-function >
@@ -644,26 +640,24 @@ <h1>Exclusive scan</h1>
644
640
< code > exclusive_scan(first, last, result, init, plus<>())</ code >
645
641
</ cxx-returns >
646
642
647
- < cxx-requires >
648
- < del2 >
643
+ < del2 >
644
+ < cxx-requires >
649
645
The < code > operator+</ code > function associated with < code > iterator_traits<InputIterator>::value_type</ code > shall
650
646
not invalidate iterators or subranges, nor modify elements in the ranges < code > [first,last)</ code > or
651
647
< code > [result,result + (last - first))</ code > .
652
- </ del2 >
653
- </ cxx-requires >
648
+ </ cxx-requires >
654
649
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 >
658
653
659
- < cxx-notes >
660
- < del2 >
654
+ < cxx-notes >
661
655
The primary difference between < code > exclusive_scan</ code > and < code > inclusive_scan</ code > is that
662
656
< code > exclusive_scan</ code > excludes the < code > i</ code > th input element from the < code > i</ code > th sum.
663
657
If the < code > operator+</ code > function is not mathematically associative, the behavior of
664
658
< code > exclusive_scan</ code > may be non-deterministic.
665
- </ del2 >
666
- </ cxx-notes >
659
+ </ cxx-notes >
660
+ </ del2 >
667
661
</ cxx-function >
668
662
669
663
< cxx-function >
@@ -718,27 +712,25 @@ <h1>Inclusive scan</h1>
718
712
< code > inclusive_scan(first, last, result, plus<>())</ code >
719
713
</ cxx-returns >
720
714
721
- < cxx-requires >
722
- < del2 >
715
+ < del2 >
716
+ < cxx-requires >
723
717
The < code > operator+</ code > function associated with
724
718
< code > iterator_traits<InputIterator>::value_type</ code > shall not invalidate iterators or
725
719
subranges, nor modify elements in the ranges < code > [first,last)</ code > or
726
720
< code > [result,result + (last - first))</ code > .
727
- </ del2 >
728
- </ cxx-requires >
721
+ </ cxx-requires >
729
722
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 >
733
726
734
- < cxx-notes >
735
- < del2 >
727
+ < cxx-notes >
736
728
The primary difference between < code > exclusive_scan</ code > and < code > inclusive_scan</ code > is that
737
729
< code > exclusive_scan</ code > excludes the < code > i</ code > th input element from the < code > i</ code > th sum.
738
730
If the < code > operator+</ code > function is not mathematically associative, the behavior of
739
731
< code > inclusive_scan</ code > may be non-deterministic.
740
- </ del2 >
741
- </ cxx-notes >
732
+ </ cxx-notes >
733
+ </ del2 >
742
734
</ cxx-function >
743
735
744
736
< cxx-function >
0 commit comments