From 6b77089f406c14b2f54ffd709987738185de3904 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Sun, 24 Apr 2011 23:51:49 +0000 Subject: [PATCH] multiway_merge.h: Uglify equally_split and equally_split_point throughout. 2011-04-24 Paolo Carlini * 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 --- libstdc++-v3/ChangeLog | 17 +++++++++++++++-- libstdc++-v3/include/parallel/equally_split.h | 12 ++++++------ libstdc++-v3/include/parallel/find.h | 4 ++-- libstdc++-v3/include/parallel/multiway_merge.h | 4 ++-- .../include/parallel/multiway_mergesort.h | 6 +++--- libstdc++-v3/include/parallel/par_loop.h | 6 +++--- libstdc++-v3/include/parallel/partial_sum.h | 4 ++-- libstdc++-v3/include/parallel/search.h | 4 ++-- libstdc++-v3/include/parallel/set_operations.h | 4 ++-- libstdc++-v3/include/parallel/unique_copy.h | 4 ++-- 10 files changed, 39 insertions(+), 26 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 629435dc920..9d767f5beef 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,10 +1,23 @@ +2011-04-24 Paolo Carlini + + * 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 * doc/xml/manual/parallel_mode.xml: Fix link to libgomp online documentation. Expand link text. 2011-04-24 Gerald Pfeifer - + * libsupc++/cxxabi.h: Adjust link to FAQ entry. 2011-04-22 François Dumont @@ -37,7 +50,7 @@ (ref(const A&&), cref(const A&&): Define as deleted. * include/std/future (async): Simplify SFINAE and use result_of to support pointer to member. - * testsuite/20_util/reference_wrapper/invoke.cc: Test pointer to + * testsuite/20_util/reference_wrapper/invoke.cc: Test pointer to member. * testsuite/20_util/reference_wrapper/24803.cc: Likewise. * testsuite/20_util/reference_wrapper/typedefs.cc: Test for types diff --git a/libstdc++-v3/include/parallel/equally_split.h b/libstdc++-v3/include/parallel/equally_split.h index 481c9886840..a840ae3147a 100644 --- a/libstdc++-v3/include/parallel/equally_split.h +++ b/libstdc++-v3/include/parallel/equally_split.h @@ -1,6 +1,6 @@ // -*- 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 // software; you can redistribute it and/or modify it under the terms @@ -45,8 +45,8 @@ namespace __gnu_parallel * @returns End of __splitter sequence, i.e. @c __s+__num_threads+1 */ template _OutputIterator - equally_split(_DifferenceType __n, _ThreadIndex __num_threads, - _OutputIterator __s) + __equally_split(_DifferenceType __n, _ThreadIndex __num_threads, + _OutputIterator __s) { _DifferenceType __chunk_length = __n / __num_threads; _DifferenceType __num_longer_chunks = __n % __num_threads; @@ -71,9 +71,9 @@ namespace __gnu_parallel * @returns splitting point */ template _DifferenceType - equally_split_point(_DifferenceType __n, - _ThreadIndex __num_threads, - _ThreadIndex __thread_no) + __equally_split_point(_DifferenceType __n, + _ThreadIndex __num_threads, + _ThreadIndex __thread_no) { _DifferenceType __chunk_length = __n / __num_threads; _DifferenceType __num_longer_chunks = __n % __num_threads; diff --git a/libstdc++-v3/include/parallel/find.h b/libstdc++-v3/include/parallel/find.h index 28bc703e588..bd4294a12a7 100644 --- a/libstdc++-v3/include/parallel/find.h +++ b/libstdc++-v3/include/parallel/find.h @@ -1,6 +1,6 @@ // -*- 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 // 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(); __borders = new _DifferenceType[__num_threads + 1]; - equally_split(__length, __num_threads, __borders); + __equally_split(__length, __num_threads, __borders); } //single _ThreadIndex __iam = omp_get_thread_num(); diff --git a/libstdc++-v3/include/parallel/multiway_merge.h b/libstdc++-v3/include/parallel/multiway_merge.h index 0fd3da2d656..a5fd3be1bd0 100644 --- a/libstdc++-v3/include/parallel/multiway_merge.h +++ b/libstdc++-v3/include/parallel/multiway_merge.h @@ -1,6 +1,6 @@ // -*- 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 // software; you can redistribute it and/or modify it under the terms @@ -1139,7 +1139,7 @@ namespace __gnu_parallel _DifferenceType* __borders = 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) { diff --git a/libstdc++-v3/include/parallel/multiway_mergesort.h b/libstdc++-v3/include/parallel/multiway_mergesort.h index c0dab63f140..2cb80138766 100644 --- a/libstdc++-v3/include/parallel/multiway_mergesort.h +++ b/libstdc++-v3/include/parallel/multiway_mergesort.h @@ -1,6 +1,6 @@ // -*- 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 // software; you can redistribute it and/or modify it under the terms @@ -105,8 +105,8 @@ namespace __gnu_parallel _DifferenceType* __es = new _DifferenceType[__num_samples + 2]; - equally_split(__sd->_M_starts[__iam + 1] - __sd->_M_starts[__iam], - __num_samples + 1, __es); + __equally_split(__sd->_M_starts[__iam + 1] - __sd->_M_starts[__iam], + __num_samples + 1, __es); for (_DifferenceType __i = 0; __i < __num_samples; ++__i) ::new(&(__sd->_M_samples[__iam * __num_samples + __i])) diff --git a/libstdc++-v3/include/parallel/par_loop.h b/libstdc++-v3/include/parallel/par_loop.h index 1e21d3ad042..9671c1dd398 100644 --- a/libstdc++-v3/include/parallel/par_loop.h +++ b/libstdc++-v3/include/parallel/par_loop.h @@ -1,6 +1,6 @@ // -*- 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 // software; you can redistribute it and/or modify it under the terms @@ -95,8 +95,8 @@ namespace __gnu_parallel (::operator new(sizeof(_Result))); _DifferenceType - __start = equally_split_point(__length, __num_threads, __iam), - __stop = equally_split_point(__length, __num_threads, __iam + 1); + __start = __equally_split_point(__length, __num_threads, __iam), + __stop = __equally_split_point(__length, __num_threads, __iam + 1); if (__start < __stop) { diff --git a/libstdc++-v3/include/parallel/partial_sum.h b/libstdc++-v3/include/parallel/partial_sum.h index 5513c2f9375..425e868fe6b 100644 --- a/libstdc++-v3/include/parallel/partial_sum.h +++ b/libstdc++-v3/include/parallel/partial_sum.h @@ -1,6 +1,6 @@ // -*- 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 // 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]; if (__s.partial_sum_dilation == 1.0f) - equally_split(__n, __num_threads + 1, __borders); + __equally_split(__n, __num_threads + 1, __borders); else { _DifferenceType __first_part_length = diff --git a/libstdc++-v3/include/parallel/search.h b/libstdc++-v3/include/parallel/search.h index 9709925618d..9544ff9e069 100644 --- a/libstdc++-v3/include/parallel/search.h +++ b/libstdc++-v3/include/parallel/search.h @@ -1,6 +1,6 @@ // -*- 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 // 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(); __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(); diff --git a/libstdc++-v3/include/parallel/set_operations.h b/libstdc++-v3/include/parallel/set_operations.h index f552c1dda1b..9699ae9840f 100644 --- a/libstdc++-v3/include/parallel/set_operations.h +++ b/libstdc++-v3/include/parallel/set_operations.h @@ -1,6 +1,6 @@ // -*- 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 // 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(); __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]; // Very __start. __block_begins[0] = std::make_pair(__begin1, __begin2); diff --git a/libstdc++-v3/include/parallel/unique_copy.h b/libstdc++-v3/include/parallel/unique_copy.h index 72c84a9ccf2..27221e78a3a 100644 --- a/libstdc++-v3/include/parallel/unique_copy.h +++ b/libstdc++-v3/include/parallel/unique_copy.h @@ -1,6 +1,6 @@ // -*- 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 // 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(); __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]; } -- 2.30.2