multiway_merge.h: Uglify equally_split and equally_split_point throughout.

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

	* include/parallel/multiway_merge.h: Uglify equally_split
	and equally_split_point throughout.
	* include/parallel/par_loop.h: Likewise.
	* include/parallel/equally_split.h: Likewise.
	* include/parallel/set_operations.h: Likewise.
	* include/parallel/unique_copy.h: Likewise.
	* include/parallel/multiway_mergesort.h: Likewise.
	* include/parallel/search.h: Likewise.
	* include/parallel/partial_sum.h: Likewise.
	* include/parallel/find.h: Likewise.

From-SVN: r172923
This commit is contained in:
Paolo Carlini 2011-04-24 23:51:49 +00:00
parent ed4c109ee8
commit 6b77089f40
10 changed files with 39 additions and 26 deletions

View File

@ -1,3 +1,16 @@
2011-04-24 Paolo Carlini <paolo.carlini@oracle.com>
* include/parallel/multiway_merge.h: Uglify equally_split
and equally_split_point throughout.
* include/parallel/par_loop.h: Likewise.
* include/parallel/equally_split.h: Likewise.
* include/parallel/set_operations.h: Likewise.
* include/parallel/unique_copy.h: Likewise.
* include/parallel/multiway_mergesort.h: Likewise.
* include/parallel/search.h: Likewise.
* include/parallel/partial_sum.h: Likewise.
* include/parallel/find.h: Likewise.
2011-04-24 Gerald Pfeifer <gerald@pfeifer.com> 2011-04-24 Gerald Pfeifer <gerald@pfeifer.com>
* doc/xml/manual/parallel_mode.xml: Fix link to libgomp online * doc/xml/manual/parallel_mode.xml: Fix link to libgomp online

View File

@ -1,6 +1,6 @@
// -*- C++ -*- // -*- C++ -*-
// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. // Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the terms
@ -45,7 +45,7 @@ namespace __gnu_parallel
* @returns End of __splitter sequence, i.e. @c __s+__num_threads+1 */ * @returns End of __splitter sequence, i.e. @c __s+__num_threads+1 */
template<typename _DifferenceType, typename _OutputIterator> template<typename _DifferenceType, typename _OutputIterator>
_OutputIterator _OutputIterator
equally_split(_DifferenceType __n, _ThreadIndex __num_threads, __equally_split(_DifferenceType __n, _ThreadIndex __num_threads,
_OutputIterator __s) _OutputIterator __s)
{ {
_DifferenceType __chunk_length = __n / __num_threads; _DifferenceType __chunk_length = __n / __num_threads;
@ -71,7 +71,7 @@ namespace __gnu_parallel
* @returns splitting point */ * @returns splitting point */
template<typename _DifferenceType> template<typename _DifferenceType>
_DifferenceType _DifferenceType
equally_split_point(_DifferenceType __n, __equally_split_point(_DifferenceType __n,
_ThreadIndex __num_threads, _ThreadIndex __num_threads,
_ThreadIndex __thread_no) _ThreadIndex __thread_no)
{ {

View File

@ -1,6 +1,6 @@
// -*- C++ -*- // -*- C++ -*-
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. // Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the terms
@ -118,7 +118,7 @@ namespace __gnu_parallel
{ {
__num_threads = omp_get_num_threads(); __num_threads = omp_get_num_threads();
__borders = new _DifferenceType[__num_threads + 1]; __borders = new _DifferenceType[__num_threads + 1];
equally_split(__length, __num_threads, __borders); __equally_split(__length, __num_threads, __borders);
} //single } //single
_ThreadIndex __iam = omp_get_thread_num(); _ThreadIndex __iam = omp_get_thread_num();

View File

@ -1,6 +1,6 @@
// -*- C++ -*- // -*- C++ -*-
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. // Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the terms
@ -1139,7 +1139,7 @@ namespace __gnu_parallel
_DifferenceType* __borders = _DifferenceType* __borders =
new _DifferenceType[__num_threads + 1]; new _DifferenceType[__num_threads + 1];
equally_split(__length, __num_threads, __borders); __equally_split(__length, __num_threads, __borders);
for (_ThreadIndex __s = 0; __s < (__num_threads - 1); ++__s) for (_ThreadIndex __s = 0; __s < (__num_threads - 1); ++__s)
{ {

View File

@ -1,6 +1,6 @@
// -*- C++ -*- // -*- C++ -*-
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. // Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the terms
@ -105,7 +105,7 @@ namespace __gnu_parallel
_DifferenceType* __es = new _DifferenceType[__num_samples + 2]; _DifferenceType* __es = new _DifferenceType[__num_samples + 2];
equally_split(__sd->_M_starts[__iam + 1] - __sd->_M_starts[__iam], __equally_split(__sd->_M_starts[__iam + 1] - __sd->_M_starts[__iam],
__num_samples + 1, __es); __num_samples + 1, __es);
for (_DifferenceType __i = 0; __i < __num_samples; ++__i) for (_DifferenceType __i = 0; __i < __num_samples; ++__i)

View File

@ -1,6 +1,6 @@
// -*- C++ -*- // -*- C++ -*-
// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. // Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the terms
@ -95,8 +95,8 @@ namespace __gnu_parallel
(::operator new(sizeof(_Result))); (::operator new(sizeof(_Result)));
_DifferenceType _DifferenceType
__start = equally_split_point(__length, __num_threads, __iam), __start = __equally_split_point(__length, __num_threads, __iam),
__stop = equally_split_point(__length, __num_threads, __iam + 1); __stop = __equally_split_point(__length, __num_threads, __iam + 1);
if (__start < __stop) if (__start < __stop)
{ {

View File

@ -1,6 +1,6 @@
// -*- C++ -*- // -*- C++ -*-
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. // Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the terms
@ -124,7 +124,7 @@ namespace __gnu_parallel
__borders = new _DifferenceType[__num_threads + 2]; __borders = new _DifferenceType[__num_threads + 2];
if (__s.partial_sum_dilation == 1.0f) if (__s.partial_sum_dilation == 1.0f)
equally_split(__n, __num_threads + 1, __borders); __equally_split(__n, __num_threads + 1, __borders);
else else
{ {
_DifferenceType __first_part_length = _DifferenceType __first_part_length =

View File

@ -1,6 +1,6 @@
// -*- C++ -*- // -*- C++ -*-
// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. // Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the terms
@ -120,7 +120,7 @@ namespace __gnu_parallel
{ {
__num_threads = omp_get_num_threads(); __num_threads = omp_get_num_threads();
__splitters = new _DifferenceType[__num_threads + 1]; __splitters = new _DifferenceType[__num_threads + 1];
equally_split(__input_length, __num_threads, __splitters); __equally_split(__input_length, __num_threads, __splitters);
} }
_ThreadIndex __iam = omp_get_thread_num(); _ThreadIndex __iam = omp_get_thread_num();

View File

@ -1,6 +1,6 @@
// -*- C++ -*- // -*- C++ -*-
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. // Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the terms
@ -383,7 +383,7 @@ namespace __gnu_parallel
__num_threads = omp_get_num_threads(); __num_threads = omp_get_num_threads();
__borders = new _DifferenceType[__num_threads + 2]; __borders = new _DifferenceType[__num_threads + 2];
equally_split(__size, __num_threads + 1, __borders); __equally_split(__size, __num_threads + 1, __borders);
__block_begins = new _IteratorPair[__num_threads + 1]; __block_begins = new _IteratorPair[__num_threads + 1];
// Very __start. // Very __start.
__block_begins[0] = std::make_pair(__begin1, __begin2); __block_begins[0] = std::make_pair(__begin1, __begin2);

View File

@ -1,6 +1,6 @@
// -*- C++ -*- // -*- C++ -*-
// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. // Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the terms
@ -74,7 +74,7 @@ namespace __gnu_parallel
{ {
__num_threads = omp_get_num_threads(); __num_threads = omp_get_num_threads();
__borders = new _DifferenceType[__num_threads + 2]; __borders = new _DifferenceType[__num_threads + 2];
equally_split(__size, __num_threads + 1, __borders); __equally_split(__size, __num_threads + 1, __borders);
__counter = new _DifferenceType[__num_threads + 1]; __counter = new _DifferenceType[__num_threads + 1];
} }