From d0900df96a76f6a4f7e44433a852f4f89a07671f Mon Sep 17 00:00:00 2001 From: singler Date: Wed, 16 Sep 2009 14:53:58 +0000 Subject: [PATCH] 2009-09-16 Johannes Singler * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151756 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 17 +++++++++++++++++ libstdc++-v3/include/parallel/base.h | 8 ++++---- libstdc++-v3/include/parallel/find.h | 2 +- libstdc++-v3/include/parallel/find_selectors.h | 12 ++++++------ libstdc++-v3/include/parallel/multiway_merge.h | 22 +++++++++++----------- libstdc++-v3/include/parallel/multiway_mergesort.h | 2 +- libstdc++-v3/include/parallel/partial_sum.h | 2 +- libstdc++-v3/include/parallel/partition.h | 2 +- libstdc++-v3/include/parallel/queue.h | 6 +++--- libstdc++-v3/include/parallel/random_shuffle.h | 6 +++--- libstdc++-v3/include/parallel/settings.h | 2 +- libstdc++-v3/include/parallel/sort.h | 4 ++-- libstdc++-v3/include/parallel/tags.h | 8 ++++---- libstdc++-v3/include/parallel/workstealing.h | 18 +++++++++--------- 14 files changed, 64 insertions(+), 47 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index ce55b2f..8b007d8 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,22 @@ 2009-09-16 Johannes Singler + * 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. + +2009-09-16 Johannes Singler + * include/parallel/base.h (_EqualFromLess): Correct uglification of member variables and method arguments. * include/parallel/balanced_quicksort.h (_QSBThreadLocal): Likewise. diff --git a/libstdc++-v3/include/parallel/base.h b/libstdc++-v3/include/parallel/base.h index 80232bc..92f7874 100644 --- a/libstdc++-v3/include/parallel/base.h +++ b/libstdc++-v3/include/parallel/base.h @@ -110,7 +110,7 @@ template return __k; } -/** @brief Encode two integers into one __gnu_parallel::_CASable. +/** @brief Encode two integers into one gnu_parallel::_CASable. * @param __a First integer, to be encoded in the most-significant @__c * _CASable_bits/2 bits. * @param __b Second integer, to be encoded in the least-significant @@ -124,7 +124,7 @@ __encode2(int __a, int __b) //must all be non-negative, actually return (((_CASable)__a) << (_CASable_bits / 2)) | (((_CASable)__b) << 0); } -/** @brief Decode two integers from one __gnu_parallel::_CASable. +/** @brief Decode two integers from one gnu_parallel::_CASable. * @param __x __gnu_parallel::_CASable to decode integers from. * @param __a First integer, to be decoded from the most-significant * @__c _CASable_bits/2 bits of @__c __x. @@ -210,7 +210,7 @@ template start parallel. + // Not within first __k elements -> start parallel. _ThreadIndex __iam = omp_get_thread_num(); _DifferenceType __block_size = __s.find_initial_block_size; diff --git a/libstdc++-v3/include/parallel/find_selectors.h b/libstdc++-v3/include/parallel/find_selectors.h index 8dda9c6..9445d51 100644 --- a/libstdc++-v3/include/parallel/find_selectors.h +++ b/libstdc++-v3/include/parallel/find_selectors.h @@ -49,7 +49,7 @@ namespace __gnu_parallel */ struct __find_if_selector : public __generic_find_selector { - /** @brief Test on one __position. + /** @brief Test on one position. * @param __i1 _Iterator on first sequence. * @param __i2 _Iterator on second sequence (unused). * @param __pred Find predicate. @@ -76,10 +76,10 @@ namespace __gnu_parallel sequential_tag()), __begin2); } }; - /** @brief Test predicate on two adjacent __elements. */ + /** @brief Test predicate on two adjacent elements. */ struct __adjacent_find_selector : public __generic_find_selector { - /** @brief Test on one __position. + /** @brief Test on one position. * @param __i1 _Iterator on first sequence. * @param __i2 _Iterator on second sequence (unused). * @param __pred Find predicate. @@ -119,7 +119,7 @@ namespace __gnu_parallel struct __mismatch_selector : public __generic_find_selector { /** - * @brief Test on one __position. + * @brief Test on one position. * @param __i1 _Iterator on first sequence. * @param __i2 _Iterator on second sequence (unused). * @param __pred Find predicate. @@ -147,7 +147,7 @@ namespace __gnu_parallel }; - /** @brief Test predicate on several __elements. */ + /** @brief Test predicate on several elements. */ template struct __find_first_of_selector : public __generic_find_selector { @@ -157,7 +157,7 @@ namespace __gnu_parallel explicit __find_first_of_selector(_ForwardIterator __begin, _ForwardIterator __end) : _M_begin(__begin), _M_end(__end) { } - /** @brief Test on one __position. + /** @brief Test on one position. * @param __i1 _Iterator on first sequence. * @param __i2 _Iterator on second sequence (unused). * @param __pred Find predicate. */ diff --git a/libstdc++-v3/include/parallel/multiway_merge.h b/libstdc++-v3/include/parallel/multiway_merge.h index 2604d3a..808caf2 100644 --- a/libstdc++-v3/include/parallel/multiway_merge.h +++ b/libstdc++-v3/include/parallel/multiway_merge.h @@ -72,13 +72,13 @@ template operator<=(_GuardedIterator<_RAIter, _Compare>& __bi1, _GuardedIterator<_RAIter, _Compare>& __bi2); -/** @brief _Iterator wrapper supporting an implicit __supremum at the end +/** @brief _Iterator wrapper supporting an implicit supremum at the end * of the sequence, dominating all comparisons. * - * The implicit __supremum comes with __a performance cost. + * The implicit supremum comes with __a performance cost. * * Deriving from _RAIter is not possible since - * _RAIter need not be __a class. + * _RAIter need not be a class. */ template class _GuardedIterator @@ -573,7 +573,7 @@ template_M_temporary[__s]; else - // Absolute __end. + // Absolute end. __sd->_M_pieces[__iam][__s]._M_end = __sd->_M_starts[__s + 1] - __sd->_M_starts[__s]; } } diff --git a/libstdc++-v3/include/parallel/partial_sum.h b/libstdc++-v3/include/parallel/partial_sum.h index 40f6299..da04270 100644 --- a/libstdc++-v3/include/parallel/partial_sum.h +++ b/libstdc++-v3/include/parallel/partial_sum.h @@ -207,7 +207,7 @@ template omp_lock_t __result_lock; omp_init_lock(&__result_lock); - //at least two __chunks per thread + //at least two chunks per thread if(__right - __left + 1 >= 2 * __num_threads * __chunk_size) # pragma omp parallel num_threads(__num_threads) { diff --git a/libstdc++-v3/include/parallel/queue.h b/libstdc++-v3/include/parallel/queue.h index ab6e2d3..587fa53 100644 --- a/libstdc++-v3/include/parallel/queue.h +++ b/libstdc++-v3/include/parallel/queue.h @@ -77,7 +77,7 @@ namespace __gnu_parallel ~_RestrictedBoundedConcurrentQueue() { delete[] _M_base; } - /** @brief Pushes one element into the queue at the front __end. + /** @brief Pushes one element into the queue at the front end. * Must not be called concurrently with pop_front(). */ void push_front(const _Tp& __t) @@ -94,7 +94,7 @@ namespace __gnu_parallel __fetch_and_add(&_M_borders, __encode2(1, 0)); } - /** @brief Pops one element from the queue at the front __end. + /** @brief Pops one element from the queue at the front end. * Must not be called concurrently with pop_front(). */ bool pop_front(_Tp& __t) @@ -118,7 +118,7 @@ namespace __gnu_parallel return false; } - /** @brief Pops one element from the queue at the front __end. + /** @brief Pops one element from the queue at the front end. * Must not be called concurrently with pop_front(). */ bool pop_back(_Tp& __t) //queue behavior diff --git a/libstdc++-v3/include/parallel/random_shuffle.h b/libstdc++-v3/include/parallel/random_shuffle.h index 5994190..faab8d8 100644 --- a/libstdc++-v3/include/parallel/random_shuffle.h +++ b/libstdc++-v3/include/parallel/random_shuffle.h @@ -93,10 +93,10 @@ template /** @brief Number of threads participating in total. */ int _M_num_threads; - /** @brief Begin __index for bins taken care of by this thread. */ + /** @brief Begin index for bins taken care of by this thread. */ _BinIndex _M_bins_begin; - /** @brief End __index for bins taken care of by this thread. */ + /** @brief End index for bins taken care of by this thread. */ _BinIndex __bins_end; /** @brief Random _M_seed for this thread. */ @@ -384,7 +384,7 @@ template delete[] __pus; } -/** @brief Sequential __cache-efficient random shuffle. +/** @brief Sequential cache-efficient random shuffle. * @param __begin Begin iterator of sequence. * @param __end End iterator of sequence. * @param __rng Random number generator to use. diff --git a/libstdc++-v3/include/parallel/settings.h b/libstdc++-v3/include/parallel/settings.h index 525bd9e..e68a0c4 100644 --- a/libstdc++-v3/include/parallel/settings.h +++ b/libstdc++-v3/include/parallel/settings.h @@ -197,7 +197,7 @@ namespace __gnu_parallel /// Minimal input size for partial_sort. _SequenceIndex partial_sort_minimal_n; - /// Ratio for partial_sum. Assume "sum and write __result" to be + /// Ratio for partial_sum. Assume "sum and write result" to be /// this factor slower than just "sum". float partial_sum_dilation; diff --git a/libstdc++-v3/include/parallel/sort.h b/libstdc++-v3/include/parallel/sort.h index a34d773..259b198 100644 --- a/libstdc++-v3/include/parallel/sort.h +++ b/libstdc++-v3/include/parallel/sort.h @@ -85,7 +85,7 @@ namespace __gnu_parallel } /** - * @brief Choose multiway mergesort with __exact splitting, + * @brief Choose multiway mergesort with exact splitting, * for parallel sorting. * @param __begin Begin iterator of input sequence. * @param __end End iterator of input sequence. @@ -163,7 +163,7 @@ namespace __gnu_parallel /** - * @brief Choose multiway mergesort with __exact splitting, + * @brief Choose multiway mergesort with exact splitting, * for parallel sorting. * @param __begin Begin iterator of input sequence. * @param __end End iterator of input sequence. diff --git a/libstdc++-v3/include/parallel/tags.h b/libstdc++-v3/include/parallel/tags.h index 5dfc7f3..43561d2 100644 --- a/libstdc++-v3/include/parallel/tags.h +++ b/libstdc++-v3/include/parallel/tags.h @@ -62,7 +62,7 @@ namespace __gnu_parallel this->_M_num_threads = __num_threads; } - /** @brief Find __out desired number of threads. + /** @brief Find out desired number of threads. * @return Desired number of threads. */ inline _ThreadIndex __get_num_threads() { @@ -111,7 +111,7 @@ namespace __gnu_parallel /** @brief Forces parallel merging - * with __exact splitting, at compile time. */ + * with exact splitting, at compile time. */ struct exact_tag : public parallel_tag { exact_tag() { } @@ -120,7 +120,7 @@ namespace __gnu_parallel }; /** @brief Forces parallel merging - * with __exact splitting, at compile time. */ + * with exact splitting, at compile time. */ struct sampling_tag : public parallel_tag { sampling_tag() { } @@ -139,7 +139,7 @@ namespace __gnu_parallel }; /** @brief Forces parallel sorting using multiway mergesort - * with __exact splitting at compile time. */ + * with exact splitting at compile time. */ struct multiway_mergesort_exact_tag : public parallel_tag { multiway_mergesort_exact_tag() { } diff --git a/libstdc++-v3/include/parallel/workstealing.h b/libstdc++-v3/include/parallel/workstealing.h index 3fb71f5..ad9208c 100644 --- a/libstdc++-v3/include/parallel/workstealing.h +++ b/libstdc++-v3/include/parallel/workstealing.h @@ -127,7 +127,7 @@ template[__num_threads * __stride]; } @@ -154,7 +154,7 @@ template& __my_job = __job[__iam * __stride]; // Random number (for work stealing). @@ -184,7 +184,7 @@ template 0) { - // Work until no productive thread __left. + // Work until no productive thread left. # pragma omp flush(__busy) // Thread has own work to do while (__my_job._M_first <= __my_job._M_last) { // fetch-and-add call - // Reserve __current __job block (size __chunk_size) in my queue. + // Reserve current job block (size __chunk_size) in my queue. _DifferenceType current_job = __fetch_and_add<_DifferenceType>(&(__my_job._M_first), __chunk_size); @@ -265,7 +265,7 @@ template( &(__job[__victim * __stride]._M_first), __steal); @@ -285,7 +285,7 @@ template 0 - // Add accumulated __result to output. + // Add accumulated result to output. omp_set_lock(&__output_lock); __output = __r(__output, __result); omp_unset_lock(&__output_lock); -- 2.7.4