base.h (decode2): Rename to __decode2.

2010-01-11  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/parallel/base.h (decode2): Rename to __decode2.
	(binder2nd): Likewise to __binder2nd.
	* include/parallel/quicksort.h: Adjust callers.
	* include/parallel/balanced_quicksort.h: Likewise.
	* include/parallel/partition.h: Likewise.
	* include/parallel/queue.h: Likewise.

	* include/parallel/algo.h: Qualify with std:: binder2nd use.

From-SVN: r155825
This commit is contained in:
Paolo Carlini 2010-01-12 00:51:50 +00:00 committed by Paolo Carlini
parent 3383f24d53
commit 31380bc4c5
7 changed files with 31 additions and 20 deletions

View File

@ -1,3 +1,14 @@
2010-01-11 Paolo Carlini <paolo.carlini@oracle.com>
* include/parallel/base.h (decode2): Rename to __decode2.
(binder2nd): Likewise to __binder2nd.
* include/parallel/quicksort.h: Adjust callers.
* include/parallel/balanced_quicksort.h: Likewise.
* include/parallel/partition.h: Likewise.
* include/parallel/queue.h: Likewise.
* include/parallel/algo.h: Qualify with std:: binder2nd use.
2010-01-10 Paolo Carlini <paolo.carlini@oracle.com>
* include/debug/string (basic_string<>::basic_string(basic_string&&),

View File

@ -1,6 +1,6 @@
// -*- C++ -*-
// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
//
// 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
@ -150,7 +150,7 @@ namespace __parallel
if (_GLIBCXX_PARALLEL_CONDITION(true))
{
binder2nd<__gnu_parallel::_EqualTo<_ValueType, const _Tp&> >
std::binder2nd<__gnu_parallel::_EqualTo<_ValueType, const _Tp&> >
__comp(__gnu_parallel::_EqualTo<_ValueType, const _Tp&>(), __val);
return __gnu_parallel::__find_template(
__begin, __end, __begin, __comp,

View File

@ -1,6 +1,6 @@
// -*- C++ -*-
// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
//
// 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
@ -135,7 +135,7 @@ namespace __gnu_parallel
std::swap(*__pivot_pos, *(__end - 1));
__pivot_pos = __end - 1;
__gnu_parallel::binder2nd<_Compare, _ValueType, _ValueType, bool>
__gnu_parallel::__binder2nd<_Compare, _ValueType, _ValueType, bool>
__pred(__comp, *__pivot_pos);
// Divide, returning __end - __begin - 1 in the worst case.
@ -287,7 +287,7 @@ namespace __gnu_parallel
std::swap(*__pivot_pos, *(__end - 1));
__pivot_pos = __end - 1;
__gnu_parallel::binder2nd
__gnu_parallel::__binder2nd
<_Compare, _ValueType, _ValueType, bool>
__pred(__comp, *__pivot_pos);

View File

@ -1,6 +1,6 @@
// -*- C++ -*-
// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
//
// 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
@ -113,7 +113,7 @@ namespace __gnu_parallel
* @param __b Second integer, to be encoded in the least-significant
* @c _CASable_bits/2 bits.
* @return value encoding @c __a and @c __b.
* @see decode2
* @see __decode2
*/
inline _CASable
__encode2(int __a, int __b) //must all be non-negative, actually
@ -130,7 +130,7 @@ namespace __gnu_parallel
* @see __encode2
*/
inline void
decode2(_CASable __x, int& __a, int& __b)
__decode2(_CASable __x, int& __a, int& __b)
{
__a = (int)((__x >> (_CASable_bits / 2)) & _CASable_mask);
__b = (int)((__x >> 0 ) & _CASable_mask);
@ -217,7 +217,7 @@ namespace __gnu_parallel
*/
template<typename _Operation, typename _FirstArgumentType,
typename _SecondArgumentType, typename _ResultType>
class binder2nd
class __binder2nd
: public std::unary_function<_FirstArgumentType, _ResultType>
{
protected:
@ -225,7 +225,7 @@ namespace __gnu_parallel
_SecondArgumentType _M_value;
public:
binder2nd(const _Operation& __x, const _SecondArgumentType& __y)
__binder2nd(const _Operation& __x, const _SecondArgumentType& __y)
: _M_op(__x), _M_value(__y) { }
_ResultType

View File

@ -1,6 +1,6 @@
// -*- C++ -*-
// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
//
// 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
@ -367,7 +367,7 @@ namespace __gnu_parallel
// __gnu_parallel::_Lexicographic<S, int,
// __gnu_parallel::_Less<S, S> >
// __pivot_pos == std::pair<S, int>*
__gnu_parallel::binder2nd<_Compare, _ValueType, _ValueType, bool>
__gnu_parallel::__binder2nd<_Compare, _ValueType, _ValueType, bool>
__pred(__comp, *__pivot_pos);
// Divide, leave pivot unchanged in last place.

View File

@ -1,6 +1,6 @@
// -*- C++ -*-
// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
//
// 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
@ -84,7 +84,7 @@ namespace __gnu_parallel
{
_CASable __former_borders = _M_borders;
int __former_front, __former_back;
decode2(__former_borders, __former_front, __former_back);
__decode2(__former_borders, __former_front, __former_back);
*(_M_base + __former_front % _M_max_size) = __t;
#if _GLIBCXX_ASSERTIONS
// Otherwise: front - back > _M_max_size eventually.
@ -101,7 +101,7 @@ namespace __gnu_parallel
{
int __former_front, __former_back;
#pragma omp flush
decode2(_M_borders, __former_front, __former_back);
__decode2(_M_borders, __former_front, __former_back);
while (__former_front > __former_back)
{
// Chance.
@ -116,7 +116,7 @@ namespace __gnu_parallel
return true;
}
#pragma omp flush
decode2(_M_borders, __former_front, __former_back);
__decode2(_M_borders, __former_front, __former_back);
}
return false;
}
@ -128,7 +128,7 @@ namespace __gnu_parallel
{
int __former_front, __former_back;
#pragma omp flush
decode2(_M_borders, __former_front, __former_back);
__decode2(_M_borders, __former_front, __former_back);
while (__former_front > __former_back)
{
// Chance.
@ -143,7 +143,7 @@ namespace __gnu_parallel
return true;
}
#pragma omp flush
decode2(_M_borders, __former_front, __former_back);
__decode2(_M_borders, __former_front, __former_back);
}
return false;
}

View File

@ -1,6 +1,6 @@
// -*- C++ -*-
// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
//
// 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
@ -77,7 +77,7 @@ namespace __gnu_parallel
_ValueType& __pivot = __samples[__pivot_rank * __num_samples / __n];
__gnu_parallel::binder2nd<_Compare, _ValueType, _ValueType, bool>
__gnu_parallel::__binder2nd<_Compare, _ValueType, _ValueType, bool>
__pred(__comp, __pivot);
_DifferenceType __split = __parallel_partition(__begin, __end,
__pred, __num_threads);