r274754 - in /branches/gcc-9-branch/libstdc++-v...

redi@gcc.gnu.org redi@gcc.gnu.org
Tue Aug 20 21:03:00 GMT 2019


Author: redi
Date: Tue Aug 20 21:03:11 2019
New Revision: 274754

URL: https://gcc.gnu.org/viewcvs?rev=274754&root=gcc&view=rev
Log:
Implement new serial algorithms from Parallelism TS (P0024R2)

These new (non-parallel) algorithms were added to C++17 along with the
parallel algorithms, but were missing from libstdc++.

Backported for PR libstdc++/91495, replacing the use of
std::__size_to_integer which is not present on the branch.

Backport from mainline
2019-06-19  Jonathan Wakely  <jwakely@redhat.com>

	* include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
	category used in invocable check.
	(reduce(Iter, Iter, T)): Pass initial value as rvalue.
	* testsuite/26_numerics/reduce/2.cc: New test.

Backport from mainline
2019-06-18  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/algorithmfwd.h: Change title of doc group.
	* include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
	P0024R2.
	* include/bits/stl_numeric.h: Define doc group and add algos to it.
	* include/std/numeric (__is_random_access_iter): New internal trait.
	(reduce, transform_reduce, exclusive_scan, inclusive_scan)
	(transform_exclusive_scan, transform_inclusive_scan): Likewise.
	* testsuite/25_algorithms/for_each/for_each_n.cc: New test.
	* testsuite/26_numerics/exclusive_scan/1.cc: New test.
	* testsuite/26_numerics/inclusive_scan/1.cc: New test.
	* testsuite/26_numerics/reduce/1.cc: New test.
	* testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
	* testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
	* testsuite/26_numerics/transform_reduce/1.cc: New test.
	* testsuite/util/testsuite_iterators.h (test_container::size()): New
	member function.

Added:
    branches/gcc-9-branch/libstdc++-v3/testsuite/25_algorithms/for_each/for_each_n.cc
    branches/gcc-9-branch/libstdc++-v3/testsuite/26_numerics/exclusive_scan/
    branches/gcc-9-branch/libstdc++-v3/testsuite/26_numerics/exclusive_scan/1.cc
    branches/gcc-9-branch/libstdc++-v3/testsuite/26_numerics/inclusive_scan/
    branches/gcc-9-branch/libstdc++-v3/testsuite/26_numerics/inclusive_scan/1.cc
    branches/gcc-9-branch/libstdc++-v3/testsuite/26_numerics/reduce/
    branches/gcc-9-branch/libstdc++-v3/testsuite/26_numerics/reduce/1.cc
    branches/gcc-9-branch/libstdc++-v3/testsuite/26_numerics/reduce/2.cc
    branches/gcc-9-branch/libstdc++-v3/testsuite/26_numerics/transform_exclusive_scan/
    branches/gcc-9-branch/libstdc++-v3/testsuite/26_numerics/transform_exclusive_scan/1.cc
    branches/gcc-9-branch/libstdc++-v3/testsuite/26_numerics/transform_inclusive_scan/
    branches/gcc-9-branch/libstdc++-v3/testsuite/26_numerics/transform_inclusive_scan/1.cc
    branches/gcc-9-branch/libstdc++-v3/testsuite/26_numerics/transform_reduce/
    branches/gcc-9-branch/libstdc++-v3/testsuite/26_numerics/transform_reduce/1.cc
Modified:
    branches/gcc-9-branch/libstdc++-v3/ChangeLog
    branches/gcc-9-branch/libstdc++-v3/include/bits/algorithmfwd.h
    branches/gcc-9-branch/libstdc++-v3/include/bits/stl_algo.h
    branches/gcc-9-branch/libstdc++-v3/include/bits/stl_numeric.h
    branches/gcc-9-branch/libstdc++-v3/include/std/numeric
    branches/gcc-9-branch/libstdc++-v3/testsuite/util/testsuite_iterators.h



More information about the Gcc-cvs mailing list