Commit a4797b34 by Paolo Carlini Committed by Paolo Carlini

list_partition.h: Formatting fixes, inline tweaks.

2008-01-14  Paolo Carlini  <pcarlini@suse.de>

	* include/parallel/list_partition.h: Formatting fixes, inline tweaks.
	* include/parallel/numeric: Likewise.
	* include/parallel/balanced_quicksort.h: Likewise.
	* include/parallel/unique_copy.h: Likewise.
	* include/parallel/algobase.h: Likewise.
	* include/parallel/algo.h: Likewise.

From-SVN: r131542
parent ac10b0e1
2008-01-14 Paolo Carlini <pcarlini@suse.de>
* include/parallel/list_partition.h: Formatting fixes, inline tweaks.
* include/parallel/numeric: Likewise.
* include/parallel/balanced_quicksort.h: Likewise.
* include/parallel/unique_copy.h: Likewise.
* include/parallel/algobase.h: Likewise.
* include/parallel/algo.h: Likewise.
2008-01-14 Seongbae Park <seongbae.park@gmail.com> 2008-01-14 Seongbae Park <seongbae.park@gmail.com>
* crossconfig.m4: Add missing header checks, C99 TR1 check, * crossconfig.m4: Add missing header checks, C99 TR1 check,
......
...@@ -1585,7 +1585,7 @@ namespace __parallel ...@@ -1585,7 +1585,7 @@ namespace __parallel
// Parallel algorithm for random access iterators. // Parallel algorithm for random access iterators.
template<typename RandomAccessIterator, typename Size, typename Generator> template<typename RandomAccessIterator, typename Size, typename Generator>
RandomAccessIterator inline RandomAccessIterator
generate_n_switch(RandomAccessIterator begin, Size n, Generator gen, generate_n_switch(RandomAccessIterator begin, Size n, Generator gen,
random_access_iterator_tag, random_access_iterator_tag,
__gnu_parallel::parallelism parallelism_tag __gnu_parallel::parallelism parallelism_tag
...@@ -1940,7 +1940,7 @@ namespace __parallel ...@@ -1940,7 +1940,7 @@ namespace __parallel
// Sequential fallback // Sequential fallback
template<typename RandomAccessIterator> template<typename RandomAccessIterator>
void inline void
partial_sort(RandomAccessIterator begin, RandomAccessIterator middle, partial_sort(RandomAccessIterator begin, RandomAccessIterator middle,
RandomAccessIterator end, __gnu_parallel::sequential_tag) RandomAccessIterator end, __gnu_parallel::sequential_tag)
{ _GLIBCXX_STD_P::partial_sort(begin, middle, end); } { _GLIBCXX_STD_P::partial_sort(begin, middle, end); }
...@@ -2155,4 +2155,3 @@ namespace __parallel ...@@ -2155,4 +2155,3 @@ namespace __parallel
} // end namespace } // end namespace
#endif /* _GLIBCXX_ALGORITHM_H */ #endif /* _GLIBCXX_ALGORITHM_H */
...@@ -330,7 +330,8 @@ template<typename RandomAccessIterator, typename Comparator> ...@@ -330,7 +330,8 @@ template<typename RandomAccessIterator, typename Comparator>
{ {
// Right side larger. // Right side larger.
if ((split_pos2) != end) if ((split_pos2) != end)
tl.leftover_parts.push_front(std::make_pair(split_pos2, end)); tl.leftover_parts.push_front(std::make_pair(split_pos2,
end));
//current.first = begin; //already set anyway //current.first = begin; //already set anyway
current.second = split_pos1; current.second = split_pos1;
......
...@@ -109,7 +109,7 @@ namespace __gnu_parallel ...@@ -109,7 +109,7 @@ namespace __gnu_parallel
{ {
bool make_twice = false; bool make_twice = false;
// According to the oversampling factor, the resizing algorithm is chosen. // The resizing algorithm is chosen according to the oversampling factor.
if (oversampling == 0) if (oversampling == 0)
{ {
make_twice = true; make_twice = true;
......
...@@ -78,7 +78,7 @@ namespace __parallel ...@@ -78,7 +78,7 @@ namespace __parallel
template<typename InputIterator, typename T, typename BinaryOperation, template<typename InputIterator, typename T, typename BinaryOperation,
typename IteratorTag> typename IteratorTag>
T inline T
accumulate_switch(InputIterator begin, InputIterator end, T init, accumulate_switch(InputIterator begin, InputIterator end, T init,
BinaryOperation binary_op, IteratorTag) BinaryOperation binary_op, IteratorTag)
{ return accumulate(begin, end, init, binary_op, { return accumulate(begin, end, init, binary_op,
...@@ -345,10 +345,9 @@ namespace __parallel ...@@ -345,10 +345,9 @@ namespace __parallel
OutputIterator result, BinaryOperation bin_op, OutputIterator result, BinaryOperation bin_op,
random_access_iterator_tag, random_access_iterator_tag) random_access_iterator_tag, random_access_iterator_tag)
{ {
if (_GLIBCXX_PARALLEL_CONDITION(static_cast<__gnu_parallel:: if (_GLIBCXX_PARALLEL_CONDITION(
sequence_index_t>(end - begin) static_cast<__gnu_parallel::sequence_index_t>(end - begin)
>= __gnu_parallel::Settings:: >= __gnu_parallel::Settings::partial_sum_minimal_n))
partial_sum_minimal_n))
return __gnu_parallel::parallel_partial_sum(begin, end, return __gnu_parallel::parallel_partial_sum(begin, end,
result, bin_op); result, bin_op);
else else
......
...@@ -187,7 +187,8 @@ template<typename InputIterator, class OutputIterator> ...@@ -187,7 +187,8 @@ template<typename InputIterator, class OutputIterator>
parallel_unique_copy(InputIterator first, InputIterator last, parallel_unique_copy(InputIterator first, InputIterator last,
OutputIterator result) OutputIterator result)
{ {
typedef typename std::iterator_traits<InputIterator>::value_type value_type; typedef typename std::iterator_traits<InputIterator>::value_type
value_type;
return parallel_unique_copy(first, last, result, return parallel_unique_copy(first, last, result,
std::equal_to<value_type>()); std::equal_to<value_type>());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment