OSDN Git Service

2009-09-23 Johannes Singler <singler@ira.uka.de>
authorsingler <singler@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Sep 2009 08:09:50 +0000 (08:09 +0000)
committersingler <singler@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Sep 2009 08:09:50 +0000 (08:09 +0000)
        * include/parallel/algobase.h: Uglify internal identifiers;
        correct line breaks.
        * include/parallel/algo.h: Likewise.
        * include/parallel/base.h: Likewise.
        * include/parallel/equally_split.h: Likewise.
        * include/parallel/find.h: Likewise.
        * include/parallel/find_selectors.h: Likewise.
        * include/parallel/for_each_selectors.h: Likewise.
        * include/parallel/list_partition.h: Likewise.
        * include/parallel/losertree.h: Likewise.
        * include/parallel/merge.h: Likewise.
        * include/parallel/multiseq_selection.h: Likewise.
        * include/parallel/multiway_merge.h: Likewise.
        * include/parallel/multiway_mergesort.h: Likewise.
        * include/parallel/numeric: Likewise.
        * include/parallel/numericfwd.h: Likewise.
        * include/parallel/omp_loop.h: Likewise.
        * include/parallel/omp_loop_static.h: Likewise.
        * include/parallel/par_loop.h: Likewise.
        * include/parallel/partition.h: Likewise.
        * include/parallel/random_shuffle.h: Likewise.
        * include/parallel/search.h: Likewise.
        * include/parallel/sort.h: Likewise.
        * include/parallel/workstealing.h: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152061 138bc75d-0d04-0410-961f-82ee72b054a4

24 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/parallel/algo.h
libstdc++-v3/include/parallel/algobase.h
libstdc++-v3/include/parallel/base.h
libstdc++-v3/include/parallel/equally_split.h
libstdc++-v3/include/parallel/find.h
libstdc++-v3/include/parallel/find_selectors.h
libstdc++-v3/include/parallel/for_each_selectors.h
libstdc++-v3/include/parallel/list_partition.h
libstdc++-v3/include/parallel/losertree.h
libstdc++-v3/include/parallel/merge.h
libstdc++-v3/include/parallel/multiseq_selection.h
libstdc++-v3/include/parallel/multiway_merge.h
libstdc++-v3/include/parallel/multiway_mergesort.h
libstdc++-v3/include/parallel/numeric
libstdc++-v3/include/parallel/numericfwd.h
libstdc++-v3/include/parallel/omp_loop.h
libstdc++-v3/include/parallel/omp_loop_static.h
libstdc++-v3/include/parallel/par_loop.h
libstdc++-v3/include/parallel/partition.h
libstdc++-v3/include/parallel/random_shuffle.h
libstdc++-v3/include/parallel/search.h
libstdc++-v3/include/parallel/sort.h
libstdc++-v3/include/parallel/workstealing.h

index e49f3e2..2696be7 100644 (file)
@@ -1,3 +1,30 @@
+2009-09-23  Johannes Singler  <singler@ira.uka.de>
+
+        * include/parallel/algobase.h: Uglify internal identifiers;
+        correct line breaks.
+        * include/parallel/algo.h: Likewise.
+        * include/parallel/base.h: Likewise.
+        * include/parallel/equally_split.h: Likewise.
+        * include/parallel/find.h: Likewise.
+        * include/parallel/find_selectors.h: Likewise.
+        * include/parallel/for_each_selectors.h: Likewise.
+        * include/parallel/list_partition.h: Likewise.
+        * include/parallel/losertree.h: Likewise.
+        * include/parallel/merge.h: Likewise.
+        * include/parallel/multiseq_selection.h: Likewise.
+        * include/parallel/multiway_merge.h: Likewise.
+        * include/parallel/multiway_mergesort.h: Likewise.
+        * include/parallel/numeric: Likewise.
+        * include/parallel/numericfwd.h: Likewise.
+        * include/parallel/omp_loop.h: Likewise.
+        * include/parallel/omp_loop_static.h: Likewise.
+        * include/parallel/par_loop.h: Likewise.
+        * include/parallel/partition.h: Likewise.
+        * include/parallel/random_shuffle.h: Likewise.
+        * include/parallel/search.h: Likewise.
+        * include/parallel/sort.h: Likewise.
+        * include/parallel/workstealing.h: Likewise.
+
 2009-09-21  Gerald Pfeifer  <gerald@pfeifer.com>
 
        * doc/xml/manual/appendix_contributing.xml: Adjust link to
index 1a75d24..ec632b4 100644 (file)
@@ -150,8 +150,8 @@ namespace __parallel
 
       if (_GLIBCXX_PARALLEL_CONDITION(true))
         {
-          binder2nd<__gnu_parallel::equal_to<_ValueType, const _Tp&> >
-            __comp(__gnu_parallel::equal_to<_ValueType, const _Tp&>(), __val);
+          binder2nd<__gnu_parallel::_EqualTo<_ValueType, const _Tp&> >
+            __comp(__gnu_parallel::_EqualTo<_ValueType, const _Tp&>(), __val);
           return __gnu_parallel::__find_template(
                    __begin, __end, __begin, __comp,
                    __gnu_parallel::__find_if_selector()).first;
@@ -293,7 +293,7 @@ namespace __parallel
       typedef typename iteratorf_traits::value_type _FValueType;
 
       return find_first_of(__begin1, __end1, __begin2, __end2, __gnu_parallel::
-                           equal_to<_IValueType, _FValueType>());
+                           _EqualTo<_IValueType, _FValueType>());
     }
 
   // Sequential fallback
@@ -815,15 +815,15 @@ namespace __parallel
 
       if (_GLIBCXX_PARALLEL_CONDITION(true))
         {
-          _RAIter spot = __gnu_parallel::
+          _RAIter __spot = __gnu_parallel::
               __find_template(
                 __begin, __end - 1, __begin, equal_to<_ValueType>(),
                 __gnu_parallel::__adjacent_find_selector())
             .first;
-          if (spot == (__end - 1))
+          if (__spot == (__end - 1))
             return __end;
           else
-            return spot;
+            return __spot;
         }
       else
         return adjacent_find(__begin, __end, __gnu_parallel::sequential_tag());
@@ -1038,16 +1038,16 @@ namespace __parallel
                   _RAIter2 __begin2, _RAIter2 __end2,
                   random_access_iterator_tag, random_access_iterator_tag)
     {
-      typedef std::iterator_traits<_RAIter1> iterator1_traits;
-      typedef typename iterator1_traits::value_type _ValueType1;
-      typedef std::iterator_traits<_RAIter2> iterator2_traits;
-      typedef typename iterator2_traits::value_type _ValueType2;
+      typedef std::iterator_traits<_RAIter1> _Iterator1Traits;
+      typedef typename _Iterator1Traits::value_type _ValueType1;
+      typedef std::iterator_traits<_RAIter2> _Iterator2Traits;
+      typedef typename _Iterator2Traits::value_type _ValueType2;
 
       if (_GLIBCXX_PARALLEL_CONDITION(true))
         return __gnu_parallel::
           __search_template(
             __begin1, __end1, __begin2, __end2,
-            __gnu_parallel::equal_to<_ValueType1, _ValueType2>());
+            __gnu_parallel::_EqualTo<_ValueType1, _ValueType2>());
       else
         return search(__begin1, __end1, __begin2, __end2,
                       __gnu_parallel::sequential_tag());
@@ -1069,10 +1069,10 @@ namespace __parallel
     search(_FIterator1 __begin1, _FIterator1 __end1,
            _FIterator2 __begin2, _FIterator2 __end2)
     {
-      typedef std::iterator_traits<_FIterator1> iterator1_traits;
-      typedef typename iterator1_traits::iterator_category _IteratorCategory1;
-      typedef std::iterator_traits<_FIterator2> iterator2_traits;
-      typedef typename iterator2_traits::iterator_category _IteratorCategory2;
+      typedef std::iterator_traits<_FIterator1> _Iterator1Traits;
+      typedef typename _Iterator1Traits::iterator_category _IteratorCategory1;
+      typedef std::iterator_traits<_FIterator2> _Iterator2Traits;
+      typedef typename _Iterator2Traits::iterator_category _IteratorCategory2;
 
       return __search_switch(__begin1, __end1, __begin2, __end2,
                            _IteratorCategory1(), _IteratorCategory2());
@@ -1124,10 +1124,10 @@ namespace __parallel
            _FIterator2 __begin2, _FIterator2 __end2,
            _BinaryPredicate  __pred)
     {
-      typedef std::iterator_traits<_FIterator1> iterator1_traits;
-      typedef typename iterator1_traits::iterator_category _IteratorCategory1;
-      typedef std::iterator_traits<_FIterator2> iterator2_traits;
-      typedef typename iterator2_traits::iterator_category _IteratorCategory2;
+      typedef std::iterator_traits<_FIterator1> _Iterator1Traits;
+      typedef typename _Iterator1Traits::iterator_category _IteratorCategory1;
+      typedef std::iterator_traits<_FIterator2> _Iterator2Traits;
+      typedef typename _Iterator2Traits::iterator_category _IteratorCategory2;
       return __search_switch(__begin1, __end1, __begin2, __end2, __pred,
                            _IteratorCategory1(), _IteratorCategory2());
     }
@@ -1135,47 +1135,47 @@ namespace __parallel
   // Sequential fallback
   template<typename _FIterator, typename _Integer, typename _Tp>
     inline _FIterator
-    search_n(_FIterator __begin, _FIterator __end, _Integer count,
+    search_n(_FIterator __begin, _FIterator __end, _Integer __count,
              const _Tp& __val, __gnu_parallel::sequential_tag)
-    { return _GLIBCXX_STD_P::search_n(__begin, __end, count, __val); }
+    { return _GLIBCXX_STD_P::search_n(__begin, __end, __count, __val); }
 
   // Sequential fallback
   template<typename _FIterator, typename _Integer, typename _Tp,
            typename _BinaryPredicate>
     inline _FIterator
-    search_n(_FIterator __begin, _FIterator __end, _Integer count,
+    search_n(_FIterator __begin, _FIterator __end, _Integer __count,
              const _Tp& __val, _BinaryPredicate __binary_pred,
              __gnu_parallel::sequential_tag)
     { return _GLIBCXX_STD_P::search_n(
-               __begin, __end, count, __val, __binary_pred); }
+               __begin, __end, __count, __val, __binary_pred); }
 
   // Public interface.
   template<typename _FIterator, typename _Integer, typename _Tp>
     inline _FIterator
-    search_n(_FIterator __begin, _FIterator __end, _Integer count,
+    search_n(_FIterator __begin, _FIterator __end, _Integer __count,
              const _Tp& __val)
     {
       typedef typename iterator_traits<_FIterator>::value_type _ValueType;
-      return search_n(__begin, __end, count, __val,
-                      __gnu_parallel::equal_to<_ValueType, _Tp>());
+      return search_n(__begin, __end, __count, __val,
+                      __gnu_parallel::_EqualTo<_ValueType, _Tp>());
     }
 
   // Parallel algorithm for random access iterators.
   template<typename _RAIter, typename _Integer,
            typename _Tp, typename _BinaryPredicate>
     _RAIter
-    __search_n_switch(_RAIter __begin, _RAIter __end, _Integer count,
+    __search_n_switch(_RAIter __begin, _RAIter __end, _Integer __count,
                       const _Tp& __val, _BinaryPredicate __binary_pred,
                       random_access_iterator_tag)
     {
       if (_GLIBCXX_PARALLEL_CONDITION(true))
         {
-          __gnu_parallel::_PseudoSequence<_Tp, _Integer> __ps(__val, count);
+          __gnu_parallel::_PseudoSequence<_Tp, _Integer> __ps(__val, __count);
           return __gnu_parallel::__search_template(
                    __begin, __end, __ps.begin(), __ps.end(), __binary_pred);
         }
       else
-        return std::__search_n(__begin, __end, count, __val,
+        return std::__search_n(__begin, __end, __count, __val,
                                __binary_pred, random_access_iterator_tag());
     }
 
@@ -1183,20 +1183,20 @@ namespace __parallel
   template<typename _FIterator, typename _Integer, typename _Tp,
            typename _BinaryPredicate, typename _IteratorTag>
     inline _FIterator
-    __search_n_switch(_FIterator __begin, _FIterator __end, _Integer count,
+    __search_n_switch(_FIterator __begin, _FIterator __end, _Integer __count,
                       const _Tp& __val, _BinaryPredicate __binary_pred,
                       _IteratorTag)
-    { return __search_n(__begin, __end, count, __val, __binary_pred,
+    { return __search_n(__begin, __end, __count, __val, __binary_pred,
                         _IteratorTag()); }
 
   // Public interface.
   template<typename _FIterator, typename _Integer, typename _Tp,
            typename _BinaryPredicate>
     inline _FIterator
-    search_n(_FIterator __begin, _FIterator __end, _Integer count,
+    search_n(_FIterator __begin, _FIterator __end, _Integer __count,
              const _Tp& __val, _BinaryPredicate __binary_pred)
     {
-      return __search_n_switch(__begin, __end, count, __val, __binary_pred,
+      return __search_n_switch(__begin, __end, __count, __val, __binary_pred,
                              typename std::iterator_traits<_FIterator>::
                              iterator_category());
     }
@@ -1207,15 +1207,15 @@ namespace __parallel
            typename _UnaryOperation>
     inline _OutputIterator
     transform(_IIter __begin, _IIter __end, _OutputIterator __result, 
-              _UnaryOperation unary_op, __gnu_parallel::sequential_tag)
-    { return _GLIBCXX_STD_P::transform(__begin, __end, __result, unary_op); }
+              _UnaryOperation __unary_op, __gnu_parallel::sequential_tag)
+    { return _GLIBCXX_STD_P::transform(__begin, __end, __result, __unary_op); }
 
   // Parallel unary transform for random access iterators.
   template<typename _RAIter1, typename _RAIter2,
            typename _UnaryOperation>
     _RAIter2
     __transform1_switch(_RAIter1 __begin, _RAIter1 __end,
-                      _RAIter2 __result, _UnaryOperation unary_op,
+                      _RAIter2 __result, _UnaryOperation __unary_op,
                       random_access_iterator_tag, random_access_iterator_tag,
                       __gnu_parallel::_Parallelism __parallelism_tag
                       = __gnu_parallel::parallel_balanced)
@@ -1233,13 +1233,13 @@ namespace __parallel
           __gnu_parallel::__transform1_selector<_ItTrip> __functionality;
           __gnu_parallel::
             __for_each_template_random_access(
-              begin_pair, end_pair, unary_op, __functionality,
+              begin_pair, end_pair, __unary_op, __functionality,
               __gnu_parallel::_DummyReduct(),
               __dummy, __dummy, -1, __parallelism_tag);
           return __functionality._M_finish_iterator;
         }
       else
-        return transform(__begin, __end, __result, unary_op, 
+        return transform(__begin, __end, __result, __unary_op, 
                          __gnu_parallel::sequential_tag());
     }
 
@@ -1249,9 +1249,9 @@ namespace __parallel
            typename _IteratorTag2>
     inline _RAIter2
     __transform1_switch(_RAIter1 __begin, _RAIter1 __end,
-                      _RAIter2 __result, _UnaryOperation unary_op,
+                      _RAIter2 __result, _UnaryOperation __unary_op,
                       _IteratorTag1, _IteratorTag2)
-    { return transform(__begin, __end, __result, unary_op, 
+    { return transform(__begin, __end, __result, __unary_op, 
                        __gnu_parallel::sequential_tag()); }
 
   // Public interface.
@@ -1259,7 +1259,7 @@ namespace __parallel
            typename _UnaryOperation>
     inline _OutputIterator
     transform(_IIter __begin, _IIter __end, _OutputIterator __result,
-              _UnaryOperation unary_op, 
+              _UnaryOperation __unary_op, 
               __gnu_parallel::_Parallelism __parallelism_tag)
     {
       typedef std::iterator_traits<_IIter> _IIterTraits;
@@ -1267,7 +1267,7 @@ namespace __parallel
       typedef typename _IIterTraits::iterator_category _IIteratorCategory;
       typedef typename _OIterTraits::iterator_category _OIterCategory;
 
-      return __transform1_switch(__begin, __end, __result, unary_op,
+      return __transform1_switch(__begin, __end, __result, __unary_op,
                                _IIteratorCategory(), _OIterCategory(), 
                                __parallelism_tag);
     }
@@ -1276,14 +1276,14 @@ namespace __parallel
            typename _UnaryOperation>
     inline _OutputIterator
     transform(_IIter __begin, _IIter __end, _OutputIterator __result,
-              _UnaryOperation unary_op)
+              _UnaryOperation __unary_op)
     {
       typedef std::iterator_traits<_IIter> _IIterTraits;
       typedef std::iterator_traits<_OutputIterator> _OIterTraits;
       typedef typename _IIterTraits::iterator_category _IIteratorCategory;
       typedef typename _OIterTraits::iterator_category _OIterCategory;
 
-      return __transform1_switch(__begin, __end, __result, unary_op,
+      return __transform1_switch(__begin, __end, __result, __unary_op,
                                _IIteratorCategory(), _OIterCategory());
     }
 
@@ -1518,24 +1518,24 @@ namespace __parallel
     }
 
   // Sequential fallback
-  template<typename _FIterator, typename Generator>
+  template<typename _FIterator, typename _Generator>
     inline void
-    generate(_FIterator __begin, _FIterator __end, Generator __gen, 
+    generate(_FIterator __begin, _FIterator __end, _Generator __gen, 
              __gnu_parallel::sequential_tag)
     { _GLIBCXX_STD_P::generate(__begin, __end, __gen); }
 
   // Sequential fallback for input iterator case.
-  template<typename _FIterator, typename Generator, typename _IteratorTag>
+  template<typename _FIterator, typename _Generator, typename _IteratorTag>
     inline void
-    __generate_switch(_FIterator __begin, _FIterator __end, Generator __gen,
+    __generate_switch(_FIterator __begin, _FIterator __end, _Generator __gen,
                     _IteratorTag)
     { generate(__begin, __end, __gen, __gnu_parallel::sequential_tag()); }
 
   // Parallel algorithm for random access iterators.
-  template<typename _RAIter, typename Generator>
+  template<typename _RAIter, typename _Generator>
     void
     __generate_switch(_RAIter __begin, _RAIter __end,
-                    Generator __gen, random_access_iterator_tag, 
+                    _Generator __gen, random_access_iterator_tag, 
                     __gnu_parallel::_Parallelism __parallelism_tag
                     = __gnu_parallel::parallel_balanced)
     {
@@ -1558,10 +1558,10 @@ namespace __parallel
     }
 
   // Public interface.
-  template<typename _FIterator, typename Generator>
+  template<typename _FIterator, typename _Generator>
     inline void
     generate(_FIterator __begin, _FIterator __end,
-             Generator __gen, __gnu_parallel::_Parallelism __parallelism_tag)
+             _Generator __gen, __gnu_parallel::_Parallelism __parallelism_tag)
     {
       typedef std::iterator_traits<_FIterator> _IteratorTraits;
       typedef typename _IteratorTraits::iterator_category _IteratorCategory;
@@ -1569,9 +1569,9 @@ namespace __parallel
                         __parallelism_tag);
     }
 
-  template<typename _FIterator, typename Generator>
+  template<typename _FIterator, typename _Generator>
     inline void
-    generate(_FIterator __begin, _FIterator __end, Generator __gen)
+    generate(_FIterator __begin, _FIterator __end, _Generator __gen)
     {
       typedef std::iterator_traits<_FIterator> _IteratorTraits;
       typedef typename _IteratorTraits::iterator_category _IteratorCategory;
@@ -1580,25 +1580,25 @@ namespace __parallel
 
 
   // Sequential fallback.
-  template<typename _OutputIterator, typename _Size, typename Generator>
+  template<typename _OutputIterator, typename _Size, typename _Generator>
     inline _OutputIterator
-    generate_n(_OutputIterator __begin, _Size __n, Generator __gen, 
+    generate_n(_OutputIterator __begin, _Size __n, _Generator __gen, 
                __gnu_parallel::sequential_tag)
     { return _GLIBCXX_STD_P::generate_n(__begin, __n, __gen); }
 
   // Sequential fallback for input iterator case.
-  template<typename _OutputIterator, typename _Size, typename Generator,
+  template<typename _OutputIterator, typename _Size, typename _Generator,
            typename _IteratorTag>
     inline _OutputIterator
-    __generate_n_switch(_OutputIterator __begin, _Size __n, Generator __gen,
+    __generate_n_switch(_OutputIterator __begin, _Size __n, _Generator __gen,
                         _IteratorTag)
     { return generate_n(__begin, __n, __gen,
                         __gnu_parallel::sequential_tag()); }
 
   // Parallel algorithm for random access iterators.
-  template<typename _RAIter, typename _Size, typename Generator>
+  template<typename _RAIter, typename _Size, typename _Generator>
     inline _RAIter
-    __generate_n_switch(_RAIter __begin, _Size __n, Generator __gen, 
+    __generate_n_switch(_RAIter __begin, _Size __n, _Generator __gen, 
                       random_access_iterator_tag, 
                       __gnu_parallel::_Parallelism __parallelism_tag
                       = __gnu_parallel::parallel_balanced)
@@ -1608,9 +1608,9 @@ namespace __parallel
     }
 
   // Public interface.
-  template<typename _OutputIterator, typename _Size, typename Generator>
+  template<typename _OutputIterator, typename _Size, typename _Generator>
     inline _OutputIterator
-    generate_n(_OutputIterator __begin, _Size __n, Generator __gen, 
+    generate_n(_OutputIterator __begin, _Size __n, _Generator __gen, 
                __gnu_parallel::_Parallelism __parallelism_tag)
     {
       typedef std::iterator_traits<_OutputIterator> _IteratorTraits;
@@ -1619,9 +1619,9 @@ namespace __parallel
                                __parallelism_tag); 
     }
 
-  template<typename _OutputIterator, typename _Size, typename Generator>
+  template<typename _OutputIterator, typename _Size, typename _Generator>
     inline _OutputIterator
-    generate_n(_OutputIterator __begin, _Size __n, Generator __gen)
+    generate_n(_OutputIterator __begin, _Size __n, _Generator __gen)
     {
       typedef std::iterator_traits<_OutputIterator> _IteratorTraits;
       typedef typename _IteratorTraits::iterator_category _IteratorCategory;
@@ -1637,10 +1637,10 @@ namespace __parallel
     { _GLIBCXX_STD_P::random_shuffle(__begin, __end); }
 
   // Sequential fallback.
-  template<typename _RAIter, typename RandomNumberGenerator>
+  template<typename _RAIter, typename _RandomNumberGenerator>
     inline void
     random_shuffle(_RAIter __begin, _RAIter __end, 
-                   RandomNumberGenerator& __rand,
+                   _RandomNumberGenerator& __rand,
                    __gnu_parallel::sequential_tag)
     { _GLIBCXX_STD_P::random_shuffle(__begin, __end, __rand); }
 
@@ -1665,10 +1665,10 @@ namespace __parallel
     }
 
   // Parallel algorithm for random access iterators.
-  template<typename _RAIter, typename RandomNumberGenerator>
+  template<typename _RAIter, typename _RandomNumberGenerator>
     void
     random_shuffle(_RAIter __begin, _RAIter __end, 
-                   RandomNumberGenerator& __rand)
+                   _RandomNumberGenerator& __rand)
     {
       if (__begin == __end)
         return;
@@ -1759,7 +1759,7 @@ namespace __parallel
         if (_GLIBCXX_PARALLEL_CONDITION(
             static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) >=
               __gnu_parallel::_Settings::get().sort_minimal_n))
-          __gnu_parallel::parallel_sort<false>(
+          __gnu_parallel::__parallel_sort<false>(
                             __begin, __end, __comp, __parallelism);
         else
           sort(__begin, __end, __comp, __gnu_parallel::sequential_tag());
@@ -1898,7 +1898,7 @@ namespace __parallel
         if (_GLIBCXX_PARALLEL_CONDITION(
               static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin) >=
               __gnu_parallel::_Settings::get().sort_minimal_n))
-          __gnu_parallel::parallel_sort<true>(
+          __gnu_parallel::__parallel_sort<true>(
                             __begin, __end, __comp, __parallelism);
         else
           stable_sort(__begin, __end, __comp,
@@ -2071,10 +2071,10 @@ namespace __parallel
     merge(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, 
           _IIter2 __end2, _OutputIterator __result)
     {
-      typedef std::iterator_traits<_IIter1> iterator1_traits;
-      typedef std::iterator_traits<_IIter2> iterator2_traits;
-      typedef typename iterator1_traits::value_type _ValueType1;
-      typedef typename iterator2_traits::value_type _ValueType2;
+      typedef std::iterator_traits<_IIter1> _Iterator1Traits;
+      typedef std::iterator_traits<_IIter2> _Iterator2Traits;
+      typedef typename _Iterator1Traits::value_type _ValueType1;
+      typedef typename _Iterator2Traits::value_type _ValueType2;
 
       return merge(__begin1, __end1, __begin2, __end2, __result, 
                    __gnu_parallel::_Less<_ValueType1, _ValueType2>());
@@ -2104,7 +2104,7 @@ namespace __parallel
       if (_GLIBCXX_PARALLEL_CONDITION(
             static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin)
             >= __gnu_parallel::_Settings::get().nth_element_minimal_n))
-        __gnu_parallel::parallel_nth_element(__begin, __nth, __end, __comp);
+        __gnu_parallel::__parallel_nth_element(__begin, __nth, __end, __comp);
       else
         nth_element(__begin, __nth, __end, __comp,
                     __gnu_parallel::sequential_tag());
@@ -2146,7 +2146,7 @@ namespace __parallel
             static_cast<__gnu_parallel::_SequenceIndex>(__end - __begin)
             >= __gnu_parallel::_Settings::get().partial_sort_minimal_n))
         __gnu_parallel::
-          parallel_partial_sort(__begin, __middle, __end, __comp);
+          __parallel_partial_sort(__begin, __middle, __end, __comp);
       else
         partial_sort(__begin, __middle, __end, __comp,
                      __gnu_parallel::sequential_tag());
index b0571a4..77578a5 100644 (file)
@@ -95,16 +95,16 @@ namespace __parallel
     inline pair<_IIter1, _IIter2>
     mismatch(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2)
     {
-      typedef std::iterator_traits<_IIter1> iterator1_traits;
-      typedef std::iterator_traits<_IIter2> iterator2_traits;
-      typedef typename iterator1_traits::value_type _ValueType1;
-      typedef typename iterator2_traits::value_type _ValueType2;
-      typedef typename iterator1_traits::iterator_category _IteratorCategory1;
-      typedef typename iterator2_traits::iterator_category _IteratorCategory2;
+      typedef std::iterator_traits<_IIter1> _Iterator1Traits;
+      typedef std::iterator_traits<_IIter2> _Iterator2Traits;
+      typedef typename _Iterator1Traits::value_type _ValueType1;
+      typedef typename _Iterator2Traits::value_type _ValueType2;
+      typedef typename _Iterator1Traits::iterator_category _IteratorCategory1;
+      typedef typename _Iterator2Traits::iterator_category _IteratorCategory2;
 
-      typedef __gnu_parallel::equal_to<_ValueType1, _ValueType2> equal_to_type;
+      typedef __gnu_parallel::_EqualTo<_ValueType1, _ValueType2> _EqualTo;
 
-      return __mismatch_switch(__begin1, __end1, __begin2, equal_to_type(),
+      return __mismatch_switch(__begin1, __end1, __begin2, _EqualTo(),
                                _IteratorCategory1(), _IteratorCategory2());
     }
 
@@ -114,10 +114,10 @@ namespace __parallel
     mismatch(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2,
              _Predicate __pred)
     {
-      typedef std::iterator_traits<_IIter1> iterator1_traits;
-      typedef std::iterator_traits<_IIter2> iterator2_traits;
-      typedef typename iterator1_traits::iterator_category _IteratorCategory1;
-      typedef typename iterator2_traits::iterator_category _IteratorCategory2;
+      typedef std::iterator_traits<_IIter1> _Iterator1Traits;
+      typedef std::iterator_traits<_IIter2> _Iterator2Traits;
+      typedef typename _Iterator1Traits::iterator_category _IteratorCategory1;
+      typedef typename _Iterator2Traits::iterator_category _IteratorCategory2;
 
       return __mismatch_switch(__begin1, __end1, __begin2, __pred,
                                _IteratorCategory1(), _IteratorCategory2());
index 6925696..70f85ba 100644 (file)
@@ -102,7 +102,7 @@ namespace __gnu_parallel
   */
 template<typename _Size>
   inline _Size
-  __log2(_Size __n)
+  __rd_log2(_Size __n)
     {
       _Size __k;
       for (__k = 0; __n > 1; __n >>= 1)
@@ -115,7 +115,7 @@ template<typename _Size>
   *  _CASable_bits/2 bits.
   *  @param __b Second integer, to be encoded in the least-significant
   *  @__c _CASable_bits/2 bits.
-  *  @return __gnu_parallel::_CASable _M_value encoding @__c __a and @__c __b.
+  *  @return value encoding @__c __a and @__c __b.
   *  @see decode2
   */
 inline _CASable
@@ -171,7 +171,7 @@ template<typename _Compare, typename _T1, typename _T2>
   };
 
 
-/** @brief Similar to std::__binder1st,
+/** @brief Similar to std::binder1st,
   *  but giving the argument types explicitly. */
 template<typename _Predicate, typename argument_type>
   class __unary_negate
@@ -189,7 +189,7 @@ template<typename _Predicate, typename argument_type>
     { return !_M_pred(__x); }
   };
 
-/** @brief Similar to std::__binder1st,
+/** @brief Similar to std::binder1st,
   *  but giving the argument types explicitly. */
 template<typename _Operation, typename _FirstArgumentType,
          typename _SecondArgumentType, typename _ResultType>
@@ -247,7 +247,7 @@ template<typename _Operation, typename _FirstArgumentType,
 
 /** @brief Similar to std::equal_to, but allows two different types. */
 template<typename _T1, typename _T2>
-  struct equal_to : std::binary_function<_T1, _T2, bool>
+  struct _EqualTo : std::binary_function<_T1, _T2, bool>
   {
     bool operator()(const _T1& __t1, const _T2& __t2) const
     { return __t1 == __t2; }
index a41ed6e..31ed87d 100644 (file)
@@ -42,7 +42,7 @@ namespace __gnu_parallel
  *  @param __n Number of elements
  *  @param __num_threads Number of parts
  *  @param __s Splitters
- *  @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>
   _OutputIterator
   equally_split(_DifferenceType __n, _ThreadIndex __num_threads,
index e7f0d83..050a80d 100644 (file)
@@ -23,7 +23,7 @@
 // <http://www.gnu.org/licenses/>.
 
 /** @file parallel/find.h
- *  @brief Parallel implementation __base for std::find(), std::equal()
+ *  @brief Parallel implementation base for std::find(), std::equal()
  *  and related functions.
  *  This file is a GNU parallel extension to the Standard C++ Library.
  */
index 2b1e118..0d385bc 100644 (file)
@@ -107,11 +107,11 @@ namespace __gnu_parallel
                            _RAIter2 __begin2, _Pred __pred)
       {
         // Passed end iterator is one short.
-        _RAIter1 spot = adjacent_find(__begin1, __end1 + 1,
+        _RAIter1 __spot = adjacent_find(__begin1, __end1 + 1,
                                                    __pred, sequential_tag());
-        if (spot == (__end1 + 1))
-          spot = __end1;
-        return std::make_pair(spot, __begin2);
+        if (__spot == (__end1 + 1))
+          __spot = __end1;
+        return std::make_pair(__spot, __begin2);
       }
   };
 
index 9b3bb6b..c6c8a14 100644 (file)
@@ -88,9 +88,9 @@ namespace __gnu_parallel
       /** @brief Functor execution.
        *  @param __v Current value.
        *  @param __i iterator referencing object. */
-      template<typename Val>
+      template<typename _ValueType>
         bool
-        operator()(Val& __v, _It __i)
+        operator()(_ValueType& __v, _It __i)
         {
           *__i = __v;
           return true;
@@ -185,9 +185,9 @@ namespace __gnu_parallel
        *  @param __v Current value.
        *  @param __i iterator referencing object.
        *  @return 1 if count, 0 if does not count. */
-      template<typename Val>
+      template<typename _ValueType>
         _Diff
-        operator()(Val& __v, _It __i)
+        operator()(_ValueType& __v, _It __i)
         { return (__v == *__i) ? 1 : 0; }
     };
 
index 7eed96b..9c4f481 100644 (file)
@@ -143,7 +143,7 @@ namespace __gnu_parallel
         }
 
       // Calculation of the parts (one must be extracted from __current
-      // because the partition beginning at __end, consists only of
+      // because the partition beginning at end, consists only of
       // itself).
       size_t __size_part = (__cur - 1) / __num_parts;
       int __size_greater = static_cast<int>((__cur - 1) % __num_parts);
index 239aac8..0da84ab 100644 (file)
@@ -62,7 +62,7 @@ protected:
   {
     /** @brief flag, true iff this is a "maximum" __sentinel. */
     bool _M_sup;
-    /** @brief __index of the _M_source __sequence. */
+    /** @brief __index of the __source __sequence. */
     int _M_source;
     /** @brief _M_key of the element in the _LoserTree. */
     _Tp _M_key;
@@ -99,7 +99,7 @@ public:
     _M_ik = __k;
 
     // Compute log_2{_M_k} for the _Loser Tree
-    _M_log_k = __log2(_M_ik - 1) + 1;
+    _M_log_k = __rd_log2(_M_ik - 1) + 1;
 
     // Next greater power of 2.
     _M_k = 1 << _M_log_k;
@@ -124,7 +124,7 @@ public:
    * @brief Initializes the sequence "_M_source" with the element "_M_key".
    *
    * @param _M_key the element to insert
-   * @param _M_source __index of the _M_source __sequence
+   * @param _M_source __index of the __source __sequence
    * @param _M_sup flag that determines whether the value to insert is an
    *   explicit __supremum.
    */
@@ -265,7 +265,7 @@ public:
   {}
 
   /**
-   * Computes the winner of the competition at __position "__root".
+   * Computes the winner of the competition at position "__root".
    *
    * Called recursively (starting at 0) to build the initial tree.
    *
@@ -365,7 +365,7 @@ public:
     _M_ik = __k;
 
     // Next greater power of 2.
-    _M_k = 1 << (__log2(_M_ik - 1) + 1);
+    _M_k = 1 << (__rd_log2(_M_ik - 1) + 1);
     _M_offset = _M_k;
     _M_losers = new _Loser[_M_k * 2];
     for (unsigned int __i = _M_ik - 1; __i < _M_k; __i++)
@@ -580,7 +580,7 @@ public:
     _M_ik = __k;
 
     // Next greater power of 2.
-    _M_k = 1 << (__log2(_M_ik - 1) + 1);
+    _M_k = 1 << (__rd_log2(_M_ik - 1) + 1);
     _M_offset = _M_k;
     // Avoid default-constructing _M_losers[]._M_key
     _M_losers
@@ -789,7 +789,7 @@ public:
 };
 
 /** @brief Unguarded loser tree, keeping only pointers to the
-* __elements in the tree structure.
+* elements in the tree structure.
 *
 *  No guarding is done, therefore not a single input sequence must
 *  run empty.  This is a very fast variant.
@@ -818,7 +818,7 @@ public:
     _M_ik = __k;
 
     // Next greater power of 2.
-    _M_k = 1 << (__log2(_M_ik - 1) + 1);
+    _M_k = 1 << (__rd_log2(_M_ik - 1) + 1);
     _M_offset = _M_k;
     // Avoid default-constructing _M_losers[]._M_key
     _M_losers = new _Loser[2 * _M_k];
@@ -859,7 +859,7 @@ public:
  * Unstable variant is implemented below using partial specialization.
  */
 template<bool __stable/* default == true */, typename _Tp, typename _Compare>
-class LoserTreePointerUnguarded :
+class _LoserTreePointerUnguarded :
     public LoserTreePointerUnguardedBase<_Tp, _Compare>
 {
   typedef LoserTreePointerUnguardedBase<_Tp, _Compare> Base;
@@ -867,7 +867,7 @@ class LoserTreePointerUnguarded :
   using Base::_M_losers;
 
 public:
-  LoserTreePointerUnguarded(unsigned int __k, const _Tp& _sentinel,
+  _LoserTreePointerUnguarded(unsigned int __k, const _Tp& _sentinel,
       _Compare __comp = std::less<_Tp>())
     : Base::LoserTreePointerUnguardedBase(__k, _sentinel, __comp)
   {}
@@ -943,7 +943,7 @@ public:
  * Stable variant is above.
  */
 template<typename _Tp, typename _Compare>
-class LoserTreePointerUnguarded</* __stable == */false, _Tp, _Compare> :
+class _LoserTreePointerUnguarded</* __stable == */false, _Tp, _Compare> :
     public LoserTreePointerUnguardedBase<_Tp, _Compare>
 {
   typedef LoserTreePointerUnguardedBase<_Tp, _Compare> Base;
@@ -951,7 +951,7 @@ class LoserTreePointerUnguarded</* __stable == */false, _Tp, _Compare> :
   using Base::_M_losers;
 
 public:
-  LoserTreePointerUnguarded(unsigned int __k, const _Tp& _sentinel,
+  _LoserTreePointerUnguarded(unsigned int __k, const _Tp& _sentinel,
       _Compare __comp = std::less<_Tp>())
     : Base::LoserTreePointerUnguardedBase(__k, _sentinel, __comp)
   {}
index b2d8996..c323c62 100644 (file)
@@ -112,9 +112,9 @@ namespace __gnu_parallel
     {
       typedef _DifferenceTp _DifferenceType;
       typedef typename std::iterator_traits<_RAIter1>::value_type
-        value_type1;
+        _ValueType1;
       typedef typename std::iterator_traits<_RAIter2>::value_type
-        value_type2;
+        _ValueType2;
 
 #if _GLIBCXX_ASSERTIONS
       _GLIBCXX_PARALLEL_ASSERT(__max_length >= 0);
@@ -124,8 +124,8 @@ namespace __gnu_parallel
         {
           _RAIter1 __next1 = __begin1 + 1;
           _RAIter2 __next2 = __begin2 + 1;
-          value_type1 __element1 = *__begin1;
-          value_type2 __element2 = *__begin2;
+          _ValueType1 __element1 = *__begin1;
+          _ValueType2 __element2 = *__begin2;
 
           if (__comp(__element2, __element1))
             {
index 539695f..221470c 100644 (file)
@@ -103,15 +103,15 @@ namespace __gnu_parallel
     };
 
   /** 
-   *  @brief Splits several sorted sequences at __a certain global __rank,
+   *  @brief Splits several sorted sequences at a certain global __rank,
    *  resulting in a splitting point for each sequence.
-   *  The sequences are passed via __a __sequence of random-access
+   *  The sequences are passed via sequence of random-access
    *  iterator pairs, none of the sequences may be empty.  If there
    *  are several equal elements across the split, the ones on the
    *  __left side will be chosen from sequences with smaller number.
    *  @param __begin_seqs Begin of the sequence of iterator pairs.
    *  @param __end_seqs End of the sequence of iterator pairs.
-   *  @param __rank The global __rank to partition at.
+   *  @param __rank The global rank to partition at.
    *  @param __begin_offsets A random-access __sequence __begin where the
    *  __result will be stored in. Each element of the sequence is an
    *  iterator that points to the first element on the greater part of
@@ -181,7 +181,7 @@ namespace __gnu_parallel
           __nmax = std::max(__nmax, __ns[__i]);
         }
 
-      __r = __log2(__nmax) + 1;
+      __r = __rd_log2(__nmax) + 1;
 
       // Pad all lists to this length, at least as long as any ns[__i],
       // equality iff __nmax = 2^__k - 1.
@@ -215,11 +215,12 @@ namespace __gnu_parallel
           __sample.push_back(
             std::make_pair(__S(__i)[0] /*__dummy element*/, __i));
 
-      _DifferenceType localrank = __rank * __m / __N ;
+      _DifferenceType __localrank = __rank * __m / __N ;
 
       int __j;
       for (__j = 0;
-           __j < localrank && ((__n + 1) <= __ns[__sample[__j].second]); ++__j)
+           __j < __localrank && ((__n + 1) <= __ns[__sample[__j].second]);
+           ++__j)
         __a[__sample[__j].second] += __n + 1;
       for (; __j < __m; __j++)
         __b[__sample[__j].second] -= __n + 1;
@@ -288,15 +289,16 @@ namespace __gnu_parallel
 
               for (; __skew != 0 && !__pq.empty(); --__skew)
                 {
-                  int source = __pq.top().second;
+                  int __source = __pq.top().second;
                   __pq.pop();
 
-                  __a[source] = std::min(__a[source] + __n + 1, __ns[source]);
-                  __b[source] += __n + 1;
+                  __a[__source]
+                      = std::min(__a[__source] + __n + 1, __ns[__source]);
+                  __b[__source] += __n + 1;
 
-                  if (__b[source] < __ns[source])
+                  if (__b[__source] < __ns[__source])
                     __pq.push(
-                      std::make_pair(__S(source)[__b[source]], source));
+                      std::make_pair(__S(__source)[__b[__source]], __source));
                 }
             }
           else if (__skew < 0)
@@ -312,15 +314,15 @@ namespace __gnu_parallel
 
               for (; __skew != 0; ++__skew)
                 {
-                  int source = __pq.top().second;
+                  int __source = __pq.top().second;
                   __pq.pop();
 
-                  __a[source] -= __n + 1;
-                  __b[source] -= __n + 1;
+                  __a[__source] -= __n + 1;
+                  __b[__source] -= __n + 1;
 
-                  if (__a[source] > 0)
-                    __pq.push(
-                      std::make_pair(__S(source)[__a[source] - 1], source));
+                  if (__a[__source] > 0)
+                    __pq.push(std::make_pair(
+                        __S(__source)[__a[__source] - 1], __source));
                 }
             }
         }
@@ -373,14 +375,14 @@ namespace __gnu_parallel
 
 
   /** 
-   *  @brief Selects the element at __a certain global __rank from several
+   *  @brief Selects the element at a certain global __rank from several
    *  sorted sequences.
    *
-   *  The sequences are passed via __a __sequence of random-access
+   *  The sequences are passed via sequence of random-access
    *  iterator pairs, none of the sequences may be empty.
    *  @param __begin_seqs Begin of the sequence of iterator pairs.
    *  @param __end_seqs End of the sequence of iterator pairs.
-   *  @param __rank The global __rank to partition at.
+   *  @param __rank The global rank to partition at.
    *  @param __offset The rank of the selected element in the global
    *  subsequence of elements equal to the selected element. If the
    *  selected element is unique, this number is 0.
@@ -434,7 +436,7 @@ namespace __gnu_parallel
           __nmax = std::max(__nmax, __ns[__i]);
         }
 
-      __r = __log2(__nmax) + 1;
+      __r = __rd_log2(__nmax) + 1;
 
       // Pad all lists to this length, at least as long as any ns[__i],
       // equality iff __nmax = 2^__k - 1
@@ -470,11 +472,12 @@ namespace __gnu_parallel
           __sample.push_back(
             std::make_pair(__S(__i)[0] /*__dummy element*/, __i));
 
-      _DifferenceType localrank = __rank * __m / __N ;
+      _DifferenceType __localrank = __rank * __m / __N ;
 
       int __j;
       for (__j = 0;
-           __j < localrank && ((__n + 1) <= __ns[__sample[__j].second]); ++__j)
+           __j < __localrank && ((__n + 1) <= __ns[__sample[__j].second]);
+           ++__j)
         __a[__sample[__j].second] += __n + 1;
       for (; __j < __m; ++__j)
         __b[__sample[__j].second] -= __n + 1;
@@ -533,15 +536,16 @@ namespace __gnu_parallel
 
               for (; __skew != 0 && !__pq.empty(); --__skew)
                 {
-                  int source = __pq.top().second;
+                  int __source = __pq.top().second;
                   __pq.pop();
 
-                  __a[source] = std::min(__a[source] + __n + 1, __ns[source]);
-                  __b[source] += __n + 1;
+                  __a[__source]
+                      = std::min(__a[__source] + __n + 1, __ns[__source]);
+                  __b[__source] += __n + 1;
 
-                  if (__b[source] < __ns[source])
+                  if (__b[__source] < __ns[__source])
                     __pq.push(
-                      std::make_pair(__S(source)[__b[source]], source));
+                      std::make_pair(__S(__source)[__b[__source]], __source));
                 }
             }
           else if (__skew < 0)
@@ -557,15 +561,15 @@ namespace __gnu_parallel
 
               for (; __skew != 0; ++__skew)
                 {
-                  int source = __pq.top().second;
+                  int __source = __pq.top().second;
                   __pq.pop();
 
-                  __a[source] -= __n + 1;
-                  __b[source] -= __n + 1;
+                  __a[__source] -= __n + 1;
+                  __b[__source] -= __n + 1;
 
-                  if (__a[source] > 0)
-                    __pq.push(
-                      std::make_pair(__S(source)[__a[source] - 1], source));
+                  if (__a[__source] > 0)
+                    __pq.push(std::make_pair(
+                        __S(__source)[__a[__source] - 1], __source));
                 }
             }
         }
@@ -615,7 +619,7 @@ namespace __gnu_parallel
             }
       }
 
-      // Minright is the splitter, in any case.
+      // Minright is the __splitter, in any case.
 
       if (!__maxleftset || __comp(__minright, __maxleft))
         {
index b5540e7..310a07a 100644 (file)
@@ -75,7 +75,7 @@ template<typename _RAIter, typename _Compare>
 /** @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.
@@ -168,20 +168,20 @@ template<typename _RAIter, typename _Compare>
   }
 
 template<typename _RAIter, typename _Compare>
-  class unguarded_iterator;
+  class _UnguardedIterator;
 
 template<typename _RAIter, typename _Compare>
   inline bool
-  operator<(unguarded_iterator<_RAIter, _Compare>& __bi1,
-            unguarded_iterator<_RAIter, _Compare>& __bi2);
+  operator<(_UnguardedIterator<_RAIter, _Compare>& __bi1,
+            _UnguardedIterator<_RAIter, _Compare>& __bi2);
 
 template<typename _RAIter, typename _Compare>
   inline bool
-  operator<=(unguarded_iterator<_RAIter, _Compare>& __bi1,
-             unguarded_iterator<_RAIter, _Compare>& __bi2);
+  operator<=(_UnguardedIterator<_RAIter, _Compare>& __bi1,
+             _UnguardedIterator<_RAIter, _Compare>& __bi2);
 
 template<typename _RAIter, typename _Compare>
-  class unguarded_iterator
+  class _UnguardedIterator
   {
   private:
     /** @brief Current iterator __position. */
@@ -194,14 +194,14 @@ template<typename _RAIter, typename _Compare>
     *  @param __begin Begin iterator of sequence.
     *  @param _M_end Unused, only for compatibility.
     *  @param __comp Unused, only for compatibility. */
-    unguarded_iterator(_RAIter __begin,
+    _UnguardedIterator(_RAIter __begin,
                        _RAIter _M_end, _Compare& __comp)
     : _M_current(__begin), __comp(__comp)
     { }
 
     /** @brief Pre-increment operator.
     *  @return This. */
-    unguarded_iterator<_RAIter, _Compare>&
+    _UnguardedIterator<_RAIter, _Compare>&
     operator++()
     {
       ++_M_current;
@@ -221,13 +221,13 @@ template<typename _RAIter, typename _Compare>
 
     friend bool
     operator< <_RAIter, _Compare>(
-      unguarded_iterator<_RAIter, _Compare>& __bi1,
-      unguarded_iterator<_RAIter, _Compare>& __bi2);
+      _UnguardedIterator<_RAIter, _Compare>& __bi1,
+      _UnguardedIterator<_RAIter, _Compare>& __bi2);
 
     friend bool
     operator<= <_RAIter, _Compare>(
-      unguarded_iterator<_RAIter, _Compare>& __bi1,
-      unguarded_iterator<_RAIter, _Compare>& __bi2);
+      _UnguardedIterator<_RAIter, _Compare>& __bi1,
+      _UnguardedIterator<_RAIter, _Compare>& __bi2);
   };
 
 /** @brief Compare two elements referenced by unguarded iterators.
@@ -236,8 +236,8 @@ template<typename _RAIter, typename _Compare>
  *  @return @__c true if less. */
 template<typename _RAIter, typename _Compare>
   inline bool
-  operator<(unguarded_iterator<_RAIter, _Compare>& __bi1,
-            unguarded_iterator<_RAIter, _Compare>& __bi2)
+  operator<(_UnguardedIterator<_RAIter, _Compare>& __bi1,
+            _UnguardedIterator<_RAIter, _Compare>& __bi2)
   {
     // Normal compare.
     return (__bi1.__comp)(*__bi1, *__bi2);
@@ -249,8 +249,8 @@ template<typename _RAIter, typename _Compare>
  *  @return @__c True if less equal. */
 template<typename _RAIter, typename _Compare>
   inline bool
-  operator<=(unguarded_iterator<_RAIter, _Compare>& __bi1,
-            unguarded_iterator<_RAIter, _Compare>& __bi2)
+  operator<=(_UnguardedIterator<_RAIter, _Compare>& __bi1,
+            _UnguardedIterator<_RAIter, _Compare>& __bi2)
   {
     // Normal compare.
     return !(__bi1.__comp)(*__bi2, *__bi1);
@@ -266,7 +266,7 @@ template<typename _RAIter, typename _Compare>
  *
  * This works well for merging up to 4 sequences.
  *
- * Note that making the merging stable does <em>not</em> come at __a
+ * Note that making the merging stable does <em>not</em> come at a
  * performance hit.
  *
  * Whether the merging is done guarded or unguarded is selected by the
@@ -274,7 +274,7 @@ template<typename _RAIter, typename _Compare>
  *
  * @param __seqs_begin Begin iterator of iterator pair input sequence.
  * @param __seqs_end End iterator of iterator pair input sequence.
- * @param __target Begin iterator of __output sequence.
+ * @param __target Begin iterator of output sequence.
  * @param __comp Comparator.
  * @param __length Maximum length to merge, less equal than the
  * total number of elements available.
@@ -386,7 +386,7 @@ template<template<typename RAI, typename C> class iterator,
  *
  * This works well for merging up to 4 sequences.
  *
- * Note that making the merging stable does <em>not</em> come at __a
+ * Note that making the merging stable does <em>not</em> come at a
  * performance hit.
  *
  * Whether the merging is done guarded or unguarded is selected by the
@@ -394,7 +394,7 @@ template<template<typename RAI, typename C> class iterator,
  *
  * @param __seqs_begin Begin iterator of iterator pair input sequence.
  * @param __seqs_end End iterator of iterator pair input sequence.
- * @param __target Begin iterator of __output sequence.
+ * @param __target Begin iterator of output sequence.
  * @param __comp Comparator.
  * @param __length Maximum length to merge, less equal than the
  * total number of elements available.
@@ -510,15 +510,15 @@ template<template<typename RAI, typename C> class iterator,
 /** @brief Multi-way merging procedure for a high branching factor,
  *         guarded case.
  *
- * This merging variant uses __a LoserTree class as selected by <tt>LT</tt>.
+ * This merging variant uses a LoserTree class as selected by <tt>LT</tt>.
  *
  * Stability is selected through the used LoserTree class <tt>LT</tt>.
  *
- * At least one non-empty __sequence is required.
+ * At least one non-empty sequence is required.
  *
  * @param __seqs_begin Begin iterator of iterator pair input sequence.
  * @param __seqs_end End iterator of iterator pair input sequence.
- * @param __target Begin iterator of __output sequence.
+ * @param __target Begin iterator of output sequence.
  * @param __comp Comparator.
  * @param __length Maximum length to merge, less equal than the
  * total number of elements available.
@@ -569,21 +569,21 @@ template<typename LT,
 
     __lt.__init();
 
-    int source;
+    int __source;
 
     for (_DifferenceType __i = 0; __i < __length; ++__i)
       {
         //take out
-        source = __lt.__get_min_source();
+        __source = __lt.__get_min_source();
 
-        *(__target++) = *(__seqs_begin[source].first++);
+        *(__target++) = *(__seqs_begin[__source].first++);
 
         // Feed.
-        if (__seqs_begin[source].first == __seqs_begin[source].second)
+        if (__seqs_begin[__source].first == __seqs_begin[__source].second)
           __lt.__delete_min_insert(*__arbitrary_element, true);
         else
-          // Replace from same source.
-          __lt.__delete_min_insert(*__seqs_begin[source].first, false);
+          // Replace from same __source.
+          __lt.__delete_min_insert(*__seqs_begin[__source].first, false);
       }
 
     return __target;
@@ -600,7 +600,7 @@ template<typename LT,
  *
  * @param __seqs_begin Begin iterator of iterator pair input sequence.
  * @param __seqs_end End iterator of iterator pair input sequence.
- * @param __target Begin iterator of __output sequence.
+ * @param __target Begin iterator of output sequence.
  * @param __comp Comparator.
  * @param __length Maximum length to merge, less equal than the
  * total number of elements available.
@@ -646,7 +646,7 @@ template<typename LT,
 
     __lt.__init();
 
-    int source;
+    int __source;
 
 #if _GLIBCXX_ASSERTIONS
     _DifferenceType __i = 0;
@@ -656,22 +656,22 @@ template<typename LT,
     while (__target < __target_end)
       {
         // Take out.
-        source = __lt.__get_min_source();
+        __source = __lt.__get_min_source();
 
 #if _GLIBCXX_ASSERTIONS
-        _GLIBCXX_PARALLEL_ASSERT(0 <= source && source < __k);
+        _GLIBCXX_PARALLEL_ASSERT(0 <= __source && __source < __k);
         _GLIBCXX_PARALLEL_ASSERT(__i == 0
-            || !__comp(*(__seqs_begin[source].first), *(__target - 1)));
+            || !__comp(*(__seqs_begin[__source].first), *(__target - 1)));
 #endif
 
         // Feed.
-        *(__target++) = *(__seqs_begin[source].first++);
+        *(__target++) = *(__seqs_begin[__source].first++);
 
 #if _GLIBCXX_ASSERTIONS
         ++__i;
 #endif
-        // Replace from same source.
-        __lt.__delete_min_insert(*__seqs_begin[source].first, false);
+        // Replace from same __source.
+        __lt.__delete_min_insert(*__seqs_begin[__source].first, false);
       }
 
     return __target;
@@ -689,7 +689,7 @@ template<typename LT,
  *
  * @param __seqs_begin Begin iterator of iterator pair input sequence.
  * @param __seqs_end End iterator of iterator pair input sequence.
- * @param __target Begin iterator of __output sequence.
+ * @param __target Begin iterator of output sequence.
  * @param __comp Comparator.
  * @param __length Maximum length to merge, less equal than the
  * total number of elements available.
@@ -726,7 +726,7 @@ template<
     _RAIter3 __target_end;
 
     for (_RAIterIterator __s = __seqs_begin; __s != __seqs_end; ++__s)
-      // Move the sequends _M_end behind the sentinel spots.  This has the
+      // Move the sequence ends to the sentinel.  This has the
       // effect that the sentinel appears to be within the sequence. Then,
       // we can use the unguarded variant if we merge out as many
       // non-sentinel elements as we have.
@@ -829,7 +829,7 @@ struct __multiway_merge_3_variant_sentinel_switch
       _RAIter3 __target,
       _DifferenceTp __length, _Compare __comp)
   {
-    return multiway_merge_3_variant<unguarded_iterator>(
+    return multiway_merge_3_variant<_UnguardedIterator>(
         __seqs_begin, __seqs_end, __target, __length, __comp);
   }
 };
@@ -878,7 +878,7 @@ struct __multiway_merge_4_variant_sentinel_switch
       _RAIter3 __target,
       _DifferenceTp __length, _Compare __comp)
   {
-    return multiway_merge_4_variant<unguarded_iterator>(
+    return multiway_merge_4_variant<_UnguardedIterator>(
         __seqs_begin, __seqs_end, __target, __length, __comp);
   }
 };
@@ -913,7 +913,7 @@ struct __multiway_merge_k_variant_sentinel_switch
     return multiway_merge_loser_tree_sentinel<
         typename __gnu_cxx::__conditional_type<
             _LoserTreeTraits<_ValueType>::_M_use_pointer
-          , LoserTreePointerUnguarded<__stable, _ValueType, _Compare>
+          , _LoserTreePointerUnguarded<__stable, _ValueType, _Compare>
           , _LoserTreeUnguarded<__stable, _ValueType, _Compare>
         >::__type>(
             __seqs_begin, __seqs_end, __target, __sentinel, __length, __comp);
@@ -963,11 +963,11 @@ struct __multiway_merge_k_variant_sentinel_switch
  *  runtime settings.
  *  @param __seqs_begin Begin iterator of iterator pair input sequence.
  *  @param __seqs_end End iterator of iterator pair input sequence.
- *  @param __target Begin iterator of __output sequence.
+ *  @param __target Begin iterator of output sequence.
  *  @param __comp Comparator.
  *  @param __length Maximum length to merge, possibly larger than the
  *  number of elements available.
- *  @param __stable Stable merging incurs __a performance penalty.
+ *  @param __stable Stable merging incurs a performance penalty.
  *  @param __sentinel The sequences have __a __sentinel element.
  *  @return End iterator of output sequence. */
 template<
@@ -1267,15 +1267,15 @@ void multiway_merge_exact_splitting(
  *
  * Must not be called if the number of sequences is 1.
  *
- * @param Splitter functor to split input (either __exact or sampling based)
+ * @param _Splitter functor to split input (either __exact or sampling based)
  *
  * @param __seqs_begin Begin iterator of iterator pair input sequence.
  * @param __seqs_end End iterator of iterator pair input sequence.
- * @param __target Begin iterator of __output sequence.
+ * @param __target Begin iterator of output sequence.
  * @param __comp Comparator.
  * @param __length Maximum length to merge, possibly larger than the
  * number of elements available.
- * @param __stable Stable merging incurs __a performance penalty.
+ * @param __stable Stable merging incurs a performance penalty.
  * @param __sentinel Ignored.
  * @return End iterator of output sequence.
  */
@@ -1285,14 +1285,14 @@ template<
     typename _RAIterIterator,
     typename _RAIter3,
     typename _DifferenceTp,
-    typename Splitter,
+    typename _Splitter,
     typename _Compare
     >
   _RAIter3
   parallel_multiway_merge(_RAIterIterator __seqs_begin,
                           _RAIterIterator __seqs_end,
                           _RAIter3 __target,
-                          Splitter splitter,
+                          _Splitter __splitter,
                           _DifferenceTp __length,
                           _Compare __comp,
                           _ThreadIndex __num_threads)
@@ -1356,7 +1356,7 @@ template<
                   __gnu_parallel::_Settings::get().merge_oversampling *
                     __num_threads;
 
-              splitter(__ne_seqs, __ne_seqs + __k, __length, __total_length,
+              __splitter(__ne_seqs, __ne_seqs + __k, __length, __total_length,
                        __comp, __pieces);
             } //single
 
index 9f61ce3..c7f10ae 100644 (file)
@@ -373,8 +373,8 @@ template<bool __stable, bool __exact, typename _RAIter,
 
     typedef std::vector<
       std::pair<_SortingPlacesIterator, _SortingPlacesIterator> >
-        seq_vector_type;
-    seq_vector_type seqs(__sd->_M_num_threads);
+        _SeqVector;
+    _SeqVector seqs(__sd->_M_num_threads);
 
     for (int __s = 0; __s < __sd->_M_num_threads; ++__s)
       {
@@ -386,7 +386,7 @@ template<bool __stable, bool __exact, typename _RAIter,
 
     __possibly_stable_multiway_merge<
         __stable,
-        typename seq_vector_type::iterator,
+        typename _SeqVector::iterator,
         _RAIter,
         _Compare, _DifferenceType>()
           (seqs.begin(), seqs.end(),
@@ -444,11 +444,11 @@ template<bool __stable, bool __exact, typename _RAIter,
 
             if (!__exact)
               {
-                _DifferenceType size =
+                _DifferenceType __size =
                   (_Settings::get().sort_mwms_oversampling * __num_threads - 1)
                         * __num_threads;
                 __sd._M_samples = static_cast<_ValueType*>(
-                              ::operator new(size * sizeof(_ValueType)));
+                              ::operator new(__size * sizeof(_ValueType)));
               }
             else
               __sd._M_samples = NULL;
index 5d03e67..de53f49 100644 (file)
@@ -174,23 +174,24 @@ __gnu_parallel::sequential_tag()); }
                                __first1, __last1, __first2, __init); }
 
   template<typename _IIter1, typename _IIter2, typename _Tp,
-           typename BinaryFunction1, typename BinaryFunction2>
+           typename _BinaryFunction1, typename _BinaryFunction2>
     inline _Tp
-    inner_product(_IIter1 __first1, _IIter1 __last1, 
-                  _IIter2 __first2, _Tp __init, BinaryFunction1 __binary_op1, 
-                  BinaryFunction2 __binary_op2, __gnu_parallel::sequential_tag)
+    inner_product(_IIter1 __first1, _IIter1 __last1,
+                  _IIter2 __first2, _Tp __init, _BinaryFunction1 __binary_op1, 
+                  _BinaryFunction2 __binary_op2,
+                  __gnu_parallel::sequential_tag)
     { return _GLIBCXX_STD_P::inner_product(__first1, __last1, __first2, __init,
                                            __binary_op1, __binary_op2); }
 
   // Parallel algorithm for random access iterators.
   template<typename _RAIter1, typename _RAIter2,
-           typename _Tp, typename BinaryFunction1, typename BinaryFunction2>
+           typename _Tp, typename _BinaryFunction1, typename _BinaryFunction2>
     _Tp
     __inner_product_switch(_RAIter1 __first1,
                          _RAIter1 __last1,
                          _RAIter2 __first2, _Tp __init,
-                         BinaryFunction1 __binary_op1,
-                         BinaryFunction2 __binary_op2,
+                         _BinaryFunction1 __binary_op1,
+                         _BinaryFunction2 __binary_op2,
                          random_access_iterator_tag,
                          random_access_iterator_tag,
                          __gnu_parallel::_Parallelism __parallelism_tag
@@ -219,24 +220,24 @@ __gnu_parallel::sequential_tag()); }
 
   // No parallelism for input iterators.
   template<typename _IIter1, typename _IIter2, typename _Tp,
-           typename BinaryFunction1, typename BinaryFunction2,
+           typename _BinaryFunction1, typename _BinaryFunction2,
            typename _IteratorTag1, typename _IteratorTag2>
     inline _Tp
     __inner_product_switch(_IIter1 __first1, _IIter1 __last1, 
                          _IIter2 __first2, _Tp __init, 
-                         BinaryFunction1 __binary_op1,
-                         BinaryFunction2 __binary_op2, 
+                         _BinaryFunction1 __binary_op1,
+                         _BinaryFunction2 __binary_op2, 
                          _IteratorTag1, _IteratorTag2)
     { return inner_product(__first1, __last1, __first2, __init,
                            __binary_op1, __binary_op2,
                            __gnu_parallel::sequential_tag()); }
 
   template<typename _IIter1, typename _IIter2, typename _Tp,
-           typename BinaryFunction1, typename BinaryFunction2>
+           typename _BinaryFunction1, typename _BinaryFunction2>
     inline _Tp
     inner_product(_IIter1 __first1, _IIter1 __last1, 
-                  _IIter2 __first2, _Tp __init, BinaryFunction1 __binary_op1, 
-                  BinaryFunction2 __binary_op2, 
+                  _IIter2 __first2, _Tp __init, _BinaryFunction1 __binary_op1, 
+                  _BinaryFunction2 __binary_op2, 
                   __gnu_parallel::_Parallelism __parallelism_tag)
     {
       typedef iterator_traits<_IIter1> _TraitsType1;
@@ -252,11 +253,11 @@ __gnu_parallel::sequential_tag()); }
     }
 
   template<typename _IIter1, typename _IIter2, typename _Tp,
-           typename BinaryFunction1, typename BinaryFunction2>
+           typename _BinaryFunction1, typename _BinaryFunction2>
     inline _Tp
     inner_product(_IIter1 __first1, _IIter1 __last1, 
-                  _IIter2 __first2, _Tp __init, BinaryFunction1 __binary_op1, 
-                  BinaryFunction2 __binary_op2)
+                  _IIter2 __first2, _Tp __init, _BinaryFunction1 __binary_op1, 
+                  _BinaryFunction2 __binary_op2)
     {
       typedef iterator_traits<_IIter1> _TraitsType1;
       typedef typename _TraitsType1::iterator_category _IteratorCategory1;
@@ -275,18 +276,18 @@ __gnu_parallel::sequential_tag()); }
                   _IIter2 __first2, _Tp __init, 
                   __gnu_parallel::_Parallelism __parallelism_tag)
     {
-      typedef iterator_traits<_IIter1> traits_type1;
-      typedef typename traits_type1::value_type value_type1;
-      typedef iterator_traits<_IIter2> traits_type2;
-      typedef typename traits_type2::value_type value_type2;
+      typedef iterator_traits<_IIter1> _TraitsType1;
+      typedef typename _TraitsType1::value_type _ValueType1;
+      typedef iterator_traits<_IIter2> _TraitsType2;
+      typedef typename _TraitsType2::value_type _ValueType2;
 
       typedef typename
-        __gnu_parallel::_Multiplies<value_type1, value_type2>::__result
+        __gnu_parallel::_Multiplies<_ValueType1, _ValueType2>::__result
         _MultipliesResultType;
       return inner_product(__first1, __last1, __first2, __init,
                            __gnu_parallel::_Plus<_Tp, _MultipliesResultType>(),
                            __gnu_parallel::
-                           _Multiplies<value_type1, value_type2>(),
+                           _Multiplies<_ValueType1, _ValueType2>(),
                            __parallelism_tag);
     }
 
@@ -295,18 +296,18 @@ __gnu_parallel::sequential_tag()); }
     inner_product(_IIter1 __first1, _IIter1 __last1, 
                   _IIter2 __first2, _Tp __init)
     {
-      typedef iterator_traits<_IIter1> traits_type1;
-      typedef typename traits_type1::value_type value_type1;
-      typedef iterator_traits<_IIter2> traits_type2;
-      typedef typename traits_type2::value_type value_type2;
+      typedef iterator_traits<_IIter1> _TraitsType1;
+      typedef typename _TraitsType1::value_type _ValueType1;
+      typedef iterator_traits<_IIter2> _TraitsType2;
+      typedef typename _TraitsType2::value_type _ValueType2;
 
       typedef typename
-        __gnu_parallel::_Multiplies<value_type1, value_type2>::__result
+        __gnu_parallel::_Multiplies<_ValueType1, _ValueType2>::__result
         _MultipliesResultType;
       return inner_product(__first1, __last1, __first2, __init,
                            __gnu_parallel::_Plus<_Tp, _MultipliesResultType>(),
                            __gnu_parallel::
-                           _Multiplies<value_type1, value_type2>());
+                           _Multiplies<_ValueType1, _ValueType2>());
     }
 
   // Sequential fallback.
@@ -368,8 +369,8 @@ __gnu_parallel::sequential_tag()); }
     partial_sum(_IIter __begin, _IIter __end, _OutputIterator __result,
                 _BinaryOperation __binary_op)
     {
-      typedef iterator_traits<_IIter> traitsi_type;
-      typedef typename traitsi_type::iterator_category _IIteratorCategory;
+      typedef iterator_traits<_IIter> _ITraitsType;
+      typedef typename _ITraitsType::iterator_category _IIteratorCategory;
 
       typedef iterator_traits<_OutputIterator> _OTraitsType;
       typedef typename _OTraitsType::iterator_category _OIterCategory;
@@ -474,8 +475,8 @@ __gnu_parallel::sequential_tag()); }
                         _OutputIterator __result, _BinaryOperation __binary_op,
                         __gnu_parallel::_Parallelism __parallelism_tag)
     {
-      typedef iterator_traits<_IIter> traitsi_type;
-      typedef typename traitsi_type::iterator_category _IIteratorCategory;
+      typedef iterator_traits<_IIter> _ITraitsType;
+      typedef typename _ITraitsType::iterator_category _IIteratorCategory;
 
       typedef iterator_traits<_OutputIterator> _OTraitsType;
       typedef typename _OTraitsType::iterator_category _OIterCategory;
@@ -491,8 +492,8 @@ __gnu_parallel::sequential_tag()); }
     adjacent_difference(_IIter __begin, _IIter __end,
                         _OutputIterator __result, _BinaryOperation __binary_op)
     {
-      typedef iterator_traits<_IIter> traitsi_type;
-      typedef typename traitsi_type::iterator_category _IIteratorCategory;
+      typedef iterator_traits<_IIter> _ITraitsType;
+      typedef typename _ITraitsType::iterator_category _IIteratorCategory;
 
       typedef iterator_traits<_OutputIterator> _OTraitsType;
       typedef typename _OTraitsType::iterator_category _OIterCategory;
index e8d887b..bb6a9bd 100644 (file)
@@ -157,7 +157,7 @@ namespace __parallel
   template<typename _RAIter1, typename _RAIter2, typename _Tp,
            typename BinaryFunction1, typename BinaryFunction2>
     _Tp
-    __inner_product_switch(_RAIter1, _RAIter1, _RAIter2, _Tp, BinaryFunction1, 
+    __inner_product_switch(_RAIter1, _RAIter1, _RAIter2, _Tp, BinaryFunction1,
                          BinaryFunction2, random_access_iterator_tag, 
                          random_access_iterator_tag, 
                          __gnu_parallel::_Parallelism
index 7147961..1c91be1 100644 (file)
@@ -44,14 +44,14 @@ namespace __gnu_parallel
 /** @brief Embarrassingly parallel algorithm for random access
   * iterators, using an OpenMP for loop.
   *
-  *  @param __begin Begin iterator of element __sequence.
-  *  @param __end End iterator of element __sequence.
+  *  @param __begin Begin iterator of element sequence.
+  *  @param __end End iterator of element sequence.
   *  @param __o User-supplied functor (comparator, predicate, adding
   *  functor, etc.).
   *  @param __f Functor to "process" an element with __op (depends on
   *  desired functionality, e. g. for std::for_each(), ...).
   *  @param __r Functor to "add" a single __result to the already
-  *  processed __elements (depends on functionality).
+  *  processed elements (depends on functionality).
   *  @param __base Base value for reduction.
   *  @param __output Pointer to position where final result is written to
   *  @param __bound Maximum number of elements processed (e. g. for
index cc3443b..00516bf 100644 (file)
@@ -44,8 +44,8 @@ namespace __gnu_parallel
   /** @brief Embarrassingly parallel algorithm for random access
    * iterators, using an OpenMP for loop with static scheduling.
    *
-   *  @param __begin Begin iterator of element __sequence.
-   *  @param __end End iterator of element __sequence.
+   *  @param __begin Begin iterator of element sequence.
+   *  @param __end End iterator of element sequence.
    *  @param __o User-supplied functor (comparator, predicate, adding
    *  functor, ...).
    *  @param __f Functor to "process" an element with __op (depends on
index 0a71831..d5e00af 100644 (file)
@@ -45,14 +45,14 @@ namespace __gnu_parallel
   * iterators, using hand-crafted parallelization by equal splitting
   * the work.
   *
-  *  @param __begin Begin iterator of element __sequence.
-  *  @param __end End iterator of element __sequence.
+  *  @param __begin Begin iterator of element sequence.
+  *  @param __end End iterator of element sequence.
   *  @param __o User-supplied functor (comparator, predicate, adding
   *  functor, ...)
   *  @param __f Functor to "process" an element with __op (depends on
   *  desired functionality, e. g. for std::for_each(), ...).
   *  @param __r Functor to "add" a single __result to the already
-  *  processed __elements (depends on functionality).
+  *  processed elements (depends on functionality).
   *  @param __base Base value for reduction.
   *  @param __output Pointer to position where final result is written to
   *  @param __bound Maximum number of elements processed (e. g. for
index f50e83b..c8d2965 100644 (file)
@@ -114,13 +114,13 @@ template<typename _RAIter, typename _Predicate>
 
             // Private.
             _DifferenceType __thread_left, __thread_left_border,
-                            thread_right, __thread_right_border;
+                            __thread_right, __thread_right_border;
             __thread_left = __left + 1;
 
             // Just to satisfy the condition below.
             __thread_left_border = __thread_left - 1;
-            thread_right = __n - 1;
-            __thread_right_border = thread_right + 1;
+            __thread_right = __n - 1;
+            __thread_right_border = __thread_right + 1;
 
             bool __iam_finished = false;
             while (!__iam_finished)
@@ -139,14 +139,14 @@ template<typename _RAIter, typename _Predicate>
                     omp_unset_lock(&__result_lock);
                   }
 
-                if (thread_right < __thread_right_border)
+                if (__thread_right < __thread_right_border)
                   {
                     omp_set_lock(&__result_lock);
                     if (__left > __right - (__chunk_size - 1))
                       __iam_finished = true;
                     else
                       {
-                        thread_right = __right;
+                        __thread_right = __right;
                         __thread_right_border = __right - (__chunk_size - 1);
                         __right -= __chunk_size;
                       }
@@ -157,23 +157,23 @@ template<typename _RAIter, typename _Predicate>
                   break;
 
                 // Swap as usual.
-                while (__thread_left < thread_right)
+                while (__thread_left < __thread_right)
                   {
                     while (__pred(__begin[__thread_left])
                             && __thread_left <= __thread_left_border)
                       ++__thread_left;
-                    while (!__pred(__begin[thread_right])
-                            && thread_right >= __thread_right_border)
-                      --thread_right;
+                    while (!__pred(__begin[__thread_right])
+                            && __thread_right >= __thread_right_border)
+                      --__thread_right;
 
                     if (__thread_left > __thread_left_border
-                        || thread_right < __thread_right_border)
+                        || __thread_right < __thread_right_border)
                       // Fetch new chunk(__s).
                       break;
 
-                    std::swap(__begin[__thread_left], __begin[thread_right]);
+                    std::swap(__begin[__thread_left], __begin[__thread_right]);
                     ++__thread_left;
-                    --thread_right;
+                    --__thread_right;
                   }
               }
 
@@ -181,7 +181,7 @@ template<typename _RAIter, typename _Predicate>
             if (__thread_left <= __thread_left_border)
 #             pragma omp atomic
               ++__leftover_left;
-            if (thread_right >= __thread_right_border)
+            if (__thread_right >= __thread_right_border)
 #             pragma omp atomic
               ++__leftover_right;
 
@@ -206,7 +206,7 @@ template<typename _RAIter, typename _Predicate>
               }
 
             // <=> __thread_right_border - (__chunk_size - 1) <= __rightnew
-            if (thread_right >= __thread_right_border
+            if (__thread_right >= __thread_right_border
                 && __thread_right_border <= __rightnew)
               {
                 // Chunk already in place, reserve spot.
@@ -241,7 +241,7 @@ template<typename _RAIter, typename _Predicate>
                                  __begin + __swapstart);
               }
 
-            if (thread_right >= __thread_right_border
+            if (__thread_right >= __thread_right_border
                 && __thread_right_border > __rightnew)
               {
                 // Find spot and swap
@@ -331,7 +331,7 @@ template<typename _RAIter, typename _Predicate>
   */
 template<typename _RAIter, typename _Compare>
   void 
-  parallel_nth_element(_RAIter __begin, _RAIter __nth, 
+  __parallel_nth_element(_RAIter __begin, _RAIter __nth, 
                        _RAIter __end, _Compare __comp)
   {
     typedef std::iterator_traits<_RAIter> _TraitsType;
@@ -343,11 +343,11 @@ template<typename _RAIter, typename _Compare>
     _RAIter __split;
     _RandomNumber __rng;
 
-    _DifferenceType minimum_length =
+    _DifferenceType __minimum_length =
       std::max<_DifferenceType>(2, _Settings::get().partition_minimal_n);
 
     // Break if input range to small.
-    while (static_cast<_SequenceIndex>(__end - __begin) >= minimum_length)
+    while (static_cast<_SequenceIndex>(__end - __begin) >= __minimum_length)
       {
         _DifferenceType __n = __end - __begin;
 
@@ -419,11 +419,11 @@ template<typename _RAIter, typename _Compare>
 *  @param __comp Comparator. */
 template<typename _RAIter, typename _Compare>
   void
-  parallel_partial_sort(_RAIter __begin,
+  __parallel_partial_sort(_RAIter __begin,
                         _RAIter __middle,
                         _RAIter __end, _Compare __comp)
   {
-    parallel_nth_element(__begin, __middle, __end, __comp);
+    __parallel_nth_element(__begin, __middle, __end, __comp);
     std::sort(__begin, __middle, __comp);
   }
 
index 49d0d85..cb6d427 100644 (file)
@@ -55,7 +55,7 @@ template<typename _RAIter>
     typedef typename _TraitsType::value_type _ValueType;
     typedef typename _TraitsType::difference_type _DifferenceType;
 
-    /** @brief Begin iterator of the _M_source. */
+    /** @brief Begin iterator of the __source. */
     _RAIter& _M_source;
 
     /** @brief Temporary arrays for each thread. */
@@ -80,14 +80,14 @@ template<typename _RAIter>
     int _M_num_bits;
 
     /** @brief Constructor. */
-    _DRandomShufflingGlobalData(_RAIter& _source)
-    : _M_source(_source) { }
+    _DRandomShufflingGlobalData(_RAIter& __source)
+    : _M_source(__source) { }
   };
 
 /** @brief Local data for a thread participating in
     __gnu_parallel::__parallel_random_shuffle().
   */
-template<typename _RAIter, typename RandomNumberGenerator>
+template<typename _RAIter, typename _RandomNumberGenerator>
   struct _DRSSorterPU
   {
     /** @brief Number of threads participating in total. */
@@ -110,24 +110,24 @@ template<typename _RAIter, typename RandomNumberGenerator>
   *  @param logp Logarithm (basis 2) of the upper range __bound.
   *  @param __rng Random number generator to use.
   */
-template<typename RandomNumberGenerator>
+template<typename _RandomNumberGenerator>
   inline int
-  __random_number_pow2(int logp, RandomNumberGenerator& __rng)
+  __random_number_pow2(int logp, _RandomNumberGenerator& __rng)
   { return __rng.__genrand_bits(logp); }
 
 /** @brief Random shuffle code executed by each thread.
   *  @param __pus Array of thread-local data records. */
-template<typename _RAIter, typename RandomNumberGenerator>
+template<typename _RAIter, typename _RandomNumberGenerator>
   void 
   __parallel_random_shuffle_drs_pu(_DRSSorterPU<_RAIter,
-                                 RandomNumberGenerator>* __pus)
+                                 _RandomNumberGenerator>* __pus)
   {
     typedef std::iterator_traits<_RAIter> _TraitsType;
     typedef typename _TraitsType::value_type _ValueType;
     typedef typename _TraitsType::difference_type _DifferenceType;
 
     _ThreadIndex __iam = omp_get_thread_num();
-    _DRSSorterPU<_RAIter, RandomNumberGenerator>* d = &__pus[__iam];
+    _DRSSorterPU<_RAIter, _RandomNumberGenerator>* d = &__pus[__iam];
     _DRandomShufflingGlobalData<_RAIter>* _M_sd = d->_M_sd;
 
     // Indexing: _M_dist[bin][processor]
@@ -248,7 +248,7 @@ template<typename _Tp>
     if (__x <= 1)
       return 1;
     else
-      return (_Tp)1 << (__log2(__x - 1) + 1);
+      return (_Tp)1 << (__rd_log2(__x - 1) + 1);
   }
 
 /** @brief Main parallel random shuffle step.
@@ -258,14 +258,14 @@ template<typename _Tp>
   *  @param __num_threads Number of threads to use.
   *  @param __rng Random number generator to use.
   */
-template<typename _RAIter, typename RandomNumberGenerator>
+template<typename _RAIter, typename _RandomNumberGenerator>
   void
   __parallel_random_shuffle_drs(_RAIter __begin,
                               _RAIter __end,
                               typename std::iterator_traits
                               <_RAIter>::difference_type __n,
                               _ThreadIndex __num_threads,
-                              RandomNumberGenerator& __rng)
+                              _RandomNumberGenerator& __rng)
   {
     typedef std::iterator_traits<_RAIter> _TraitsType;
     typedef typename _TraitsType::value_type _ValueType;
@@ -352,7 +352,7 @@ template<typename _RAIter, typename RandomNumberGenerator>
               = new _DifferenceType[__num_threads + 1];
             int bin_cursor = 0;
             _M_sd._M_num_bins = _M_num_bins;
-            _M_sd._M_num_bits = __log2(_M_num_bins);
+            _M_sd._M_num_bits = __rd_log2(_M_num_bins);
 
             _DifferenceType __chunk_length = __n / __num_threads,
                             __split = __n % __num_threads, __start = 0;
@@ -396,11 +396,11 @@ template<typename _RAIter, typename RandomNumberGenerator>
  *  @param __end End iterator of sequence.
  *  @param __rng Random number generator to use.
  */
-template<typename _RAIter, typename RandomNumberGenerator>
+template<typename _RAIter, typename _RandomNumberGenerator>
   void
   __sequential_random_shuffle(_RAIter __begin, 
                             _RAIter __end,
-                            RandomNumberGenerator& __rng)
+                            _RandomNumberGenerator& __rng)
   {
     typedef std::iterator_traits<_RAIter> _TraitsType;
     typedef typename _TraitsType::value_type _ValueType;
@@ -451,7 +451,7 @@ template<typename _RAIter, typename RandomNumberGenerator>
       }
 #endif
 
-    int _M_num_bits = __log2(_M_num_bins);
+    int _M_num_bits = __rd_log2(_M_num_bins);
 
     if (_M_num_bins > 1)
       {
@@ -511,11 +511,11 @@ template<typename _RAIter, typename RandomNumberGenerator>
  *  @param __end End iterator of sequence.
  *  @param __rng Random number generator to use.
  */
-template<typename _RAIter, typename RandomNumberGenerator>
+template<typename _RAIter, typename _RandomNumberGenerator>
   inline void
   __parallel_random_shuffle(_RAIter __begin,
                           _RAIter __end,
-                          RandomNumberGenerator __rng = _RandomNumber())
+                          _RandomNumberGenerator __rng = _RandomNumber())
   {
     typedef std::iterator_traits<_RAIter> _TraitsType;
     typedef typename _TraitsType::difference_type _DifferenceType;
index a253126..1fc8cea 100644 (file)
@@ -23,7 +23,7 @@
 // <http://www.gnu.org/licenses/>.
 
 /** @file parallel/search.h
- *  @brief Parallel implementation __base for std::search() and
+ *  @brief Parallel implementation base for std::search() and
  *  std::search_n().
  *  This file is a GNU parallel extension to the Standard C++ Library.
  */
index 03b1921..2d38cad 100644 (file)
@@ -58,7 +58,7 @@ namespace __gnu_parallel
   template<bool __stable, typename _RAIter,
            typename _Compare, typename _Parallelism>
   void
-  parallel_sort(_RAIter __begin, _RAIter __end,
+  __parallel_sort(_RAIter __begin, _RAIter __end,
   _Compare __comp, _Parallelism __parallelism);
         
   /** 
@@ -71,7 +71,7 @@ namespace __gnu_parallel
    */
   template<bool __stable, typename _RAIter, typename _Compare>
   inline void
-  parallel_sort(_RAIter __begin, _RAIter __end,
+  __parallel_sort(_RAIter __begin, _RAIter __end,
     _Compare __comp, multiway_mergesort_tag __parallelism)
   {
     _GLIBCXX_CALL(__end - __begin)
@@ -94,7 +94,7 @@ namespace __gnu_parallel
    */
   template<bool __stable, typename _RAIter, typename _Compare>
   inline void
-  parallel_sort(_RAIter __begin, _RAIter __end,
+  __parallel_sort(_RAIter __begin, _RAIter __end,
     _Compare __comp, multiway_mergesort_exact_tag __parallelism)
   {
     _GLIBCXX_CALL(__end - __begin)
@@ -113,7 +113,7 @@ namespace __gnu_parallel
    */
   template<bool __stable, typename _RAIter, typename _Compare>
   inline void
-  parallel_sort(_RAIter __begin, _RAIter __end,
+  __parallel_sort(_RAIter __begin, _RAIter __end,
     _Compare __comp, multiway_mergesort_sampling_tag __parallelism)
   {
     _GLIBCXX_CALL(__end - __begin)
@@ -131,7 +131,7 @@ namespace __gnu_parallel
    */
   template<bool __stable, typename _RAIter, typename _Compare>
   inline void
-  parallel_sort(_RAIter __begin, _RAIter __end,
+  __parallel_sort(_RAIter __begin, _RAIter __end,
     _Compare __comp, quicksort_tag __parallelism)
   {
     _GLIBCXX_CALL(__end - __begin)
@@ -152,7 +152,7 @@ namespace __gnu_parallel
    */
   template<bool __stable, typename _RAIter, typename _Compare>
   inline void
-  parallel_sort(_RAIter __begin, _RAIter __end,
+  __parallel_sort(_RAIter __begin, _RAIter __end,
     _Compare __comp, balanced_quicksort_tag __parallelism)
   {
     _GLIBCXX_CALL(__end - __begin)
@@ -174,12 +174,12 @@ namespace __gnu_parallel
    */
   template<bool __stable, typename _RAIter, typename _Compare>
   inline void
-  parallel_sort(_RAIter __begin, _RAIter __end,
+  __parallel_sort(_RAIter __begin, _RAIter __end,
     _Compare __comp, default_parallel_tag __parallelism)
   {
     _GLIBCXX_CALL(__end - __begin)
 
-    parallel_sort<__stable>
+    __parallel_sort<__stable>
       (__begin, __end, __comp,
         multiway_mergesort_exact_tag(__parallelism.__get_num_threads()));
   }
@@ -195,7 +195,7 @@ namespace __gnu_parallel
    */
   template<bool __stable, typename _RAIter, typename _Compare>
     inline void
-    parallel_sort(_RAIter __begin, _RAIter __end,
+    __parallel_sort(_RAIter __begin, _RAIter __end,
                   _Compare __comp, parallel_tag __parallelism)
     {
       _GLIBCXX_CALL(__end - __begin)
index ca6eb0c..66c2bab 100644 (file)
@@ -74,16 +74,16 @@ template<typename _DifferenceTp>
 
 /** @brief Work stealing algorithm for random access iterators.
   *
-  *  Uses O(1) additional memory. Synchronization at __job lists is
+  *  Uses O(1) additional memory. Synchronization at job lists is
   *  done with atomic operations.
-  *  @param __begin Begin iterator of element __sequence.
-  *  @param __end End iterator of element __sequence.
+  *  @param __begin Begin iterator of element sequence.
+  *  @param __end End iterator of element sequence.
   *  @param __op User-supplied functor (comparator, predicate, adding
   *  functor, ...).
   *  @param __f Functor to "process" an element with __op (depends on
   *  desired functionality, e. g. for std::for_each(), ...).
   *  @param __r Functor to "add" a single __result to the already
-  *  processed __elements (depends on functionality).
+  *  processed elements (depends on functionality).
   *  @param __base Base value for reduction.
   *  @param __output Pointer to position where final result is written to
   *  @param __bound Maximum number of elements processed (e. g. for
@@ -209,21 +209,21 @@ template<typename _RAIter,
               {
                 // fetch-and-add call
                 // Reserve current job block (size __chunk_size) in my queue.
-                _DifferenceType current_job =
+                _DifferenceType __current_job =
                   __fetch_and_add<_DifferenceType>(
                     &(__my_job._M_first), __chunk_size);
 
                 // Update _M_load, to make the three values consistent,
                 // _M_first might have been changed in the meantime
                 __my_job._M_load = __my_job._M_last - __my_job._M_first + 1;
-                for (_DifferenceType job_counter = 0;
-                     job_counter < __chunk_size
-                       && current_job <= __my_job._M_last;
-                     ++job_counter)
+                for (_DifferenceType __job_counter = 0;
+                     __job_counter < __chunk_size
+                       && __current_job <= __my_job._M_last;
+                     ++__job_counter)
                   {
                     // Yes: process it!
-                    __current = __begin + current_job;
-                    ++current_job;
+                    __current = __begin + __current_job;
+                    ++__current_job;
 
                     // Do actual work.
                     __result = __r(__result, __f(__op, __current));
@@ -271,12 +271,12 @@ template<typename _RAIter,
                 _DifferenceType __stolen_first =
                     __fetch_and_add<_DifferenceType>(
                         &(__job[__victim * __stride]._M_first), __steal);
-                _DifferenceType stolen_try =
+                _DifferenceType __stolen_try =
                     __stolen_first + __steal - _DifferenceType(1);
 
                 __my_job._M_first = __stolen_first;
                 __my_job._M_last =
-                  __gnu_parallel::min(stolen_try, __supposed_last);
+                  __gnu_parallel::min(__stolen_try, __supposed_last);
                 __my_job._M_load = __my_job._M_last - __my_job._M_first + 1;
 
                 // Has potential work again.