gcc/libstdc++-v3/include/parallel/algo.h

2366 lines
96 KiB
C
Raw Normal View History

Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// -*- C++ -*-
// Copyright (C) 2007-2013 Free Software Foundation, Inc.
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
// of the GNU General Public License as published by the Free Software
// Foundation; either version 3, or (at your option) any later
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// version.
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
/** @file parallel/algo.h
* @brief Parallel STL function calls corresponding to the stl_algo.h header.
*
* The functions defined here mainly do case switches and
* call the actual parallelized versions in other files.
* Inlining policy: Functions that basically only contain one function call,
* are declared inline.
* This file is a GNU parallel extension to the Standard C++ Library.
*/
// Written by Johannes Singler and Felix Putze.
#ifndef _GLIBCXX_PARALLEL_ALGO_H
#define _GLIBCXX_PARALLEL_ALGO_H 1
#include <parallel/algorithmfwd.h>
#include <bits/stl_algobase.h>
#include <bits/stl_algo.h>
#include <parallel/iterator.h>
#include <parallel/base.h>
#include <parallel/sort.h>
#include <parallel/workstealing.h>
#include <parallel/par_loop.h>
#include <parallel/omp_loop.h>
#include <parallel/omp_loop_static.h>
#include <parallel/for_each_selectors.h>
#include <parallel/for_each.h>
#include <parallel/find.h>
#include <parallel/find_selectors.h>
#include <parallel/search.h>
#include <parallel/random_shuffle.h>
#include <parallel/partition.h>
#include <parallel/merge.h>
#include <parallel/unique_copy.h>
#include <parallel/set_operations.h>
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
namespace std _GLIBCXX_VISIBILITY(default)
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
{
namespace __parallel
{
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _Function>
inline _Function
for_each(_IIter __begin, _IIter __end, _Function __f,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::for_each(__begin, __end, __f); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _Function, typename _IteratorTag>
inline _Function
__for_each_switch(_IIter __begin, _IIter __end, _Function __f,
_IteratorTag)
{ return for_each(__begin, __end, __f, __gnu_parallel::sequential_tag()); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel algorithm for random access iterators
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Function>
_Function
__for_each_switch(_RAIter __begin, _RAIter __end,
_Function __f, random_access_iterator_tag,
__gnu_parallel::_Parallelism __parallelism_tag
= __gnu_parallel::parallel_balanced)
{
multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. 2008-01-09 Paolo Carlini <pcarlini@suse.de> * include/parallel/multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. * include/parallel/losertree.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/tree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/algo.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/random_number.h: Likewise. From-SVN: r131440
2008-01-10 03:07:41 +01:00
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin)
>= __gnu_parallel::_Settings::get().for_each_minimal_n
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
&& __gnu_parallel::__is_parallel(__parallelism_tag)))
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
bool __dummy;
__gnu_parallel::__for_each_selector<_RAIter> __functionality;
return __gnu_parallel::
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__for_each_template_random_access(
__begin, __end, __f, __functionality,
__gnu_parallel::_DummyReduct(), true, __dummy, -1,
__parallelism_tag);
}
else
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
return for_each(__begin, __end, __f, __gnu_parallel::sequential_tag());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _Iterator, typename _Function>
inline _Function
for_each(_Iterator __begin, _Iterator __end, _Function __f,
__gnu_parallel::_Parallelism __parallelism_tag)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef std::iterator_traits<_Iterator> _IteratorTraits;
typedef typename _IteratorTraits::iterator_category _IteratorCategory;
return __for_each_switch(__begin, __end, __f, _IteratorCategory(),
__parallelism_tag);
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _Iterator, typename _Function>
inline _Function
for_each(_Iterator __begin, _Iterator __end, _Function __f)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef std::iterator_traits<_Iterator> _IteratorTraits;
typedef typename _IteratorTraits::iterator_category _IteratorCategory;
return __for_each_switch(__begin, __end, __f, _IteratorCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _Tp>
inline _IIter
find(_IIter __begin, _IIter __end, const _Tp& __val,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::find(__begin, __end, __val); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _Tp, typename _IteratorTag>
inline _IIter
__find_switch(_IIter __begin, _IIter __end, const _Tp& __val,
_IteratorTag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::find(__begin, __end, __val); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel find for random access iterators
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Tp>
_RAIter
__find_switch(_RAIter __begin, _RAIter __end,
const _Tp& __val, random_access_iterator_tag)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
if (_GLIBCXX_PARALLEL_CONDITION(true))
{
__gnu_parallel::__binder2nd<__gnu_parallel::_EqualTo<_ValueType,
const _Tp&>,
_ValueType, const _Tp&, bool>
__comp(__gnu_parallel::_EqualTo<_ValueType, const _Tp&>(), __val);
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __gnu_parallel::__find_template(
__begin, __end, __begin, __comp,
__gnu_parallel::__find_if_selector()).first;
}
else
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
return _GLIBCXX_STD_A::find(__begin, __end, __val);
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _Tp>
inline _IIter
find(_IIter __begin, _IIter __end, const _Tp& __val)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef std::iterator_traits<_IIter> _IteratorTraits;
typedef typename _IteratorTraits::iterator_category _IteratorCategory;
return __find_switch(__begin, __end, __val, _IteratorCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _Predicate>
inline _IIter
find_if(_IIter __begin, _IIter __end, _Predicate __pred,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::find_if(__begin, __end, __pred); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _Predicate, typename _IteratorTag>
inline _IIter
__find_if_switch(_IIter __begin, _IIter __end, _Predicate __pred,
_IteratorTag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::find_if(__begin, __end, __pred); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel find_if for random access iterators
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Predicate>
_RAIter
__find_if_switch(_RAIter __begin, _RAIter __end,
_Predicate __pred, random_access_iterator_tag)
{
if (_GLIBCXX_PARALLEL_CONDITION(true))
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __gnu_parallel::__find_template(__begin, __end, __begin, __pred,
__gnu_parallel::
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__find_if_selector()).first;
else
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
return _GLIBCXX_STD_A::find_if(__begin, __end, __pred);
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _Predicate>
inline _IIter
find_if(_IIter __begin, _IIter __end, _Predicate __pred)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef std::iterator_traits<_IIter> _IteratorTraits;
typedef typename _IteratorTraits::iterator_category _IteratorCategory;
return __find_if_switch(__begin, __end, __pred, _IteratorCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _IIter, typename _FIterator>
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
inline _IIter
find_first_of(_IIter __begin1, _IIter __end1,
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
_FIterator __begin2, _FIterator __end2,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::find_first_of(__begin1, __end1, __begin2, __end2);
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _IIter, typename _FIterator,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typename _BinaryPredicate>
inline _IIter
find_first_of(_IIter __begin1, _IIter __end1,
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
_FIterator __begin2, _FIterator __end2,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_BinaryPredicate __comp, __gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::find_first_of(
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__begin1, __end1, __begin2, __end2, __comp); }
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
// Sequential fallback for input iterator type
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _IIter, typename _FIterator,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typename _IteratorTag1, typename _IteratorTag2>
inline _IIter
__find_first_of_switch(_IIter __begin1, _IIter __end1,
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
_FIterator __begin2, _FIterator __end2,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_IteratorTag1, _IteratorTag2)
{ return find_first_of(__begin1, __end1, __begin2, __end2,
__gnu_parallel::sequential_tag()); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel algorithm for random access iterators
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _RAIter, typename _FIterator,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typename _BinaryPredicate, typename _IteratorTag>
inline _RAIter
__find_first_of_switch(_RAIter __begin1,
_RAIter __end1,
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
_FIterator __begin2, _FIterator __end2,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_BinaryPredicate __comp, random_access_iterator_tag,
_IteratorTag)
{
return __gnu_parallel::
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__find_template(__begin1, __end1, __begin1, __comp,
__gnu_parallel::__find_first_of_selector
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
<_FIterator>(__begin2, __end2)).first;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
}
// Sequential fallback for input iterator type
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _IIter, typename _FIterator,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typename _BinaryPredicate, typename _IteratorTag1,
typename _IteratorTag2>
inline _IIter
__find_first_of_switch(_IIter __begin1, _IIter __end1,
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
_FIterator __begin2, _FIterator __end2,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_BinaryPredicate __comp, _IteratorTag1, _IteratorTag2)
{ return find_first_of(__begin1, __end1, __begin2, __end2, __comp,
__gnu_parallel::sequential_tag()); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _IIter, typename _FIterator,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typename _BinaryPredicate>
inline _IIter
find_first_of(_IIter __begin1, _IIter __end1,
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
_FIterator __begin2, _FIterator __end2,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_BinaryPredicate __comp)
{
typedef std::iterator_traits<_IIter> _IIterTraits;
typedef std::iterator_traits<_FIterator> _FIterTraits;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef typename _IIterTraits::iterator_category _IIteratorCategory;
typedef typename _FIterTraits::iterator_category _FIteratorCategory;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
return __find_first_of_switch(__begin1, __end1, __begin2, __end2, __comp,
_IIteratorCategory(), _FIteratorCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface, insert default comparator
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _IIter, typename _FIterator>
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
inline _IIter
find_first_of(_IIter __begin1, _IIter __end1,
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
_FIterator __begin2, _FIterator __end2)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef std::iterator_traits<_IIter> _IIterTraits;
typedef std::iterator_traits<_FIterator> _FIterTraits;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef typename _IIterTraits::value_type _IValueType;
typedef typename _FIterTraits::value_type _FValueType;
return __gnu_parallel::find_first_of(__begin1, __end1, __begin2, __end2,
__gnu_parallel::_EqualTo<_IValueType, _FValueType>());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _OutputIterator>
inline _OutputIterator
unique_copy(_IIter __begin1, _IIter __end1, _OutputIterator __out,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::unique_copy(__begin1, __end1, __out); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _OutputIterator,
typename _Predicate>
inline _OutputIterator
unique_copy(_IIter __begin1, _IIter __end1, _OutputIterator __out,
_Predicate __pred, __gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::unique_copy(__begin1, __end1, __out, __pred); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _OutputIterator,
typename _Predicate, typename _IteratorTag1, typename _IteratorTag2>
inline _OutputIterator
__unique_copy_switch(_IIter __begin, _IIter __last,
_OutputIterator __out, _Predicate __pred,
_IteratorTag1, _IteratorTag2)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::unique_copy(__begin, __last, __out, __pred); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel unique_copy for random access iterators
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename RandomAccessOutputIterator,
typename _Predicate>
RandomAccessOutputIterator
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__unique_copy_switch(_RAIter __begin, _RAIter __last,
RandomAccessOutputIterator __out, _Predicate __pred,
random_access_iterator_tag, random_access_iterator_tag)
{
multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. 2008-01-09 Paolo Carlini <pcarlini@suse.de> * include/parallel/multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. * include/parallel/losertree.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/tree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/algo.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/random_number.h: Likewise. From-SVN: r131440
2008-01-10 03:07:41 +01:00
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
static_cast<__gnu_parallel::_SequenceIndex>(__last - __begin)
> __gnu_parallel::_Settings::get().unique_copy_minimal_n))
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __gnu_parallel::__parallel_unique_copy(
__begin, __last, __out, __pred);
else
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
return _GLIBCXX_STD_A::unique_copy(__begin, __last, __out, __pred);
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _OutputIterator>
inline _OutputIterator
unique_copy(_IIter __begin1, _IIter __end1, _OutputIterator __out)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef std::iterator_traits<_IIter> _IIterTraits;
typedef std::iterator_traits<_OutputIterator> _OIterTraits;
typedef typename _IIterTraits::iterator_category _IIteratorCategory;
typedef typename _IIterTraits::value_type _ValueType;
typedef typename _OIterTraits::iterator_category _OIterCategory;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __unique_copy_switch(
__begin1, __end1, __out, equal_to<_ValueType>(),
_IIteratorCategory(), _OIterCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _OutputIterator, typename _Predicate>
inline _OutputIterator
unique_copy(_IIter __begin1, _IIter __end1, _OutputIterator __out,
_Predicate __pred)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef std::iterator_traits<_IIter> _IIterTraits;
typedef std::iterator_traits<_OutputIterator> _OIterTraits;
typedef typename _IIterTraits::iterator_category _IIteratorCategory;
typedef typename _OIterTraits::iterator_category _OIterCategory;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __unique_copy_switch(
__begin1, __end1, __out, __pred,
_IIteratorCategory(), _OIterCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator>
inline _OutputIterator
set_union(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _IIter2 __end2,
_OutputIterator __out, __gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::set_union(
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__begin1, __end1, __begin2, __end2, __out); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator, typename _Predicate>
inline _OutputIterator
set_union(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _IIter2 __end2,
_OutputIterator __out, _Predicate __pred,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::set_union(__begin1, __end1,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__begin2, __end2, __out, __pred); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _IIter1, typename _IIter2, typename _Predicate,
typename _OutputIterator, typename _IteratorTag1,
typename _IteratorTag2, typename _IteratorTag3>
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
inline _OutputIterator
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__set_union_switch(
_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _IIter2 __end2,
_OutputIterator __result, _Predicate __pred,
_IteratorTag1, _IteratorTag2, _IteratorTag3)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::set_union(__begin1, __end1,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__begin2, __end2, __result, __pred); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel set_union for random access iterators
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter1, typename _RAIter2,
typename _Output_RAIter, typename _Predicate>
_Output_RAIter
__set_union_switch(_RAIter1 __begin1, _RAIter1 __end1,
_RAIter2 __begin2, _RAIter2 __end2,
_Output_RAIter __result, _Predicate __pred,
random_access_iterator_tag, random_access_iterator_tag,
random_access_iterator_tag)
{
multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. 2008-01-09 Paolo Carlini <pcarlini@suse.de> * include/parallel/multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. * include/parallel/losertree.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/tree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/algo.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/random_number.h: Likewise. From-SVN: r131440
2008-01-10 03:07:41 +01:00
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1)
>= __gnu_parallel::_Settings::get().set_union_minimal_n
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
|| static_cast<__gnu_parallel::_SequenceIndex>(__end2 - __begin2)
>= __gnu_parallel::_Settings::get().set_union_minimal_n))
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __gnu_parallel::__parallel_set_union(
__begin1, __end1, __begin2, __end2, __result, __pred);
else
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
return _GLIBCXX_STD_A::set_union(__begin1, __end1,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__begin2, __end2, __result, __pred);
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator>
inline _OutputIterator
set_union(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _IIter2 __end2, _OutputIterator __out)
{
typedef std::iterator_traits<_IIter1> _IIterTraits1;
typedef std::iterator_traits<_IIter2> _IIterTraits2;
typedef std::iterator_traits<_OutputIterator> _OIterTraits;
typedef typename _IIterTraits1::iterator_category
_IIterCategory1;
typedef typename _IIterTraits2::iterator_category
_IIterCategory2;
typedef typename _OIterTraits::iterator_category _OIterCategory;
typedef typename _IIterTraits1::value_type _ValueType1;
typedef typename _IIterTraits2::value_type _ValueType2;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __set_union_switch(
__begin1, __end1, __begin2, __end2, __out,
__gnu_parallel::_Less<_ValueType1, _ValueType2>(),
_IIterCategory1(), _IIterCategory2(), _OIterCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator, typename _Predicate>
inline _OutputIterator
set_union(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _IIter2 __end2,
_OutputIterator __out, _Predicate __pred)
{
typedef std::iterator_traits<_IIter1> _IIterTraits1;
typedef std::iterator_traits<_IIter2> _IIterTraits2;
typedef std::iterator_traits<_OutputIterator> _OIterTraits;
typedef typename _IIterTraits1::iterator_category
_IIterCategory1;
typedef typename _IIterTraits2::iterator_category
_IIterCategory2;
typedef typename _OIterTraits::iterator_category _OIterCategory;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __set_union_switch(
__begin1, __end1, __begin2, __end2, __out, __pred,
_IIterCategory1(), _IIterCategory2(), _OIterCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator>
inline _OutputIterator
set_intersection(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _IIter2 __end2,
_OutputIterator __out, __gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::set_intersection(__begin1, __end1,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__begin2, __end2, __out); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator, typename _Predicate>
inline _OutputIterator
set_intersection(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _IIter2 __end2,
_OutputIterator __out, _Predicate __pred,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::set_intersection(
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__begin1, __end1, __begin2, __end2, __out, __pred); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _Predicate, typename _OutputIterator,
typename _IteratorTag1, typename _IteratorTag2,
typename _IteratorTag3>
inline _OutputIterator
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__set_intersection_switch(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _IIter2 __end2,
_OutputIterator __result, _Predicate __pred,
_IteratorTag1, _IteratorTag2, _IteratorTag3)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::set_intersection(__begin1, __end1, __begin2,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__end2, __result, __pred); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel set_intersection for random access iterators
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter1, typename _RAIter2,
typename _Output_RAIter, typename _Predicate>
_Output_RAIter
__set_intersection_switch(_RAIter1 __begin1,
_RAIter1 __end1,
_RAIter2 __begin2,
_RAIter2 __end2,
_Output_RAIter __result,
_Predicate __pred,
random_access_iterator_tag,
random_access_iterator_tag,
random_access_iterator_tag)
{
multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. 2008-01-09 Paolo Carlini <pcarlini@suse.de> * include/parallel/multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. * include/parallel/losertree.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/tree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/algo.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/random_number.h: Likewise. From-SVN: r131440
2008-01-10 03:07:41 +01:00
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1)
>= __gnu_parallel::_Settings::get().set_union_minimal_n
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
|| static_cast<__gnu_parallel::_SequenceIndex>(__end2 - __begin2)
>= __gnu_parallel::_Settings::get().set_union_minimal_n))
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __gnu_parallel::__parallel_set_intersection(
__begin1, __end1, __begin2, __end2, __result, __pred);
else
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
return _GLIBCXX_STD_A::set_intersection(
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__begin1, __end1, __begin2, __end2, __result, __pred);
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator>
inline _OutputIterator
set_intersection(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _IIter2 __end2,
_OutputIterator __out)
{
typedef std::iterator_traits<_IIter1> _IIterTraits1;
typedef std::iterator_traits<_IIter2> _IIterTraits2;
typedef std::iterator_traits<_OutputIterator> _OIterTraits;
typedef typename _IIterTraits1::iterator_category
_IIterCategory1;
typedef typename _IIterTraits2::iterator_category
_IIterCategory2;
typedef typename _OIterTraits::iterator_category _OIterCategory;
typedef typename _IIterTraits1::value_type _ValueType1;
typedef typename _IIterTraits2::value_type _ValueType2;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __set_intersection_switch(
__begin1, __end1, __begin2, __end2, __out,
__gnu_parallel::_Less<_ValueType1, _ValueType2>(),
_IIterCategory1(), _IIterCategory2(), _OIterCategory());
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
}
template<typename _IIter1, typename _IIter2,
typename _OutputIterator, typename _Predicate>
inline _OutputIterator
set_intersection(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _IIter2 __end2,
_OutputIterator __out, _Predicate __pred)
{
typedef std::iterator_traits<_IIter1> _IIterTraits1;
typedef std::iterator_traits<_IIter2> _IIterTraits2;
typedef std::iterator_traits<_OutputIterator> _OIterTraits;
typedef typename _IIterTraits1::iterator_category
_IIterCategory1;
typedef typename _IIterTraits2::iterator_category
_IIterCategory2;
typedef typename _OIterTraits::iterator_category _OIterCategory;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __set_intersection_switch(
__begin1, __end1, __begin2, __end2, __out, __pred,
_IIterCategory1(), _IIterCategory2(), _OIterCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator>
inline _OutputIterator
set_symmetric_difference(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _IIter2 __end2,
_OutputIterator __out,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::set_symmetric_difference(
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__begin1, __end1, __begin2, __end2, __out); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator, typename _Predicate>
inline _OutputIterator
set_symmetric_difference(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _IIter2 __end2,
_OutputIterator __out, _Predicate __pred,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::set_symmetric_difference(
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__begin1, __end1, __begin2, __end2, __out, __pred); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _Predicate, typename _OutputIterator,
typename _IteratorTag1, typename _IteratorTag2,
typename _IteratorTag3>
inline _OutputIterator
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__set_symmetric_difference_switch(
_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _IIter2 __end2,
_OutputIterator __result, _Predicate __pred,
_IteratorTag1, _IteratorTag2, _IteratorTag3)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::set_symmetric_difference(
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__begin1, __end1, __begin2, __end2, __result, __pred); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel set_symmetric_difference for random access iterators
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter1, typename _RAIter2,
typename _Output_RAIter, typename _Predicate>
_Output_RAIter
__set_symmetric_difference_switch(_RAIter1 __begin1,
_RAIter1 __end1,
_RAIter2 __begin2,
_RAIter2 __end2,
_Output_RAIter __result,
_Predicate __pred,
random_access_iterator_tag,
random_access_iterator_tag,
random_access_iterator_tag)
{
multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. 2008-01-09 Paolo Carlini <pcarlini@suse.de> * include/parallel/multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. * include/parallel/losertree.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/tree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/algo.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/random_number.h: Likewise. From-SVN: r131440
2008-01-10 03:07:41 +01:00
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1)
>= __gnu_parallel::_Settings::get().set_symmetric_difference_minimal_n
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
|| static_cast<__gnu_parallel::_SequenceIndex>(__end2 - __begin2)
>= __gnu_parallel::_Settings::get().set_symmetric_difference_minimal_n))
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __gnu_parallel::__parallel_set_symmetric_difference(
__begin1, __end1, __begin2, __end2, __result, __pred);
else
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
return _GLIBCXX_STD_A::set_symmetric_difference(
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__begin1, __end1, __begin2, __end2, __result, __pred);
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator>
inline _OutputIterator
set_symmetric_difference(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _IIter2 __end2,
_OutputIterator __out)
{
typedef std::iterator_traits<_IIter1> _IIterTraits1;
typedef std::iterator_traits<_IIter2> _IIterTraits2;
typedef std::iterator_traits<_OutputIterator> _OIterTraits;
typedef typename _IIterTraits1::iterator_category
_IIterCategory1;
typedef typename _IIterTraits2::iterator_category
_IIterCategory2;
typedef typename _OIterTraits::iterator_category _OIterCategory;
typedef typename _IIterTraits1::value_type _ValueType1;
typedef typename _IIterTraits2::value_type _ValueType2;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __set_symmetric_difference_switch(
__begin1, __end1, __begin2, __end2, __out,
__gnu_parallel::_Less<_ValueType1, _ValueType2>(),
_IIterCategory1(), _IIterCategory2(), _OIterCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator, typename _Predicate>
inline _OutputIterator
set_symmetric_difference(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _IIter2 __end2,
_OutputIterator __out, _Predicate __pred)
{
typedef std::iterator_traits<_IIter1> _IIterTraits1;
typedef std::iterator_traits<_IIter2> _IIterTraits2;
typedef std::iterator_traits<_OutputIterator> _OIterTraits;
typedef typename _IIterTraits1::iterator_category
_IIterCategory1;
typedef typename _IIterTraits2::iterator_category
_IIterCategory2;
typedef typename _OIterTraits::iterator_category _OIterCategory;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __set_symmetric_difference_switch(
__begin1, __end1, __begin2, __end2, __out, __pred,
_IIterCategory1(), _IIterCategory2(), _OIterCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator>
inline _OutputIterator
set_difference(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _IIter2 __end2,
_OutputIterator __out, __gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::set_difference(
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__begin1,__end1, __begin2, __end2, __out); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator, typename _Predicate>
inline _OutputIterator
set_difference(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _IIter2 __end2,
_OutputIterator __out, _Predicate __pred,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::set_difference(__begin1, __end1,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__begin2, __end2, __out, __pred); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case.
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _IIter1, typename _IIter2, typename _Predicate,
typename _OutputIterator, typename _IteratorTag1,
typename _IteratorTag2, typename _IteratorTag3>
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
inline _OutputIterator
__set_difference_switch(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _IIter2 __end2,
_OutputIterator __result, _Predicate __pred,
_IteratorTag1, _IteratorTag2, _IteratorTag3)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::set_difference(
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__begin1, __end1, __begin2, __end2, __result, __pred); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel set_difference for random access iterators
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter1, typename _RAIter2,
typename _Output_RAIter, typename _Predicate>
_Output_RAIter
__set_difference_switch(_RAIter1 __begin1,
_RAIter1 __end1,
_RAIter2 __begin2,
_RAIter2 __end2,
_Output_RAIter __result, _Predicate __pred,
random_access_iterator_tag,
random_access_iterator_tag,
random_access_iterator_tag)
{
multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. 2008-01-09 Paolo Carlini <pcarlini@suse.de> * include/parallel/multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. * include/parallel/losertree.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/tree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/algo.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/random_number.h: Likewise. From-SVN: r131440
2008-01-10 03:07:41 +01:00
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1)
>= __gnu_parallel::_Settings::get().set_difference_minimal_n
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
|| static_cast<__gnu_parallel::_SequenceIndex>(__end2 - __begin2)
>= __gnu_parallel::_Settings::get().set_difference_minimal_n))
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __gnu_parallel::__parallel_set_difference(
__begin1, __end1, __begin2, __end2, __result, __pred);
else
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
return _GLIBCXX_STD_A::set_difference(
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__begin1, __end1, __begin2, __end2, __result, __pred);
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator>
inline _OutputIterator
set_difference(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _IIter2 __end2,
_OutputIterator __out)
{
typedef std::iterator_traits<_IIter1> _IIterTraits1;
typedef std::iterator_traits<_IIter2> _IIterTraits2;
typedef std::iterator_traits<_OutputIterator> _OIterTraits;
typedef typename _IIterTraits1::iterator_category
_IIterCategory1;
typedef typename _IIterTraits2::iterator_category
_IIterCategory2;
typedef typename _OIterTraits::iterator_category _OIterCategory;
typedef typename _IIterTraits1::value_type _ValueType1;
typedef typename _IIterTraits2::value_type _ValueType2;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __set_difference_switch(
__begin1, __end1, __begin2, __end2, __out,
__gnu_parallel::_Less<_ValueType1, _ValueType2>(),
_IIterCategory1(), _IIterCategory2(), _OIterCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator, typename _Predicate>
inline _OutputIterator
set_difference(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _IIter2 __end2,
_OutputIterator __out, _Predicate __pred)
{
typedef std::iterator_traits<_IIter1> _IIterTraits1;
typedef std::iterator_traits<_IIter2> _IIterTraits2;
typedef std::iterator_traits<_OutputIterator> _OIterTraits;
typedef typename _IIterTraits1::iterator_category
_IIterCategory1;
typedef typename _IIterTraits2::iterator_category
_IIterCategory2;
typedef typename _OIterTraits::iterator_category _OIterCategory;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __set_difference_switch(
__begin1, __end1, __begin2, __end2, __out, __pred,
_IIterCategory1(), _IIterCategory2(), _OIterCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator>
inline _FIterator
adjacent_find(_FIterator __begin, _FIterator __end,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::adjacent_find(__begin, __end); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _BinaryPredicate>
inline _FIterator
adjacent_find(_FIterator __begin, _FIterator __end,
_BinaryPredicate __binary_pred,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::adjacent_find(__begin, __end, __binary_pred); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel algorithm for random access iterators
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
_RAIter
__adjacent_find_switch(_RAIter __begin, _RAIter __end,
random_access_iterator_tag)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
if (_GLIBCXX_PARALLEL_CONDITION(true))
{
_RAIter __spot = __gnu_parallel::
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__find_template(
__begin, __end - 1, __begin, equal_to<_ValueType>(),
__gnu_parallel::__adjacent_find_selector())
.first;
if (__spot == (__end - 1))
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
return __end;
else
return __spot;
}
else
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
return adjacent_find(__begin, __end, __gnu_parallel::sequential_tag());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _IteratorTag>
inline _FIterator
__adjacent_find_switch(_FIterator __begin, _FIterator __end,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_IteratorTag)
{ return adjacent_find(__begin, __end, __gnu_parallel::sequential_tag()); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator>
inline _FIterator
adjacent_find(_FIterator __begin, _FIterator __end)
{
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
typedef iterator_traits<_FIterator> _TraitsType;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef typename _TraitsType::iterator_category _IteratorCategory;
return __adjacent_find_switch(__begin, __end, _IteratorCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _BinaryPredicate,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typename _IteratorTag>
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
inline _FIterator
__adjacent_find_switch(_FIterator __begin, _FIterator __end,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_BinaryPredicate __pred, _IteratorTag)
{ return adjacent_find(__begin, __end, __pred,
__gnu_parallel::sequential_tag()); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel algorithm for random access iterators
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _BinaryPredicate>
_RAIter
__adjacent_find_switch(_RAIter __begin, _RAIter __end,
_BinaryPredicate __pred, random_access_iterator_tag)
{
if (_GLIBCXX_PARALLEL_CONDITION(true))
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __gnu_parallel::__find_template(__begin, __end, __begin, __pred,
__gnu_parallel::
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__adjacent_find_selector()).first;
else
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
return adjacent_find(__begin, __end, __pred,
__gnu_parallel::sequential_tag());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _BinaryPredicate>
inline _FIterator
adjacent_find(_FIterator __begin, _FIterator __end,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_BinaryPredicate __pred)
{
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
typedef iterator_traits<_FIterator> _TraitsType;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef typename _TraitsType::iterator_category _IteratorCategory;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __adjacent_find_switch(__begin, __end, __pred,
_IteratorCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _Tp>
inline typename iterator_traits<_IIter>::difference_type
count(_IIter __begin, _IIter __end, const _Tp& __value,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::count(__begin, __end, __value); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel code for random access iterators
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Tp>
typename iterator_traits<_RAIter>::difference_type
__count_switch(_RAIter __begin, _RAIter __end,
const _Tp& __value, random_access_iterator_tag,
__gnu_parallel::_Parallelism __parallelism_tag
= __gnu_parallel::parallel_unbalanced)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
typedef typename _TraitsType::difference_type _DifferenceType;
typedef __gnu_parallel::_SequenceIndex _SequenceIndex;
multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. 2008-01-09 Paolo Carlini <pcarlini@suse.de> * include/parallel/multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. * include/parallel/losertree.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/tree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/algo.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/random_number.h: Likewise. From-SVN: r131440
2008-01-10 03:07:41 +01:00
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
static_cast<_SequenceIndex>(__end - __begin)
>= __gnu_parallel::_Settings::get().count_minimal_n
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
&& __gnu_parallel::__is_parallel(__parallelism_tag)))
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__gnu_parallel::__count_selector<_RAIter, _DifferenceType>
__functionality;
_DifferenceType __res = 0;
__gnu_parallel::
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__for_each_template_random_access(
__begin, __end, __value, __functionality,
std::plus<_SequenceIndex>(), __res, __res, -1,
__parallelism_tag);
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
return __res;
}
else
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return count(__begin, __end, __value,
__gnu_parallel::sequential_tag());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _Tp, typename _IteratorTag>
inline typename iterator_traits<_IIter>::difference_type
__count_switch(_IIter __begin, _IIter __end, const _Tp& __value,
_IteratorTag)
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
{ return count(__begin, __end, __value, __gnu_parallel::sequential_tag());
}
// Public interface.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _Tp>
inline typename iterator_traits<_IIter>::difference_type
count(_IIter __begin, _IIter __end, const _Tp& __value,
__gnu_parallel::_Parallelism __parallelism_tag)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_IIter> _TraitsType;
typedef typename _TraitsType::iterator_category _IteratorCategory;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __count_switch(__begin, __end, __value, _IteratorCategory(),
__parallelism_tag);
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _Tp>
inline typename iterator_traits<_IIter>::difference_type
count(_IIter __begin, _IIter __end, const _Tp& __value)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_IIter> _TraitsType;
typedef typename _TraitsType::iterator_category _IteratorCategory;
return __count_switch(__begin, __end, __value, _IteratorCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _Predicate>
inline typename iterator_traits<_IIter>::difference_type
count_if(_IIter __begin, _IIter __end, _Predicate __pred,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::count_if(__begin, __end, __pred); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel count_if for random access iterators
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Predicate>
typename iterator_traits<_RAIter>::difference_type
__count_if_switch(_RAIter __begin, _RAIter __end,
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
_Predicate __pred, random_access_iterator_tag,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__gnu_parallel::_Parallelism __parallelism_tag
= __gnu_parallel::parallel_unbalanced)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
typedef typename _TraitsType::difference_type _DifferenceType;
typedef __gnu_parallel::_SequenceIndex _SequenceIndex;
multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. 2008-01-09 Paolo Carlini <pcarlini@suse.de> * include/parallel/multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. * include/parallel/losertree.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/tree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/algo.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/random_number.h: Likewise. From-SVN: r131440
2008-01-10 03:07:41 +01:00
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
static_cast<_SequenceIndex>(__end - __begin)
>= __gnu_parallel::_Settings::get().count_minimal_n
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
&& __gnu_parallel::__is_parallel(__parallelism_tag)))
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_DifferenceType __res = 0;
__gnu_parallel::
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__count_if_selector<_RAIter, _DifferenceType>
__functionality;
__gnu_parallel::
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__for_each_template_random_access(
__begin, __end, __pred, __functionality,
std::plus<_SequenceIndex>(), __res, __res, -1,
__parallelism_tag);
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
return __res;
}
else
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return count_if(__begin, __end, __pred,
__gnu_parallel::sequential_tag());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _Predicate, typename _IteratorTag>
inline typename iterator_traits<_IIter>::difference_type
__count_if_switch(_IIter __begin, _IIter __end, _Predicate __pred,
_IteratorTag)
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
{ return count_if(__begin, __end, __pred,
__gnu_parallel::sequential_tag()); }
// Public interface.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _Predicate>
inline typename iterator_traits<_IIter>::difference_type
count_if(_IIter __begin, _IIter __end, _Predicate __pred,
__gnu_parallel::_Parallelism __parallelism_tag)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_IIter> _TraitsType;
typedef typename _TraitsType::iterator_category _IteratorCategory;
return __count_if_switch(__begin, __end, __pred, _IteratorCategory(),
__parallelism_tag);
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _Predicate>
inline typename iterator_traits<_IIter>::difference_type
count_if(_IIter __begin, _IIter __end, _Predicate __pred)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_IIter> _TraitsType;
typedef typename _TraitsType::iterator_category _IteratorCategory;
return __count_if_switch(__begin, __end, __pred, _IteratorCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback.
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator1, typename _FIterator2>
inline _FIterator1
search(_FIterator1 __begin1, _FIterator1 __end1,
_FIterator2 __begin2, _FIterator2 __end2,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::search(__begin1, __end1, __begin2, __end2); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel algorithm for random access iterator
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter1, typename _RAIter2>
_RAIter1
__search_switch(_RAIter1 __begin1, _RAIter1 __end1,
_RAIter2 __begin2, _RAIter2 __end2,
random_access_iterator_tag, random_access_iterator_tag)
{
typedef std::iterator_traits<_RAIter1> _Iterator1Traits;
typedef typename _Iterator1Traits::value_type _ValueType1;
typedef std::iterator_traits<_RAIter2> _Iterator2Traits;
typedef typename _Iterator2Traits::value_type _ValueType2;
if (_GLIBCXX_PARALLEL_CONDITION(
static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1)
>= __gnu_parallel::_Settings::get().search_minimal_n))
return __gnu_parallel::
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__search_template(
__begin1, __end1, __begin2, __end2,
__gnu_parallel::_EqualTo<_ValueType1, _ValueType2>());
else
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
return search(__begin1, __end1, __begin2, __end2,
__gnu_parallel::sequential_tag());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator1, typename _FIterator2,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typename _IteratorTag1, typename _IteratorTag2>
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
inline _FIterator1
__search_switch(_FIterator1 __begin1, _FIterator1 __end1,
_FIterator2 __begin2, _FIterator2 __end2,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_IteratorTag1, _IteratorTag2)
{ return search(__begin1, __end1, __begin2, __end2,
__gnu_parallel::sequential_tag()); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface.
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator1, typename _FIterator2>
inline _FIterator1
search(_FIterator1 __begin1, _FIterator1 __end1,
_FIterator2 __begin2, _FIterator2 __end2)
{
typedef std::iterator_traits<_FIterator1> _Iterator1Traits;
typedef typename _Iterator1Traits::iterator_category _IteratorCategory1;
typedef std::iterator_traits<_FIterator2> _Iterator2Traits;
typedef typename _Iterator2Traits::iterator_category _IteratorCategory2;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
return __search_switch(__begin1, __end1, __begin2, __end2,
_IteratorCategory1(), _IteratorCategory2());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface.
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator1, typename _FIterator2,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typename _BinaryPredicate>
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
inline _FIterator1
search(_FIterator1 __begin1, _FIterator1 __end1,
_FIterator2 __begin2, _FIterator2 __end2,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_BinaryPredicate __pred, __gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::search(
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__begin1, __end1, __begin2, __end2, __pred); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel algorithm for random access iterator.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter1, typename _RAIter2,
typename _BinaryPredicate>
_RAIter1
__search_switch(_RAIter1 __begin1, _RAIter1 __end1,
_RAIter2 __begin2, _RAIter2 __end2,
_BinaryPredicate __pred,
random_access_iterator_tag, random_access_iterator_tag)
{
if (_GLIBCXX_PARALLEL_CONDITION(
static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1)
>= __gnu_parallel::_Settings::get().search_minimal_n))
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
return __gnu_parallel::__search_template(__begin1, __end1,
__begin2, __end2, __pred);
else
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
return search(__begin1, __end1, __begin2, __end2, __pred,
__gnu_parallel::sequential_tag());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator1, typename _FIterator2,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typename _BinaryPredicate, typename _IteratorTag1,
typename _IteratorTag2>
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
inline _FIterator1
__search_switch(_FIterator1 __begin1, _FIterator1 __end1,
_FIterator2 __begin2, _FIterator2 __end2,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_BinaryPredicate __pred, _IteratorTag1, _IteratorTag2)
{ return search(__begin1, __end1, __begin2, __end2, __pred,
__gnu_parallel::sequential_tag()); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator1, typename _FIterator2,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typename _BinaryPredicate>
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
inline _FIterator1
search(_FIterator1 __begin1, _FIterator1 __end1,
_FIterator2 __begin2, _FIterator2 __end2,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_BinaryPredicate __pred)
{
typedef std::iterator_traits<_FIterator1> _Iterator1Traits;
typedef typename _Iterator1Traits::iterator_category _IteratorCategory1;
typedef std::iterator_traits<_FIterator2> _Iterator2Traits;
typedef typename _Iterator2Traits::iterator_category _IteratorCategory2;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
return __search_switch(__begin1, __end1, __begin2, __end2, __pred,
_IteratorCategory1(), _IteratorCategory2());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Integer, typename _Tp>
inline _FIterator
search_n(_FIterator __begin, _FIterator __end, _Integer __count,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
const _Tp& __val, __gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::search_n(__begin, __end, __count, __val); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Integer, typename _Tp,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typename _BinaryPredicate>
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
inline _FIterator
search_n(_FIterator __begin, _FIterator __end, _Integer __count,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
const _Tp& __val, _BinaryPredicate __binary_pred,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::search_n(
__begin, __end, __count, __val, __binary_pred); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface.
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Integer, typename _Tp>
inline _FIterator
search_n(_FIterator __begin, _FIterator __end, _Integer __count,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
const _Tp& __val)
{
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
typedef typename iterator_traits<_FIterator>::value_type _ValueType;
return __gnu_parallel::search_n(__begin, __end, __count, __val,
__gnu_parallel::_EqualTo<_ValueType, _Tp>());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel algorithm for random access iterators.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Integer,
typename _Tp, typename _BinaryPredicate>
_RAIter
__search_n_switch(_RAIter __begin, _RAIter __end, _Integer __count,
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
const _Tp& __val, _BinaryPredicate __binary_pred,
random_access_iterator_tag)
{
if (_GLIBCXX_PARALLEL_CONDITION(
static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin)
>= __gnu_parallel::_Settings::get().search_minimal_n))
{
__gnu_parallel::_PseudoSequence<_Tp, _Integer> __ps(__val, __count);
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __gnu_parallel::__search_template(
__begin, __end, __ps.begin(), __ps.end(), __binary_pred);
}
else
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
return _GLIBCXX_STD_A::search_n(__begin, __end, __count, __val,
__binary_pred);
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case.
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Integer, typename _Tp,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typename _BinaryPredicate, typename _IteratorTag>
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
inline _FIterator
__search_n_switch(_FIterator __begin, _FIterator __end, _Integer __count,
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
const _Tp& __val, _BinaryPredicate __binary_pred,
_IteratorTag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::search_n(__begin, __end, __count, __val,
__binary_pred); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface.
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Integer, typename _Tp,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typename _BinaryPredicate>
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
inline _FIterator
search_n(_FIterator __begin, _FIterator __end, _Integer __count,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
const _Tp& __val, _BinaryPredicate __binary_pred)
{
return __search_n_switch(__begin, __end, __count, __val, __binary_pred,
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
typename std::iterator_traits<_FIterator>::
iterator_category());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _OutputIterator,
typename _UnaryOperation>
inline _OutputIterator
transform(_IIter __begin, _IIter __end, _OutputIterator __result,
_UnaryOperation __unary_op, __gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::transform(__begin, __end, __result, __unary_op); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel unary transform for random access iterators.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter1, typename _RAIter2,
typename _UnaryOperation>
_RAIter2
__transform1_switch(_RAIter1 __begin, _RAIter1 __end,
_RAIter2 __result, _UnaryOperation __unary_op,
random_access_iterator_tag, random_access_iterator_tag,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__gnu_parallel::_Parallelism __parallelism_tag
= __gnu_parallel::parallel_balanced)
{
multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. 2008-01-09 Paolo Carlini <pcarlini@suse.de> * include/parallel/multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. * include/parallel/losertree.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/tree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/algo.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/random_number.h: Likewise. From-SVN: r131440
2008-01-10 03:07:41 +01:00
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin)
>= __gnu_parallel::_Settings::get().transform_minimal_n
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
&& __gnu_parallel::__is_parallel(__parallelism_tag)))
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
bool __dummy = true;
typedef __gnu_parallel::_IteratorPair<_RAIter1,
_RAIter2, random_access_iterator_tag> _ItTrip;
_ItTrip __begin_pair(__begin, __result),
__end_pair(__end, __result + (__end - __begin));
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__gnu_parallel::__transform1_selector<_ItTrip> __functionality;
__gnu_parallel::
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__for_each_template_random_access(
__begin_pair, __end_pair, __unary_op, __functionality,
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__gnu_parallel::_DummyReduct(),
__dummy, __dummy, -1, __parallelism_tag);
base.h (_EqualFromLess): Correct uglification of member variables and method arguments. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/base.h (_EqualFromLess): Correct uglification of member variables and method arguments. * include/parallel/balanced_quicksort.h (_QSBThreadLocal): Likewise. * include/parallel/find_selectors.h (__find_first_of_selector): Likewise. * include/parallel/iterator.h (_IteratorTriple): Likewise. * include/parallel/multiseq_selection.h (_Lexicographic, _LexicographicReverse): Likewise. * include/parallel/multiway_mergesort.h (_Piece, _PMWMSSortingData): Likewise. * include/parallel/random_number.h (_RandomNumber): Likewise. * include/parallel/random_shuffle.h (_DRandomShufflingGlobalData): Likewise. * include/parallel/set_operations.h (__symmetric_difference_func, __difference_func, __intersection_func, __union_func, parallel_set_union, parallel_set_intersection, parallel_set_difference, parallel_set_symmetric_difference): Likewise. * include/parallel/tags.h (parallel_tag): Likewise. * include/parallel/workstealing.h (_Job): Likewise. * include/parallel/multiway_merge.h (__multiway_merge_k_variant_sentinel_switch:operator()) correct uglification of _*LoserTree*. * include/parallel/losertree.h (_*LoserTree*): Likewise; correct uglification of member variables and method arguments. * include/parallel/par_loop.h: Correct uglification of finish_iterator. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/algo.h: Likewise; uglify c_rand_number. From-SVN: r151754
2009-09-16 15:50:17 +02:00
return __functionality._M_finish_iterator;
}
else
return transform(__begin, __end, __result, __unary_op,
__gnu_parallel::sequential_tag());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter1, typename _RAIter2,
typename _UnaryOperation, typename _IteratorTag1,
typename _IteratorTag2>
inline _RAIter2
__transform1_switch(_RAIter1 __begin, _RAIter1 __end,
_RAIter2 __result, _UnaryOperation __unary_op,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_IteratorTag1, _IteratorTag2)
{ return transform(__begin, __end, __result, __unary_op,
__gnu_parallel::sequential_tag()); }
// Public interface.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _OutputIterator,
typename _UnaryOperation>
inline _OutputIterator
transform(_IIter __begin, _IIter __end, _OutputIterator __result,
_UnaryOperation __unary_op,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__gnu_parallel::_Parallelism __parallelism_tag)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef std::iterator_traits<_IIter> _IIterTraits;
typedef std::iterator_traits<_OutputIterator> _OIterTraits;
typedef typename _IIterTraits::iterator_category _IIteratorCategory;
typedef typename _OIterTraits::iterator_category _OIterCategory;
return __transform1_switch(__begin, __end, __result, __unary_op,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_IIteratorCategory(), _OIterCategory(),
__parallelism_tag);
}
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter, typename _OutputIterator,
typename _UnaryOperation>
inline _OutputIterator
transform(_IIter __begin, _IIter __end, _OutputIterator __result,
_UnaryOperation __unary_op)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef std::iterator_traits<_IIter> _IIterTraits;
typedef std::iterator_traits<_OutputIterator> _OIterTraits;
typedef typename _IIterTraits::iterator_category _IIteratorCategory;
typedef typename _OIterTraits::iterator_category _OIterCategory;
return __transform1_switch(__begin, __end, __result, __unary_op,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_IIteratorCategory(), _OIterCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator, typename _BinaryOperation>
inline _OutputIterator
transform(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _OutputIterator __result,
_BinaryOperation __binary_op, __gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::transform(__begin1, __end1,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__begin2, __result, __binary_op); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel binary transform for random access iterators.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter1, typename _RAIter2,
typename _RAIter3, typename _BinaryOperation>
_RAIter3
__transform2_switch(_RAIter1 __begin1, _RAIter1 __end1,
_RAIter2 __begin2,
_RAIter3 __result, _BinaryOperation __binary_op,
random_access_iterator_tag, random_access_iterator_tag,
random_access_iterator_tag,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__gnu_parallel::_Parallelism __parallelism_tag
= __gnu_parallel::parallel_balanced)
{
multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. 2008-01-09 Paolo Carlini <pcarlini@suse.de> * include/parallel/multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. * include/parallel/losertree.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/tree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/algo.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/random_number.h: Likewise. From-SVN: r131440
2008-01-10 03:07:41 +01:00
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
(__end1 - __begin1) >=
__gnu_parallel::_Settings::get().transform_minimal_n
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
&& __gnu_parallel::__is_parallel(__parallelism_tag)))
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
bool __dummy = true;
typedef __gnu_parallel::_IteratorTriple<_RAIter1,
_RAIter2, _RAIter3,
random_access_iterator_tag> _ItTrip;
_ItTrip __begin_triple(__begin1, __begin2, __result),
__end_triple(__end1, __begin2 + (__end1 - __begin1),
__result + (__end1 - __begin1));
__gnu_parallel::__transform2_selector<_ItTrip> __functionality;
__gnu_parallel::
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__for_each_template_random_access(__begin_triple, __end_triple,
__binary_op, __functionality,
__gnu_parallel::_DummyReduct(),
__dummy, __dummy, -1,
__parallelism_tag);
base.h (_EqualFromLess): Correct uglification of member variables and method arguments. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/base.h (_EqualFromLess): Correct uglification of member variables and method arguments. * include/parallel/balanced_quicksort.h (_QSBThreadLocal): Likewise. * include/parallel/find_selectors.h (__find_first_of_selector): Likewise. * include/parallel/iterator.h (_IteratorTriple): Likewise. * include/parallel/multiseq_selection.h (_Lexicographic, _LexicographicReverse): Likewise. * include/parallel/multiway_mergesort.h (_Piece, _PMWMSSortingData): Likewise. * include/parallel/random_number.h (_RandomNumber): Likewise. * include/parallel/random_shuffle.h (_DRandomShufflingGlobalData): Likewise. * include/parallel/set_operations.h (__symmetric_difference_func, __difference_func, __intersection_func, __union_func, parallel_set_union, parallel_set_intersection, parallel_set_difference, parallel_set_symmetric_difference): Likewise. * include/parallel/tags.h (parallel_tag): Likewise. * include/parallel/workstealing.h (_Job): Likewise. * include/parallel/multiway_merge.h (__multiway_merge_k_variant_sentinel_switch:operator()) correct uglification of _*LoserTree*. * include/parallel/losertree.h (_*LoserTree*): Likewise; correct uglification of member variables and method arguments. * include/parallel/par_loop.h: Correct uglification of finish_iterator. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/algo.h: Likewise; uglify c_rand_number. From-SVN: r151754
2009-09-16 15:50:17 +02:00
return __functionality._M_finish_iterator;
}
else
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
return transform(__begin1, __end1, __begin2, __result, __binary_op,
__gnu_parallel::sequential_tag());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator, typename _BinaryOperation,
typename _Tag1, typename _Tag2, typename _Tag3>
inline _OutputIterator
__transform2_switch(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _OutputIterator __result,
_BinaryOperation __binary_op, _Tag1, _Tag2, _Tag3)
{ return transform(__begin1, __end1, __begin2, __result, __binary_op,
__gnu_parallel::sequential_tag()); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator, typename _BinaryOperation>
inline _OutputIterator
transform(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _OutputIterator __result,
_BinaryOperation __binary_op,
__gnu_parallel::_Parallelism __parallelism_tag)
{
typedef std::iterator_traits<_IIter1> _IIterTraits1;
typedef typename _IIterTraits1::iterator_category
_IIterCategory1;
typedef std::iterator_traits<_IIter2> _IIterTraits2;
typedef typename _IIterTraits2::iterator_category
_IIterCategory2;
typedef std::iterator_traits<_OutputIterator> _OIterTraits;
typedef typename _OIterTraits::iterator_category _OIterCategory;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __transform2_switch(
__begin1, __end1, __begin2, __result, __binary_op,
_IIterCategory1(), _IIterCategory2(), _OIterCategory(),
__parallelism_tag);
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
}
template<typename _IIter1, typename _IIter2,
typename _OutputIterator, typename _BinaryOperation>
inline _OutputIterator
transform(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _OutputIterator __result,
_BinaryOperation __binary_op)
{
typedef std::iterator_traits<_IIter1> _IIterTraits1;
typedef typename _IIterTraits1::iterator_category
_IIterCategory1;
typedef std::iterator_traits<_IIter2> _IIterTraits2;
typedef typename _IIterTraits2::iterator_category
_IIterCategory2;
typedef std::iterator_traits<_OutputIterator> _OIterTraits;
typedef typename _OIterTraits::iterator_category _OIterCategory;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __transform2_switch(
__begin1, __end1, __begin2, __result, __binary_op,
_IIterCategory1(), _IIterCategory2(), _OIterCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Tp>
inline void
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
replace(_FIterator __begin, _FIterator __end, const _Tp& __old_value,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
const _Tp& __new_value, __gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ _GLIBCXX_STD_A::replace(__begin, __end, __old_value, __new_value); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Tp, typename _IteratorTag>
inline void
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__replace_switch(_FIterator __begin, _FIterator __end,
const _Tp& __old_value, const _Tp& __new_value,
_IteratorTag)
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
{ replace(__begin, __end, __old_value, __new_value,
__gnu_parallel::sequential_tag()); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel replace for random access iterators
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Tp>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__replace_switch(_RAIter __begin, _RAIter __end,
const _Tp& __old_value, const _Tp& __new_value,
random_access_iterator_tag,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__gnu_parallel::_Parallelism __parallelism_tag
= __gnu_parallel::parallel_balanced)
{
// XXX parallel version is where?
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
replace(__begin, __end, __old_value, __new_value,
__gnu_parallel::sequential_tag());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Tp>
inline void
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
replace(_FIterator __begin, _FIterator __end, const _Tp& __old_value,
const _Tp& __new_value,
__gnu_parallel::_Parallelism __parallelism_tag)
{
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
typedef iterator_traits<_FIterator> _TraitsType;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef typename _TraitsType::iterator_category _IteratorCategory;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__replace_switch(__begin, __end, __old_value, __new_value,
_IteratorCategory(),
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__parallelism_tag);
}
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Tp>
inline void
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
replace(_FIterator __begin, _FIterator __end, const _Tp& __old_value,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
const _Tp& __new_value)
{
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
typedef iterator_traits<_FIterator> _TraitsType;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef typename _TraitsType::iterator_category _IteratorCategory;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__replace_switch(__begin, __end, __old_value, __new_value,
_IteratorCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Predicate, typename _Tp>
inline void
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
replace_if(_FIterator __begin, _FIterator __end, _Predicate __pred,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
const _Tp& __new_value, __gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ _GLIBCXX_STD_A::replace_if(__begin, __end, __pred, __new_value); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Predicate, typename _Tp,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typename _IteratorTag>
inline void
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__replace_if_switch(_FIterator __begin, _FIterator __end,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_Predicate __pred, const _Tp& __new_value, _IteratorTag)
{ replace_if(__begin, __end, __pred, __new_value,
__gnu_parallel::sequential_tag()); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel algorithm for random access iterators.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Predicate, typename _Tp>
void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__replace_if_switch(_RAIter __begin, _RAIter __end,
_Predicate __pred, const _Tp& __new_value,
random_access_iterator_tag,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__gnu_parallel::_Parallelism __parallelism_tag
= __gnu_parallel::parallel_balanced)
{
multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. 2008-01-09 Paolo Carlini <pcarlini@suse.de> * include/parallel/multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. * include/parallel/losertree.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/tree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/algo.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/random_number.h: Likewise. From-SVN: r131440
2008-01-10 03:07:41 +01:00
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin)
>= __gnu_parallel::_Settings::get().replace_minimal_n
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
&& __gnu_parallel::__is_parallel(__parallelism_tag)))
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
bool __dummy;
__gnu_parallel::
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__replace_if_selector<_RAIter, _Predicate, _Tp>
__functionality(__new_value);
__gnu_parallel::
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__for_each_template_random_access(
__begin, __end, __pred, __functionality,
__gnu_parallel::_DummyReduct(),
true, __dummy, -1, __parallelism_tag);
}
else
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
replace_if(__begin, __end, __pred, __new_value,
__gnu_parallel::sequential_tag());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface.
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Predicate, typename _Tp>
inline void
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
replace_if(_FIterator __begin, _FIterator __end,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_Predicate __pred, const _Tp& __new_value,
__gnu_parallel::_Parallelism __parallelism_tag)
{
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
typedef std::iterator_traits<_FIterator> _IteratorTraits;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef typename _IteratorTraits::iterator_category _IteratorCategory;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__replace_if_switch(__begin, __end, __pred, __new_value,
_IteratorCategory(), __parallelism_tag);
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Predicate, typename _Tp>
inline void
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
replace_if(_FIterator __begin, _FIterator __end,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_Predicate __pred, const _Tp& __new_value)
{
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
typedef std::iterator_traits<_FIterator> _IteratorTraits;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef typename _IteratorTraits::iterator_category _IteratorCategory;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__replace_if_switch(__begin, __end, __pred, __new_value,
_IteratorCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
template<typename _FIterator, typename _Generator>
inline void
generate(_FIterator __begin, _FIterator __end, _Generator __gen,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ _GLIBCXX_STD_A::generate(__begin, __end, __gen); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case.
template<typename _FIterator, typename _Generator, typename _IteratorTag>
inline void
__generate_switch(_FIterator __begin, _FIterator __end, _Generator __gen,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_IteratorTag)
{ generate(__begin, __end, __gen, __gnu_parallel::sequential_tag()); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel algorithm for random access iterators.
template<typename _RAIter, typename _Generator>
void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__generate_switch(_RAIter __begin, _RAIter __end,
_Generator __gen, random_access_iterator_tag,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__gnu_parallel::_Parallelism __parallelism_tag
= __gnu_parallel::parallel_balanced)
{
multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. 2008-01-09 Paolo Carlini <pcarlini@suse.de> * include/parallel/multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. * include/parallel/losertree.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/tree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/algo.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/random_number.h: Likewise. From-SVN: r131440
2008-01-10 03:07:41 +01:00
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin)
>= __gnu_parallel::_Settings::get().generate_minimal_n
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
&& __gnu_parallel::__is_parallel(__parallelism_tag)))
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
bool __dummy;
__gnu_parallel::__generate_selector<_RAIter>
__functionality;
__gnu_parallel::
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__for_each_template_random_access(
__begin, __end, __gen, __functionality,
__gnu_parallel::_DummyReduct(),
true, __dummy, -1, __parallelism_tag);
}
else
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
generate(__begin, __end, __gen, __gnu_parallel::sequential_tag());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface.
template<typename _FIterator, typename _Generator>
inline void
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
generate(_FIterator __begin, _FIterator __end,
_Generator __gen, __gnu_parallel::_Parallelism __parallelism_tag)
{
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
typedef std::iterator_traits<_FIterator> _IteratorTraits;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef typename _IteratorTraits::iterator_category _IteratorCategory;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__generate_switch(__begin, __end, __gen, _IteratorCategory(),
__parallelism_tag);
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
template<typename _FIterator, typename _Generator>
inline void
generate(_FIterator __begin, _FIterator __end, _Generator __gen)
{
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
typedef std::iterator_traits<_FIterator> _IteratorTraits;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef typename _IteratorTraits::iterator_category _IteratorCategory;
__generate_switch(__begin, __end, __gen, _IteratorCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback.
template<typename _OutputIterator, typename _Size, typename _Generator>
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
inline _OutputIterator
generate_n(_OutputIterator __begin, _Size __n, _Generator __gen,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::generate_n(__begin, __n, __gen); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case.
template<typename _OutputIterator, typename _Size, typename _Generator,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typename _IteratorTag>
inline _OutputIterator
__generate_n_switch(_OutputIterator __begin, _Size __n, _Generator __gen,
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
_IteratorTag)
{ return generate_n(__begin, __n, __gen,
__gnu_parallel::sequential_tag()); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel algorithm for random access iterators.
template<typename _RAIter, typename _Size, typename _Generator>
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
inline _RAIter
__generate_n_switch(_RAIter __begin, _Size __n, _Generator __gen,
random_access_iterator_tag,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__gnu_parallel::_Parallelism __parallelism_tag
= __gnu_parallel::parallel_balanced)
{
// XXX parallel version is where?
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return generate_n(__begin, __n, __gen, __gnu_parallel::sequential_tag());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface.
template<typename _OutputIterator, typename _Size, typename _Generator>
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
inline _OutputIterator
generate_n(_OutputIterator __begin, _Size __n, _Generator __gen,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__gnu_parallel::_Parallelism __parallelism_tag)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef std::iterator_traits<_OutputIterator> _IteratorTraits;
typedef typename _IteratorTraits::iterator_category _IteratorCategory;
return __generate_n_switch(__begin, __n, __gen, _IteratorCategory(),
__parallelism_tag);
}
template<typename _OutputIterator, typename _Size, typename _Generator>
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
inline _OutputIterator
generate_n(_OutputIterator __begin, _Size __n, _Generator __gen)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef std::iterator_traits<_OutputIterator> _IteratorTraits;
typedef typename _IteratorTraits::iterator_category _IteratorCategory;
return __generate_n_switch(__begin, __n, __gen, _IteratorCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
random_shuffle(_RAIter __begin, _RAIter __end,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ _GLIBCXX_STD_A::random_shuffle(__begin, __end); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback.
template<typename _RAIter, typename _RandomNumberGenerator>
inline void
random_shuffle(_RAIter __begin, _RAIter __end,
_RandomNumberGenerator& __rand,
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ _GLIBCXX_STD_A::random_shuffle(__begin, __end, __rand); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
/** @brief Functor wrapper for std::rand(). */
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _MustBeInt = int>
base.h (_EqualFromLess): Correct uglification of member variables and method arguments. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/base.h (_EqualFromLess): Correct uglification of member variables and method arguments. * include/parallel/balanced_quicksort.h (_QSBThreadLocal): Likewise. * include/parallel/find_selectors.h (__find_first_of_selector): Likewise. * include/parallel/iterator.h (_IteratorTriple): Likewise. * include/parallel/multiseq_selection.h (_Lexicographic, _LexicographicReverse): Likewise. * include/parallel/multiway_mergesort.h (_Piece, _PMWMSSortingData): Likewise. * include/parallel/random_number.h (_RandomNumber): Likewise. * include/parallel/random_shuffle.h (_DRandomShufflingGlobalData): Likewise. * include/parallel/set_operations.h (__symmetric_difference_func, __difference_func, __intersection_func, __union_func, parallel_set_union, parallel_set_intersection, parallel_set_difference, parallel_set_symmetric_difference): Likewise. * include/parallel/tags.h (parallel_tag): Likewise. * include/parallel/workstealing.h (_Job): Likewise. * include/parallel/multiway_merge.h (__multiway_merge_k_variant_sentinel_switch:operator()) correct uglification of _*LoserTree*. * include/parallel/losertree.h (_*LoserTree*): Likewise; correct uglification of member variables and method arguments. * include/parallel/par_loop.h: Correct uglification of finish_iterator. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/algo.h: Likewise; uglify c_rand_number. From-SVN: r151754
2009-09-16 15:50:17 +02:00
struct _CRandNumber
{
int
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
operator()(int __limit)
{ return rand() % __limit; }
};
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Fill in random number generator.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
random_shuffle(_RAIter __begin, _RAIter __end)
{
base.h (_EqualFromLess): Correct uglification of member variables and method arguments. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/base.h (_EqualFromLess): Correct uglification of member variables and method arguments. * include/parallel/balanced_quicksort.h (_QSBThreadLocal): Likewise. * include/parallel/find_selectors.h (__find_first_of_selector): Likewise. * include/parallel/iterator.h (_IteratorTriple): Likewise. * include/parallel/multiseq_selection.h (_Lexicographic, _LexicographicReverse): Likewise. * include/parallel/multiway_mergesort.h (_Piece, _PMWMSSortingData): Likewise. * include/parallel/random_number.h (_RandomNumber): Likewise. * include/parallel/random_shuffle.h (_DRandomShufflingGlobalData): Likewise. * include/parallel/set_operations.h (__symmetric_difference_func, __difference_func, __intersection_func, __union_func, parallel_set_union, parallel_set_intersection, parallel_set_difference, parallel_set_symmetric_difference): Likewise. * include/parallel/tags.h (parallel_tag): Likewise. * include/parallel/workstealing.h (_Job): Likewise. * include/parallel/multiway_merge.h (__multiway_merge_k_variant_sentinel_switch:operator()) correct uglification of _*LoserTree*. * include/parallel/losertree.h (_*LoserTree*): Likewise; correct uglification of member variables and method arguments. * include/parallel/par_loop.h: Correct uglification of finish_iterator. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/algo.h: Likewise; uglify c_rand_number. From-SVN: r151754
2009-09-16 15:50:17 +02:00
_CRandNumber<> __r;
// Parallelization still possible.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__gnu_parallel::random_shuffle(__begin, __end, __r);
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel algorithm for random access iterators.
template<typename _RAIter, typename _RandomNumberGenerator>
void
random_shuffle(_RAIter __begin, _RAIter __end,
#if __cplusplus >= 201103L
_RandomNumberGenerator&& __rand)
#else
_RandomNumberGenerator& __rand)
#endif
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
if (__begin == __end)
return;
multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. 2008-01-09 Paolo Carlini <pcarlini@suse.de> * include/parallel/multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. * include/parallel/losertree.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/tree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/algo.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/random_number.h: Likewise. From-SVN: r131440
2008-01-10 03:07:41 +01:00
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin)
>= __gnu_parallel::_Settings::get().random_shuffle_minimal_n))
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__gnu_parallel::__parallel_random_shuffle(__begin, __end, __rand);
else
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__gnu_parallel::__sequential_random_shuffle(__begin, __end, __rand);
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback.
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Predicate>
inline _FIterator
partition(_FIterator __begin, _FIterator __end,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_Predicate __pred, __gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::partition(__begin, __end, __pred); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case.
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Predicate, typename _IteratorTag>
inline _FIterator
__partition_switch(_FIterator __begin, _FIterator __end,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_Predicate __pred, _IteratorTag)
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
{ return partition(__begin, __end, __pred,
__gnu_parallel::sequential_tag()); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel algorithm for random access iterators.
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Predicate>
_RAIter
__partition_switch(_RAIter __begin, _RAIter __end,
_Predicate __pred, random_access_iterator_tag)
{
multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. 2008-01-09 Paolo Carlini <pcarlini@suse.de> * include/parallel/multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. * include/parallel/losertree.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/tree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/algo.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/random_number.h: Likewise. From-SVN: r131440
2008-01-10 03:07:41 +01:00
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin)
>= __gnu_parallel::_Settings::get().partition_minimal_n))
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef typename std::iterator_traits<_RAIter>::
difference_type _DifferenceType;
_DifferenceType __middle = __gnu_parallel::
__parallel_partition(__begin, __end, __pred,
__gnu_parallel::__get_max_threads());
return __begin + __middle;
}
else
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return partition(__begin, __end, __pred,
__gnu_parallel::sequential_tag());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface.
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Predicate>
inline _FIterator
partition(_FIterator __begin, _FIterator __end, _Predicate __pred)
{
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
typedef iterator_traits<_FIterator> _TraitsType;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef typename _TraitsType::iterator_category _IteratorCategory;
return __partition_switch(__begin, __end, __pred, _IteratorCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// sort interface
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
sort(_RAIter __begin, _RAIter __end,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ _GLIBCXX_STD_A::sort(__begin, __end); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Compare>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
sort(_RAIter __begin, _RAIter __end, _Compare __comp,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ _GLIBCXX_STD_A::sort<_RAIter, _Compare>(__begin, __end,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__comp); }
// Public interface
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Compare,
typename _Parallelism>
void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
sort(_RAIter __begin, _RAIter __end, _Compare __comp,
_Parallelism __parallelism)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
if (__begin != __end)
{
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) >=
__gnu_parallel::_Settings::get().sort_minimal_n))
__gnu_parallel::__parallel_sort<false>(
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__begin, __end, __comp, __parallelism);
else
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
sort(__begin, __end, __comp, __gnu_parallel::sequential_tag());
}
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface, insert default comparator
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
sort(_RAIter __begin, _RAIter __end)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
sort(__begin, __end, std::less<_ValueType>(),
__gnu_parallel::default_parallel_tag());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface, insert default comparator
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
sort(_RAIter __begin, _RAIter __end,
__gnu_parallel::default_parallel_tag __parallelism)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
sort(__begin, __end, std::less<_ValueType>(), __parallelism);
}
// Public interface, insert default comparator
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
sort(_RAIter __begin, _RAIter __end,
__gnu_parallel::parallel_tag __parallelism)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
sort(__begin, __end, std::less<_ValueType>(), __parallelism);
}
// Public interface, insert default comparator
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
sort(_RAIter __begin, _RAIter __end,
__gnu_parallel::multiway_mergesort_tag __parallelism)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
sort(__begin, __end, std::less<_ValueType>(), __parallelism);
}
// Public interface, insert default comparator
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
sort(_RAIter __begin, _RAIter __end,
__gnu_parallel::multiway_mergesort_sampling_tag __parallelism)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
sort(__begin, __end, std::less<_ValueType>(), __parallelism);
}
// Public interface, insert default comparator
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
sort(_RAIter __begin, _RAIter __end,
__gnu_parallel::multiway_mergesort_exact_tag __parallelism)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
sort(__begin, __end, std::less<_ValueType>(), __parallelism);
}
// Public interface, insert default comparator
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
sort(_RAIter __begin, _RAIter __end,
__gnu_parallel::quicksort_tag __parallelism)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
sort(__begin, __end, std::less<_ValueType>(), __parallelism);
}
// Public interface, insert default comparator
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
sort(_RAIter __begin, _RAIter __end,
__gnu_parallel::balanced_quicksort_tag __parallelism)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
sort(__begin, __end, std::less<_ValueType>(), __parallelism);
}
// Public interface
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Compare>
void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
sort(_RAIter __begin, _RAIter __end, _Compare __comp)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
sort(__begin, __end, __comp, __gnu_parallel::default_parallel_tag());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// stable_sort interface
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
stable_sort(_RAIter __begin, _RAIter __end,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ _GLIBCXX_STD_A::stable_sort(__begin, __end); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Compare>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
stable_sort(_RAIter __begin, _RAIter __end,
_Compare __comp, __gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ _GLIBCXX_STD_A::stable_sort<_RAIter, _Compare>(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__begin, __end, __comp); }
// Public interface
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Compare,
typename _Parallelism>
void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
stable_sort(_RAIter __begin, _RAIter __end,
_Compare __comp, _Parallelism __parallelism)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
if (__begin != __end)
{
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) >=
__gnu_parallel::_Settings::get().sort_minimal_n))
__gnu_parallel::__parallel_sort<true>(
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__begin, __end, __comp, __parallelism);
else
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
stable_sort(__begin, __end, __comp,
__gnu_parallel::sequential_tag());
}
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface, insert default comparator
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
stable_sort(_RAIter __begin, _RAIter __end)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
stable_sort(__begin, __end, std::less<_ValueType>(),
__gnu_parallel::default_parallel_tag());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface, insert default comparator
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
stable_sort(_RAIter __begin, _RAIter __end,
__gnu_parallel::default_parallel_tag __parallelism)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
stable_sort(__begin, __end, std::less<_ValueType>(), __parallelism);
}
// Public interface, insert default comparator
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
stable_sort(_RAIter __begin, _RAIter __end,
__gnu_parallel::parallel_tag __parallelism)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
stable_sort(__begin, __end, std::less<_ValueType>(), __parallelism);
}
// Public interface, insert default comparator
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
stable_sort(_RAIter __begin, _RAIter __end,
__gnu_parallel::multiway_mergesort_tag __parallelism)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
stable_sort(__begin, __end, std::less<_ValueType>(), __parallelism);
}
// Public interface, insert default comparator
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
stable_sort(_RAIter __begin, _RAIter __end,
__gnu_parallel::quicksort_tag __parallelism)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
stable_sort(__begin, __end, std::less<_ValueType>(), __parallelism);
}
// Public interface, insert default comparator
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
stable_sort(_RAIter __begin, _RAIter __end,
__gnu_parallel::balanced_quicksort_tag __parallelism)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
stable_sort(__begin, __end, std::less<_ValueType>(), __parallelism);
}
// Public interface
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Compare>
void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
stable_sort(_RAIter __begin, _RAIter __end,
_Compare __comp)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
stable_sort(
__begin, __end, __comp, __gnu_parallel::default_parallel_tag());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator>
inline _OutputIterator
merge(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2,
_IIter2 __end2, _OutputIterator __result,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::merge(
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__begin1, __end1, __begin2, __end2, __result); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator, typename _Compare>
inline _OutputIterator
merge(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2,
_IIter2 __end2, _OutputIterator __result, _Compare __comp,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::merge(
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__begin1, __end1, __begin2, __end2, __result, __comp); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _IIter1, typename _IIter2, typename _OutputIterator,
typename _Compare, typename _IteratorTag1,
typename _IteratorTag2, typename _IteratorTag3>
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
inline _OutputIterator
__merge_switch(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _IIter2 __end2,
_OutputIterator __result, _Compare __comp,
_IteratorTag1, _IteratorTag2, _IteratorTag3)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::merge(__begin1, __end1, __begin2, __end2,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__result, __comp); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel algorithm for random access iterators
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator, typename _Compare>
_OutputIterator
__merge_switch(_IIter1 __begin1, _IIter1 __end1,
_IIter2 __begin2, _IIter2 __end2,
_OutputIterator __result, _Compare __comp,
random_access_iterator_tag, random_access_iterator_tag,
random_access_iterator_tag)
{
multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. 2008-01-09 Paolo Carlini <pcarlini@suse.de> * include/parallel/multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. * include/parallel/losertree.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/tree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/algo.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/random_number.h: Likewise. From-SVN: r131440
2008-01-10 03:07:41 +01:00
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
(static_cast<__gnu_parallel::_SequenceIndex>(__end1 - __begin1)
>= __gnu_parallel::_Settings::get().merge_minimal_n
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
|| static_cast<__gnu_parallel::_SequenceIndex>(__end2 - __begin2)
>= __gnu_parallel::_Settings::get().merge_minimal_n)))
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __gnu_parallel::__parallel_merge_advance(
__begin1, __end1, __begin2, __end2, __result,
(__end1 - __begin1) + (__end2 - __begin2), __comp);
else
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __gnu_parallel::__merge_advance(
__begin1, __end1, __begin2, __end2, __result,
(__end1 - __begin1) + (__end2 - __begin2), __comp);
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
}
// Public interface
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator, typename _Compare>
inline _OutputIterator
merge(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2,
_IIter2 __end2, _OutputIterator __result, _Compare __comp)
{
typedef typename iterator_traits<_IIter1>::value_type _ValueType;
typedef std::iterator_traits<_IIter1> _IIterTraits1;
typedef std::iterator_traits<_IIter2> _IIterTraits2;
typedef std::iterator_traits<_OutputIterator> _OIterTraits;
typedef typename _IIterTraits1::iterator_category
_IIterCategory1;
typedef typename _IIterTraits2::iterator_category
_IIterCategory2;
typedef typename _OIterTraits::iterator_category _OIterCategory;
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return __merge_switch(
__begin1, __end1, __begin2, __end2, __result, __comp,
_IIterCategory1(), _IIterCategory2(), _OIterCategory());
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
}
// Public interface, insert default comparator
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _IIter1, typename _IIter2,
typename _OutputIterator>
inline _OutputIterator
merge(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2,
_IIter2 __end2, _OutputIterator __result)
{
typedef std::iterator_traits<_IIter1> _Iterator1Traits;
typedef std::iterator_traits<_IIter2> _Iterator2Traits;
typedef typename _Iterator1Traits::value_type _ValueType1;
typedef typename _Iterator2Traits::value_type _ValueType2;
return __gnu_parallel::merge(__begin1, __end1, __begin2, __end2,
__result, __gnu_parallel::_Less<_ValueType1, _ValueType2>());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
nth_element(_RAIter __begin, _RAIter __nth,
_RAIter __end, __gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::nth_element(__begin, __nth, __end); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Compare>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
nth_element(_RAIter __begin, _RAIter __nth,
_RAIter __end, _Compare __comp,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::nth_element(__begin, __nth, __end, __comp); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Compare>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
nth_element(_RAIter __begin, _RAIter __nth,
_RAIter __end, _Compare __comp)
{
multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. 2008-01-09 Paolo Carlini <pcarlini@suse.de> * include/parallel/multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. * include/parallel/losertree.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/tree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/algo.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/random_number.h: Likewise. From-SVN: r131440
2008-01-10 03:07:41 +01:00
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin)
>= __gnu_parallel::_Settings::get().nth_element_minimal_n))
__gnu_parallel::__parallel_nth_element(__begin, __nth, __end, __comp);
else
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
nth_element(__begin, __nth, __end, __comp,
__gnu_parallel::sequential_tag());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface, insert default comparator
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
nth_element(_RAIter __begin, _RAIter __nth,
_RAIter __end)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
__gnu_parallel::nth_element(__begin, __nth, __end,
std::less<_ValueType>());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Compare>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
partial_sort(_RAIter __begin, _RAIter __middle,
_RAIter __end, _Compare __comp,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ _GLIBCXX_STD_A::partial_sort(__begin, __middle, __end, __comp); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
partial_sort(_RAIter __begin, _RAIter __middle,
_RAIter __end, __gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ _GLIBCXX_STD_A::partial_sort(__begin, __middle, __end); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface, parallel algorithm for random access iterators
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Compare>
void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
partial_sort(_RAIter __begin, _RAIter __middle,
_RAIter __end, _Compare __comp)
{
multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. 2008-01-09 Paolo Carlini <pcarlini@suse.de> * include/parallel/multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. * include/parallel/losertree.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/tree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/algo.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/random_number.h: Likewise. From-SVN: r131440
2008-01-10 03:07:41 +01:00
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin)
>= __gnu_parallel::_Settings::get().partial_sort_minimal_n))
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__gnu_parallel::
__parallel_partial_sort(__begin, __middle, __end, __comp);
else
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
partial_sort(__begin, __middle, __end, __comp,
__gnu_parallel::sequential_tag());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface, insert default comparator
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter>
inline void
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
partial_sort(_RAIter __begin, _RAIter __middle,
_RAIter __end)
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef iterator_traits<_RAIter> _TraitsType;
typedef typename _TraitsType::value_type _ValueType;
__gnu_parallel::partial_sort(__begin, __middle, __end,
std::less<_ValueType>());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator>
inline _FIterator
max_element(_FIterator __begin, _FIterator __end,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::max_element(__begin, __end); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Compare>
inline _FIterator
max_element(_FIterator __begin, _FIterator __end, _Compare __comp,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::max_element(__begin, __end, __comp); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Compare, typename _IteratorTag>
inline _FIterator
__max_element_switch(_FIterator __begin, _FIterator __end,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_Compare __comp, _IteratorTag)
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
{ return max_element(__begin, __end, __comp,
__gnu_parallel::sequential_tag()); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel algorithm for random access iterators
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Compare>
_RAIter
__max_element_switch(_RAIter __begin, _RAIter __end,
_Compare __comp, random_access_iterator_tag,
__gnu_parallel::_Parallelism __parallelism_tag
= __gnu_parallel::parallel_balanced)
{
multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. 2008-01-09 Paolo Carlini <pcarlini@suse.de> * include/parallel/multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. * include/parallel/losertree.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/tree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/algo.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/random_number.h: Likewise. From-SVN: r131440
2008-01-10 03:07:41 +01:00
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin)
>= __gnu_parallel::_Settings::get().max_element_minimal_n
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
&& __gnu_parallel::__is_parallel(__parallelism_tag)))
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_RAIter __res(__begin);
__gnu_parallel::__identity_selector<_RAIter>
__functionality;
__gnu_parallel::
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__for_each_template_random_access(
__begin, __end, __gnu_parallel::_Nothing(), __functionality,
__gnu_parallel::__max_element_reduct<_Compare, _RAIter>(__comp),
__res, __res, -1, __parallelism_tag);
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
return __res;
}
else
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return max_element(__begin, __end, __comp,
__gnu_parallel::sequential_tag());
}
// Public interface, insert default comparator
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator>
inline _FIterator
max_element(_FIterator __begin, _FIterator __end,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__gnu_parallel::_Parallelism __parallelism_tag)
{
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
typedef typename iterator_traits<_FIterator>::value_type _ValueType;
return max_element(__begin, __end, std::less<_ValueType>(),
__parallelism_tag);
}
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator>
inline _FIterator
max_element(_FIterator __begin, _FIterator __end)
{
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
typedef typename iterator_traits<_FIterator>::value_type _ValueType;
return __gnu_parallel::max_element(__begin, __end,
std::less<_ValueType>());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Compare>
inline _FIterator
max_element(_FIterator __begin, _FIterator __end, _Compare __comp,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__gnu_parallel::_Parallelism __parallelism_tag)
{
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
typedef iterator_traits<_FIterator> _TraitsType;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef typename _TraitsType::iterator_category _IteratorCategory;
return __max_element_switch(__begin, __end, __comp, _IteratorCategory(),
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__parallelism_tag);
}
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Compare>
inline _FIterator
max_element(_FIterator __begin, _FIterator __end, _Compare __comp)
{
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
typedef iterator_traits<_FIterator> _TraitsType;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef typename _TraitsType::iterator_category _IteratorCategory;
return __max_element_switch(__begin, __end, __comp, _IteratorCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator>
inline _FIterator
min_element(_FIterator __begin, _FIterator __end,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::min_element(__begin, __end); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Compare>
inline _FIterator
min_element(_FIterator __begin, _FIterator __end, _Compare __comp,
__gnu_parallel::sequential_tag)
PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421
2011-01-30 23:39:36 +01:00
{ return _GLIBCXX_STD_A::min_element(__begin, __end, __comp); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Sequential fallback for input iterator case
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Compare, typename _IteratorTag>
inline _FIterator
__min_element_switch(_FIterator __begin, _FIterator __end,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_Compare __comp, _IteratorTag)
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
{ return min_element(__begin, __end, __comp,
__gnu_parallel::sequential_tag()); }
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Parallel algorithm for random access iterators
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
template<typename _RAIter, typename _Compare>
_RAIter
__min_element_switch(_RAIter __begin, _RAIter __end,
_Compare __comp, random_access_iterator_tag,
__gnu_parallel::_Parallelism __parallelism_tag
= __gnu_parallel::parallel_balanced)
{
multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. 2008-01-09 Paolo Carlini <pcarlini@suse.de> * include/parallel/multiway_merge.h: Reformat to 80 columns; adjust some inline specifiers; other minor style fixes. * include/parallel/losertree.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/tree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/algo.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/random_number.h: Likewise. From-SVN: r131440
2008-01-10 03:07:41 +01:00
if (_GLIBCXX_PARALLEL_CONDITION(
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin)
>= __gnu_parallel::_Settings::get().min_element_minimal_n
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
&& __gnu_parallel::__is_parallel(__parallelism_tag)))
{
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
_RAIter __res(__begin);
__gnu_parallel::__identity_selector<_RAIter>
__functionality;
__gnu_parallel::
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
__for_each_template_random_access(
__begin, __end, __gnu_parallel::_Nothing(), __functionality,
__gnu_parallel::__min_element_reduct<_Compare, _RAIter>(__comp),
__res, __res, -1, __parallelism_tag);
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
return __res;
}
else
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
return min_element(__begin, __end, __comp,
__gnu_parallel::sequential_tag());
}
// Public interface, insert default comparator
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator>
inline _FIterator
min_element(_FIterator __begin, _FIterator __end,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__gnu_parallel::_Parallelism __parallelism_tag)
{
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
typedef typename iterator_traits<_FIterator>::value_type _ValueType;
return min_element(__begin, __end, std::less<_ValueType>(),
__parallelism_tag);
}
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator>
inline _FIterator
min_element(_FIterator __begin, _FIterator __end)
{
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
typedef typename iterator_traits<_FIterator>::value_type _ValueType;
return __gnu_parallel::min_element(__begin, __end,
std::less<_ValueType>());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
// Public interface
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Compare>
inline _FIterator
min_element(_FIterator __begin, _FIterator __end, _Compare __comp,
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
__gnu_parallel::_Parallelism __parallelism_tag)
{
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
typedef iterator_traits<_FIterator> _TraitsType;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef typename _TraitsType::iterator_category _IteratorCategory;
return __min_element_switch(__begin, __end, __comp, _IteratorCategory(),
__parallelism_tag);
}
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
template<typename _FIterator, typename _Compare>
inline _FIterator
min_element(_FIterator __begin, _FIterator __end, _Compare __comp)
{
algobase.h: Replace tabs by spaces; correct line breaks. 2009-09-17 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Replace tabs by spaces; correct line breaks. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. * include/parallel/algo.h: Likewise; shorten _ForwardIterator to _FIterator. * include/parallel/find_selectors.h: Likewise. From-SVN: r151791
2009-09-17 10:42:39 +02:00
typedef iterator_traits<_FIterator> _TraitsType;
algobase.h: Uglify internal identifiers. 2009-09-16 Johannes Singler <singler@ira.uka.de> * include/parallel/algobase.h: Uglify internal identifiers. * include/parallel/algo.h: Likewise. * include/parallel/algorithmfwd.h: Likewise. * include/parallel/balanced_quicksort.h: Likewise. * include/parallel/base.h: Likewise. * include/parallel/checkers.h: Likewise. * include/parallel/compatibility.h: Likewise. * include/parallel/compiletime_settings.: Likewise. * include/parallel/equally_split.h: Likewise. * include/parallel/features.h: Likewise. * include/parallel/find.h: Likewise. * include/parallel/find_selectors.h: Likewise. * include/parallel/for_each.h: Likewise. * include/parallel/for_each_selectors.h: Likewise. * include/parallel/iterator.h: Likewise. * include/parallel/list_partition.h: Likewise. * include/parallel/losertree.h: Likewise. * include/parallel/merge.h: Likewise. * include/parallel/multiseq_selection.h: Likewise. * include/parallel/multiway_merge.h: Likewise. * include/parallel/multiway_mergesort.h: Likewise. * include/parallel/numeric: Likewise. * include/parallel/numericfwd.h: Likewise. * include/parallel/omp_loop.h: Likewise. * include/parallel/omp_loop_static.h: Likewise. * include/parallel/par_loop.h: Likewise. * include/parallel/partial_sum.h: Likewise. * include/parallel/partition.h: Likewise. * include/parallel/queue.h: Likewise. * include/parallel/quicksort.h: Likewise. * include/parallel/random_number.h: Likewise. * include/parallel/random_shuffle.h: Likewise. * include/parallel/search.h: Likewise. * include/parallel/set_operations.h: Likewise. * include/parallel/settings.h: Likewise. * include/parallel/sort.h: Likewise. * include/parallel/tags.h: Likewise. * include/parallel/types.h: Likewise. * include/parallel/unique_copy.h: Likewise. * include/parallel/workstealing.h: Likewise. From-SVN: r151741
2009-09-16 11:47:25 +02:00
typedef typename _TraitsType::iterator_category _IteratorCategory;
return __min_element_switch(__begin, __end, __comp, _IteratorCategory());
}
Add parallel mode. 2007-09-11 Johannes Singler <singler@ira.uka.de> Leonor Frias Moya <lfrias@lsi.upc.edu> Felix Putze <kontakt@felix-putze.de> Marius Elvert <marius.elvert@ira.uka.de> Felix Bondarenko <f.bondarenko@web.de> Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Robin Dapp <r.dapp@freenet.de> Benjamin Kosnik <bkoz@redhat.com> Add parallel mode. * include/parallel: New. * include/parallel/iterator.h: New. * include/parallel/multiway_merge.h: New. * include/parallel/parallel.h: New. * include/parallel/algorithm * include/parallel/find_selectors.h: New. * include/parallel/losertree.h: New. * include/parallel/list_partition.h: New. * include/parallel/types.h: New. * include/parallel/for_each.h: New. * include/parallel/multiseq_selection.h: New. * include/parallel/workstealing.h: New. * include/parallel/base.h: New. * include/parallel/par_loop.h: New. * include/parallel/numeric * include/parallel/features.h: New. * include/parallel/quicksort.h: New. * include/parallel/algorithmfwd.h: New. * include/parallel/equally_split.h: New. * include/parallel/compiletime_settings.h: New. * include/parallel/for_each_selectors.h: New. * include/parallel/basic_iterator.h: New. * include/parallel/omp_loop_static.h: New. * include/parallel/random_shuffle.h: New. * include/parallel/balanced_quicksort.h: New. * include/parallel/set_operations.h: New. * include/parallel/tags.h: New. * include/parallel/merge.h: New. * include/parallel/tree.h: New. * include/parallel/settings.h: New. * include/parallel/unique_copy.h: New. * include/parallel/multiway_mergesort.h: New. * include/parallel/numericfwd.h: New. * include/parallel/search.h: New. * include/parallel/partition.h: New. * include/parallel/compatibility.h: New. * include/parallel/algobase.h: New. * include/parallel/find.h: New. * include/parallel/partial_sum.h: New. * include/parallel/algo.h: New. * include/parallel/omp_loop.h: New. * include/parallel/queue.h: New. * include/parallel/timing.h: New. * include/parallel/sort.h: New. * include/parallel/checkers.h: New. * include/parallel/random_number.h: New. * include/bits/algorithmfwd.h: New. * acinclude.m4 (GLIBCXX_ENABLE_PARALLEL): New. * configure.host: Add atomic_flags. * configure.ac: Export ATOMIC_FLAGS, call GLIBCXX_ENABLE_PARALLEL. * src/Makefile.am: Add parallel_list rules. * include/Makefile.am: Add parallel files. * testsuite/Makefile.am (check-parallel): Add. (check-performance-parallel): Add. * config.h.in: Regenerate. * configure: Same. * libsupc++/Makefile.in: Same. * testsuite/Makefile.in: Same. * Makefile.in: Same. * libmath/Makefile.in: Same. * include/Makefile.in: Same. * src/Makefile.in: Same. * po/Makefile.in: Same. * config/abi/pre/gnu.ver: Export parallel list bits. * docs/html/parallel_mode.html: New. * docs/html/documentation.html: Add link. * docs/doxygen/user.cfg.in: Adjust for new files and directory. * docs/doxygen/doxygroups.cc: Adjust namespace markup. * include/debug/set.h: Adjust for _GLIBCXX_STD_D or _P change. * include/debug/bitset: Same. * include/debug/multiset.h: Same. * include/debug/vector: Same. * include/debug/map.h: Same. * include/debug/deque: Same. * include/debug/list: Same. * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * include/std/algorithm: Same. * include/std/numeric: Same. * include/std/bitset: Same. * include/std/string: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/stl_set.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/stl_deque.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/c++config: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/list.tcc: Same. * src/list.cc: Same. * src/parallel_list.cc: New. * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): New. * testsuite/lib/dg-options.exp (dg-require-parallel-mode): New. * scripts/testsuite_flags.in (--cxxparallelflags): New. * scripts/check_performance: Adjust. * testsuite/25_algorithms/headers/parallel_algorithm.cc: New. * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: New. * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: New. * testsuite/26_numerics/headers/numeric/parallel_numeric.cc: New. * testsuite/26_numerics/headers/numeric/numeric_parallel_mode.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc: New. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc: New. Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com> Co-Authored-By: Felix Bondarenko <f.bondarenko@web.de> Co-Authored-By: Felix Putze <kontakt@felix-putze.de> Co-Authored-By: Leonor Frias Moya <lfrias@lsi.upc.edu> Co-Authored-By: Marius Elvert <marius.elvert@ira.uka.de> Co-Authored-By: Robert Geisberger <robert.geisberger@stud.uni-karlsruhe.de> Co-Authored-By: Robin Dapp <r.dapp@freenet.de> From-SVN: r128395
2007-09-12 00:32:51 +02:00
} // end namespace
} // end namespace
#endif /* _GLIBCXX_PARALLEL_ALGO_H */