Commit Graph

33 Commits

Author SHA1 Message Date
Richard Sandiford 405feeb871 Update copyright in libstdc++-v3.
From-SVN: r195701
2013-02-03 17:54:05 +00:00
Paolo Carlini 0ecca7a6a6 re PR libstdc++/48750 (for_each_template_random_access_ed has unbalanced new/delete[])
2011-05-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48750
	* include/parallel/multiway_merge.h: Run _ValueType destructors.
	* include/parallel/multiway_mergesort.h: Likewise.
	* include/parallel/quicksort.h: Likewise.
	* include/parallel/random_shuffle.h: Likewise.
	* include/parallel/partial_sum.h: Likewise.
	* include/parallel/losertree.h: Run destructors; minor tweaks.
	* include/parallel/par_loop.h: Run destructors, fix memory
	allocations and deallocations.
	* testsuite/26_numerics/accumulate/48750.cc: New.

	* testsuite/ext/profile/mutex_extensions_neg.cc: Do not run in
	parallel-mode to avoid spurious multiple errors.

From-SVN: r173309
2011-05-03 14:20:45 +00:00
Paolo Carlini df9cb15f7a 2011-04-28 Paolo Carlini <paolo.carlini@oracle.com>
Revert unintended changes to include/parallel files.

From-SVN: r173066
2011-04-28 10:55:56 +00:00
Paolo Carlini 9f1163b171 re PR libstdc++/48760 (std::complex constructor buggy in the face of NaN's)
2011-04-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48760
	* include/std/complex (complex<float>::complex(float, float),
	complex<double>::complex(double, double),
	complex<long double>::complex(long double, long double)): Use
	list-initialization in C++0x mode, initialize in the body in
	C++03 mode.
	* testsuite/26_numerics/complex/cons/48760.cc: New.
	* testsuite/26_numerics/complex/cons/48760_c++0x.cc: Likewise.

2011-04-28  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/bitset (_Base_bitset(unsigned long long)): Minor
	tweak, remove redundant round braces.

From-SVN: r173065
2011-04-28 10:52:17 +00:00
Jakub Jelinek d652f226fc Update Copyright years for files modified in 2010.
From-SVN: r168438
2011-01-03 21:52:22 +01:00
Johannes Singler 26e020539c random_shuffle.h (__parallel_random_shuffle_drs): Take as many threads as possible, i.
2010-03-30  Johannes Singler  <singler@kit.edu>

        * include/parallel/random_shuffle.h
        (__parallel_random_shuffle_drs) : Take as many threads as
        possible, i. e. favor parallelism over cache efficiency.
        Use own PRNG also for the 1 thread case.

From-SVN: r157826
2010-03-30 14:50:56 +00:00
Benjamin Kosnik 8e32aa11c7 user.cfg.in: Adjust includes.
2009-11-06  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/doxygen/user.cfg.in: Adjust includes.

	* doc/doxygen/doxygroups.cc: Move group markup.
	* include/tr1_impl/regex: Change " to '. Add group markup.
	* include/std/utility: Same.
	* include/std/type_traits: Same.
	* include/std/streambuf: Same.
	* include/std/iosfwd: Same.
	* include/std/limits: Same.
	* include/std/sstream: Same.
	* include/profile/impl/profiler_state.h: Same.
	* include/profile/impl/profiler_hashtable_size.h: Same.
	* include/bits/stl_algobase.h: Same.
	* include/bits/stl_iterator_base_types.h: Same.
	* include/bits/stream_iterator.h: Same.
	* include/bits/stl_iterator.h: Same.
	* include/bits/stl_tempbuf.h: Same.
	* include/bits/streambuf_iterator.h: Same.
	* libsupc++/exception: Same.
	* libsupc++/cxxabi.h: Same.
	* include/tr1_impl/type_traits: Same.

	* include/parallel/multiway_merge.h: Change @__c to @c, @__f to @f.
	* include/parallel/list_partition.h: Same.
	* include/parallel/for_each.h: Same.
	* include/parallel/workstealing.h: Same.
	* include/parallel/base.h: Same.
	* include/parallel/equally_split.h: Same.
	* include/parallel/random_shuffle.h: Same.
	* include/parallel/balanced_quicksort.h: Same.
	* include/parallel/merge.h: Same.
	* include/parallel/multiway_mergesort.h: Same.
	* include/parallel/compatibility.h: Same.
	* include/parallel/queue.h: Same.
	* include/parallel/checkers.h: Same.
	* include/parallel/random_number.h: Same.


	* include/c_global/csignal: Change # to \#.
	* include/c_global/cstdlib: Same.
	* include/c_global/cstdio: Same.
	* include/c_global/cstdarg: Same.
	* include/c_global/cctype: Same.
	* include/c_global/cerrno: Same.
	* include/c_global/cstdatomic: Same.
	* include/c_global/cmath: Same.
	* include/c_global/ciso646: Same.
	* include/c_global/ctime: Same.
	* include/c_global/clocale: Same.
	* include/c_global/climits: Same.
	* include/c_global/cassert: Same.
	* include/c_global/csetjmp: Same.
	* include/c_global/cwchar: Same.
	* include/c_global/cfloat: Same.
	* include/c_global/cstring: Same.
	* include/c_global/cstddef: Same.
	* include/c_global/cwctype: Same.

	* include/std/memory: Only dance around boost_sp_counted_base.h.
	* include/tr1_impl/boost_sp_counted_base.h: Add markup.
	* include/tr1/shared_ptr.h: Strip markup.
	* include/bits/shared_ptr.h: Move base types...
	* include/bits/shared_ptr_base.h: ...here.
	* include/Makefile.am: Add.
	* include/Makefile.in: Regenerate.
	* configure: Same.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
	Adjust line numbers.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.

From-SVN: r153980
2009-11-06 22:15:17 +00:00
Paolo Carlini 77d16198fc multiway_merge.h: Simple formatting and uglification fixes.
2009-11-06  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/parallel/multiway_merge.h: Simple formatting and
	uglification fixes.
	* include/parallel/find_selectors.h: Likewise.
	* include/parallel/losertree.h: Likewise.
	* include/parallel/list_partition.h: Likewise.
	* include/parallel/for_each.h: Likewise.
	* include/parallel/multiseq_selection.h: Likewise.
	* include/parallel/workstealing.h: Likewise.
	* include/parallel/par_loop.h: Likewise.
	* include/parallel/numeric: Likewise.
	* include/parallel/quicksort.h: Likewise.
	* include/parallel/equally_split.h: Likewise.
	* include/parallel/omp_loop_static.h: Likewise.
	* include/parallel/random_shuffle.h: Likewise.
	* include/parallel/balanced_quicksort.h: Likewise.
	* include/parallel/tags.h: Likewise.
	* include/parallel/set_operations.h: Likewise.
	* include/parallel/merge.h: Likewise.
	* include/parallel/unique_copy.h: Likewise.
	* include/parallel/multiway_mergesort.h: Likewise.
	* include/parallel/search.h: Likewise.
	* include/parallel/partition.h: Likewise.
	* include/parallel/partial_sum.h: Likewise.
	* include/parallel/find.h: Likewise.
	* include/parallel/queue.h: Likewise.
	* include/parallel/omp_loop.h: Likewise.
	* include/parallel/checkers.h: Likewise.
	* include/parallel/sort.h: Likewise.

From-SVN: r153966
2009-11-06 11:39:35 +00:00
Johannes Singler 63ffc48617 base.h: Take integer types from <tr1/cstdint>.
2009-10-02  Johannes Singler  <singler@ira.uka.de>

        * include/parallel/base.h: Take integer types from <tr1/cstdint>.
        * include/parallel/compatibility.h: Likewise.
        * include/parallel/multiseq_selection.h: Likewise.
        * include/parallel/random_shuffle.h: Likewise.
        * include/parallel/random_number.h: Likewise;
        use numeric_limits<>::digit instead of sizeof()*8.
        * include/parallel/types.h: Likewise.
        * doc/html/manual/bk01pt12ch31s03.html:
        Document dependency on stdint.h.

From-SVN: r152396
2009-10-02 07:47:48 +00:00
Johannes Singler 4459d22ed1 algobase.h: Uglify internal identifiers; correct line breaks.
2009-09-23  Johannes Singler  <singler@ira.uka.de>

        * include/parallel/algobase.h: Uglify internal identifiers;
        correct line breaks.
        * include/parallel/algo.h: Likewise.
        * include/parallel/base.h: Likewise.
        * include/parallel/equally_split.h: Likewise.
        * include/parallel/find.h: Likewise.
        * include/parallel/find_selectors.h: Likewise.
        * include/parallel/for_each_selectors.h: Likewise.
        * include/parallel/list_partition.h: Likewise.
        * include/parallel/losertree.h: Likewise.
        * include/parallel/merge.h: Likewise.
        * include/parallel/multiseq_selection.h: Likewise.
        * include/parallel/multiway_merge.h: Likewise.
        * include/parallel/multiway_mergesort.h: Likewise.
        * include/parallel/numeric: Likewise.
        * include/parallel/numericfwd.h: Likewise.
        * include/parallel/omp_loop.h: Likewise.
        * include/parallel/omp_loop_static.h: Likewise.
        * include/parallel/par_loop.h: Likewise.
        * include/parallel/partition.h: Likewise.
        * include/parallel/random_shuffle.h: Likewise.
        * include/parallel/search.h: Likewise.
        * include/parallel/sort.h: Likewise.
        * include/parallel/workstealing.h: Likewise.

From-SVN: r152061
2009-09-23 08:09:50 +00:00
Johannes Singler 15ac3c72db 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 08:42:39 +00:00
Johannes Singler 721641c415 base.h: Correct some comments accidentally changed during uglification.
2009-09-16  Johannes Singler  <singler@ira.uka.de>

        * include/parallel/base.h: Correct some comments accidentally changed
        during uglification.
        * include/parallel/find.h: Likewise.
        * include/parallel/find_selectors.h: Likewise.
        * include/parallel/multiway_merge.h: Likewise.
        * include/parallel/multiway_mergesort.h: Likewise.
        * include/parallel/partial_sum.h: Likewise.
        * include/parallel/partition.h: Likewise.
        * include/parallel/queue.h: Likewise.
        * include/parallel/random_shuffle.h: Likewise.
        * include/parallel/settings.h: Likewise.
        * include/parallel/sort.h: Likewise.
        * include/parallel/tags.h: Likewise.
        * include/parallel/workstealing.h: Likewise.

From-SVN: r151756
2009-09-16 14:53:58 +00:00
Johannes Singler 54384f7f0a 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 13:50:17 +00:00
Johannes Singler 11b9c936bf base.h (_PseudoSequenceIterator, [...]): Replace redundant _Self.
2009-09-16  Johannes Singler  <singler@ira.uka.de>

        * include/parallel/base.h (_PseudoSequenceIterator, _PseudoSequence):
        Replace redundant _Self.
        * include/parallel/iterator.h (_IteratorPair, _IteratorTriple):
        Replace redundant _Self.
        * include/parallel/algo.h: Correct accidental _Self in comments.
        * include/parallel/losertree.h: Likewise.
        * include/parallel/multiway_merge.h: Likewise.
        * include/parallel/random_shuffle.h: Likewise.

From-SVN: r151743
2009-09-16 11:02:15 +00:00
Johannes Singler 1acba85b37 algobase.h: Uglify internal identifiers.
2009-09-16  Johannes Singler  <singler@ira.uka.de>

        * include/parallel/algobase.h: Uglify internal identifiers.
        * include/parallel/algo.h: Likewise.
        * include/parallel/algorithmfwd.h: Likewise.
        * include/parallel/balanced_quicksort.h: Likewise.
        * include/parallel/base.h: Likewise.
        * include/parallel/checkers.h: Likewise.
        * include/parallel/compatibility.h: Likewise.
        * include/parallel/compiletime_settings.: Likewise.
        * include/parallel/equally_split.h: Likewise.
        * include/parallel/features.h: Likewise.
        * include/parallel/find.h: Likewise.
        * include/parallel/find_selectors.h: Likewise.
        * include/parallel/for_each.h: Likewise.
        * include/parallel/for_each_selectors.h: Likewise.
        * include/parallel/iterator.h: Likewise.
        * include/parallel/list_partition.h: Likewise.
        * include/parallel/losertree.h: Likewise.
        * include/parallel/merge.h: Likewise.
        * include/parallel/multiseq_selection.h: Likewise.
        * include/parallel/multiway_merge.h: Likewise.
        * include/parallel/multiway_mergesort.h: Likewise.
        * include/parallel/numeric: Likewise.
        * include/parallel/numericfwd.h: Likewise.
        * include/parallel/omp_loop.h: Likewise.
        * include/parallel/omp_loop_static.h: Likewise.
        * include/parallel/par_loop.h: Likewise.
        * include/parallel/partial_sum.h: Likewise.
        * include/parallel/partition.h: Likewise.
        * include/parallel/queue.h: Likewise.
        * include/parallel/quicksort.h: Likewise.
        * include/parallel/random_number.h: Likewise.
        * include/parallel/random_shuffle.h: Likewise.
        * include/parallel/search.h: Likewise.
        * include/parallel/set_operations.h: Likewise.
        * include/parallel/settings.h: Likewise.
        * include/parallel/sort.h: Likewise.
        * include/parallel/tags.h: Likewise.
        * include/parallel/types.h: Likewise.
        * include/parallel/unique_copy.h: Likewise.
        * include/parallel/workstealing.h: Likewise.

From-SVN: r151741
2009-09-16 09:47:25 +00:00
Jakub Jelinek 748086b7b2 Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.
From-SVN: r145841
2009-04-09 17:00:19 +02:00
Johannes Singler c38b84d8f1 re PR libstdc++/37470 (parallel/base.h log2 conflicts with math.h)
2008-09-19  Johannes Singler  <singler@ira.uka.de>

        PR libstdc++/37470
        * include/parallel/base.h: Rename log2 to __log2.
          (__log2) Avoid infinite loop for n <= 0, return 0.
        * include/parallel/losertree.h: Rename log2 to __log2.
        * include/parallel/multiseq_selection.h: Likewise.
        * include/parallel/random_shuffle.h: Likewise.

From-SVN: r140490
2008-09-19 11:37:16 +00:00
Johannes Singler cbcd1e4520 find_selectors.h: Correct name for include guard #ifndef.
2008-07-15  Johannes Singler  <singler@ira.uka.de>

        * include/parallel/find_selectors.h:
        Correct name for include guard #ifndef.
        * include/parallel/balanced_quicksort.h: Likewise.
        * include/parallel/unique_copy.h: Likewise.
        * include/parallel/multiway_mergesort.h: Likewise.
        * include/parallel/checkers.h: Likewise.
        * include/parallel/[various files]:
        Add/correct comment for #endif of include guard (at end of file)

From-SVN: r137827
2008-07-15 10:06:58 +00:00
Johannes Singler 361eefe75d random_shuffle.h: (sequential_random_shuffle) Copy data back.
2008-07-09  Johannes Singler  <singler@ira.uka.de>

         * include/parallel/random_shuffle.h:
         (sequential_random_shuffle) Copy data back.
         * testsuite/25_algorithms/random_shuffle/1.cc:
         New. Generic random_shuffle functionality test.

From-SVN: r137658
2008-07-09 15:26:56 +00:00
Johannes Singler 3611e1767d random_shuffle.h: (parallel_random_shuffle_drs) Get the actual number of threads after entering...
2008-06-05  Johannes Singler  <singler@ira.uka.de>

        * include/parallel/random_shuffle.h:
        (parallel_random_shuffle_drs) Get the actual number of
        threads after entering the parallel region. Indentation.
        * include/parallel/algo.h: (random_shuffle(begin, end))
        Add namespace qualification to avoid ambiguity.

From-SVN: r136406
2008-06-05 15:47:17 +00:00
Benjamin Kosnik ee1b5fc5e0 re PR libstdc++/34797 ([parallel mode] Settings are separated for each compilation unit)
2008-02-17  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/34797
	* include/parallel/settings.h (_Settings): Reconstruct Settings class
	here, uglify, remove anonymous namespace and static
	members. Convert to datum.	
	* include/parallel/types.h: Move Settings:: enumerations here, uglify.
	* src/parallel_settings.cc: New, definition for _Settings member
	functions.	
	* include/parallel/multiway_merge.h: Same.
	* include/parallel/for_each.h: Same.
	* include/parallel/workstealing.h: Same.
	* include/parallel/base.h: Same.
	* include/parallel/numeric
	* include/parallel/features.h: Same.
	* include/parallel/quicksort.h: Same.
	* include/parallel/equally_split.h: Same.
	* include/parallel/algorithmfwd.h: Same.
	* include/parallel/omp_loop_static.h: Same.
	* include/parallel/random_shuffle.h: Same.
	* include/parallel/balanced_quicksort.h: Same.
	* include/parallel/tags.h: Same.
	* include/parallel/multiway_mergesort.h: Same.
	* include/parallel/numericfwd.h: Same.
	* include/parallel/partition.h: Same.
	* include/parallel/partial_sum.h: Same.
	* include/parallel/find.h: Same.
	* include/parallel/algo.h: Same.
	* include/parallel/omp_loop.h: Same.
	* include/parallel/sort.h: Same.

	* src/Makefile.am (parallel_sources): Add parallel_settings.cc.
	* src/Makefile.in: Regenerate.
	
	* config/abi/pre/gnu.ver: Export _Settings::get and _Settings::set.

From-SVN: r132383
2008-02-18 00:00:00 +00:00
Paolo Carlini 6df548d2d3 re PR libstdc++/35221 (libstdc++ broken)
2008-02-17  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/35221
	* include/parallel/types.h: Reinstate integer types typedefs.
	* include/parallel/multiseq_selection.h: Adjust.
	* include/parallel/compatibility.h: Likewise.
	* include/parallel/random_shuffle.h: Likewise.
	* include/parallel/random_number.h: Likewise.
	* include/parallel/base.h: Likewise.

From-SVN: r132380
2008-02-17 15:46:30 +00:00
Benjamin Kosnik 847eb5516f types.h: Move enum parallelism here.
2008-02-15  Benjamin Kosnik  <bkoz@redhat.com>

	* include/parallel/types.h: Move enum parallelism here.  Use
	tr1/cstdint's int16_t, uint16_t, int32_t, uint32_t, int64_t,
	uint64_t. 
	* include/parallel/multiseq_selection.h: Adjust for cstdint.
	* include/parallel/compatibility.h: Same.
	* include/parallel/tags.h: Just compile-time tags.
	* include/parallel/base.h: Put namespace bits here.

	* src/Makefile.am (PARALLEL_FLAGS): Use it.
	* src/Makefile.in: Regenerate.

	* testsuite/25_algorithms/nth_element/1.cc: Add test variable.

From-SVN: r132354
2008-02-15 22:55:14 +00:00
Paolo Carlini 5817ff8e5f 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 02:07:41 +00:00
Paolo Carlini fac9044d26 re PR libstdc++/34095 (parallel mode: segfault in std::sort)
2008-01-01  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/34095
	* include/parallel/multiway_merge.h (multiway_merge_bubble,
	parallel_multiway_merge): Together with ::operator new use
	::operator delete.
	* include/parallel/losertree.h (LoserTree<>::~LoserTree): Likewise.
	* include/parallel/quicksort.h (parallel_sort_qs_divide): Likewise.
	* include/parallel/random_shuffle.h (parallel_random_shuffle_drs_pu,
	sequential_random_shuffle): Likewise.
	* include/parallel/tree.h (_M_not_sorted_bulk_insertion_construction):
	Likewise.
	* include/parallel/multiway_mergesort.h (parallel_sort_mwms_pu,
	parallel_sort_mwms): Likewise.
	* include/parallel/partial_sum.h (parallel_partial_sum_linear):
	Likewise. 
	* testsuite/25_algorithms/sort/34095.cc: New.

From-SVN: r131247
2008-01-01 19:05:41 +00:00
Benjamin Kosnik 58a6ef4b09 partial_sum.h: Include new.
2007-12-15  Benjamin Kosnik  <bkoz@redhat.com>
	    Paolo Carlini  <pcarlini@suse.de>
	
	* include/parallel/partial_sum.h: Include new. Fix for DR 402.	
	* include/parallel/multiway_merge.h:Fix for DR 402.
	* include/parallel/losertree.h: Same.
	* include/parallel/quicksort.h: Same.
	* include/parallel/random_shuffle.h: Same.
	* include/parallel/multiway_mergesort.h: Same.


Co-Authored-By: Paolo Carlini <pcarlini@suse.de>

From-SVN: r130956
2007-12-15 16:19:37 +00:00
Johannes Singler 1661473b7f multiway_merge.h: Destruct only elements that were have been constructed before.
2007-11-28  Johannes Singler  <singler@ira.uka.de>

        * include/parallel/multiway_merge.h: Destruct only elements that
        were have been constructed before. Code beautifying and formatting.
        * include/parallel/losertree.h: (Copy) construct all loser tree
        item keys, so they can be deconstructed all at once.
        * include/parallel/quicksort.h: Fix memory leak.
        * include/parallel/random_shuffle.h: Use copy constructor instead
        of assignment. Code beautifying and formatting.
        * include/parallel/unique_copy.h: Use assignment instead of copy
        constructor.
        * include/parallel/multiway_mergesort.h: Use copy constructor
        instead of assignment. Code beautifying and formatting.
        * include/parallel/random_shuffle.h: Use copy constructor instead
        of assignment. Code beautifying.

From-SVN: r130490
2007-11-28 17:38:49 +00:00
Johannes Singler e683ee2a20 re PR libstdc++/33893 ([parallel mode] Algorithms rely on omp_set_dynamic(false))
2007-11-22  Johannes Singler  <singler@ira.uka.de>

        PR libstdc++/33893
        * include/parallel/multiway_merge.h: made omp_dynamic-safe
        * include/parallel/workstealing.h: made omp_dynamic-safe
        * include/parallel/base.h: infrastructure, cleanup
        * include/parallel/par_loop.h: made omp_dynamic-safe
        * include/parallel/features.h: activate loser tree variant
        * include/parallel/quicksort.h: made omp_dynamic-safe
        * include/parallel/compiletime_settings.h: settings overridable
        * include/parallel/equally_split.h: made omp_dynamic-safe
        * include/parallel/omp_loop_static.h: made omp_dynamic-safe
        * include/parallel/random_shuffle.h: made omp_dynamic-safe
        * include/parallel/balanced_quicksort.h: made omp_dynamic-safe
        * include/parallel/set_operations.h: made omp_dynamic-safe
        * include/parallel/unique_copy.h: made omp_dynamic-safe
        * include/parallel/multiway_mergesort.h: made omp_dynamic-safe
        * include/parallel/search.h: made omp_dynamic-safe
        * include/parallel/partition.h: made omp_dynamic-safe
        * include/parallel/partial_sum.h: made omp_dynamic-safe
        * include/parallel/find.h: made omp_dynamic-safe
        * include/parallel/omp_loop.h: made omp_dynamic-safe
        * include/parallel/losertree.h: avoid default constructor

From-SVN: r130347
2007-11-22 10:13:08 +00:00
Johannes Singler 740936e08e multiway_merge.h: Removed Timing<inactive_tag>
2007-10-25  Johannes Singler  <singler@ira.uka.de>

      * include/parallel/multiway_merge.h: Removed Timing<inactive_tag>
      * include/parallel/random_shuffle.h: Same
      * include/parallel/set_operations.h: Same
      * include/parallel/tree.h: Same
      * include/parallel/multiway_mergesort.h: Same
      * include/parallel/timing.h: Removed completely

From-SVN: r129629
2007-10-25 17:07:56 +00:00
Benjamin Kosnik dfbed39786 PR libstdc++/33489 continued.
2007-10-09  Benjamin Kosnik  <bkoz@montsouris.artheist.org>

	PR libstdc++/33489 continued.		
	* include/parallel/features.h (_GLIBCXX_LOSER_TREE): Set to zero.
	(_GLIBCXX_LOSER_TREE_POINTER): Set to one.
	(_GLIBCXX_LOSER_TREE_UNGUARDED): Set to zero.
	(_GLIBCXX_LOSER_TREE_POINTER_UNGUARDED): Set to one.
	* include/parallel/multiway_merge.h (parallel_multiway_merge):
	Change array of value_type to array of value_type pointers.
 	(multiway_merge_bubble): Same.
	(multiway_merge_loser_tree): Same.
	* include/parallel/merge.h (merge_advance_movc): Change to avoid
	default construction.
	* include/parallel/multiseq_selection.h (multiseq_partition):
	Replace value_type, bool pair with value_type*, null-initialized.
	* include/parallel/multiway_mergesort.h (parallel_sort_mwms):
	Don't use array form of operator new for value_types.
	(parallel_sort_mwms_pu): Same.
	* include/parallel/quicksort.h (parallel_sort_qs_divide): Don't
	use array form to construct pointer to value_type on stack,
	instead use __builtin_alloca.	
	* include/parallel/random_shuffle.h (sequential_random_shuffle): Same,
	but use operator new.
	(parallel_random_shuffle_drs_pu): Same.
	* include/parallel/partial_sum.h ( parallel_partial_sum_linear): Same.

	* include/parallel/losertree.h: Format.
	* include/parallel/settings.h: Format.

	* include/parallel/multiway_merge.h: Move traits to....
	* include/parallel/losertree.h: ... here.

From-SVN: r129179
2007-10-09 20:48:38 +00:00
Benjamin Kosnik 6f95a65aa1 re PR libstdc++/33487 (parallel v3: more functions not in right namespace)
2007-10-06  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/33487
	* include/parallel/algorithmfwd.h (for_each, generate, generate_n,
	transform, replace, replace_if, max_element, min_element, count,
	count_if): Consistently construct overloads.
	* include/parallel/numericfwd.h (accumulate, adjacent_difference,
	inner_product): Same.
	* include/parallel/algobase.h: Same.
	* include/parallel/algo.h: Same.
	* include/parallel/numeric: Same.

	* include/bits/algorithmfwd.h: Correct find_end placement.

	* docs/html/parallel_mode.html: Document some of the interface
	conventions.

	* include/parallel/search.h (calc_borders): Only use operator ==.
	
	* include/parallel/algorithmfwd.h: Move __gnu_sequential bits to...
	* include/parallel/tags.h: ...here, and use a using directive.

	* include/parallel/random_shuffle.h: Include stl_numeric. Qualify
	uses of partial_num with __gnu_sequential.

	* include/parallel/tree.h: Formatting.

From-SVN: r129054
2007-10-06 15:08:58 +00:00
Johannes Singler a3e6b31a0f for_each.h: Fixed comment/doxygen markup typos.
2007-09-17  Johannes Singler  <singler@ira.uka.de>

        * include/parallel/for_each.h: Fixed comment/doxygen markup typos.
        * include/parallel/base.h: Same.
        * include/parallel/numeric: Same.
        * include/parallel/quicksort.h: Same.
        * include/parallel/compiletime_settings.h: Same.
        * include/parallel/random_shuffle.h: Same.
        * include/parallel/balanced_quicksort.h: Same.
        * include/parallel/tree.h: Same.
        * include/parallel/settings.h: Same.
        * include/parallel/search.h: Same.
        * include/parallel/partition.h: Same.
        * include/parallel/partial_sum.h: Same.

From-SVN: r128545
2007-09-17 12:58:07 +00:00
Johannes Singler c2ba97097b 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-11 22:32:51 +00:00