OSDN Git Service

2010-03-22 Johannes Singler <singler@kit.edu>
authorsingler <singler@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 22 Mar 2010 17:06:50 +0000 (17:06 +0000)
committersingler <singler@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 22 Mar 2010 17:06:50 +0000 (17:06 +0000)
        * include/parallel/numeric (inner_product, partial_sum):
        Precede subsequent call with _GLIBCXX_STD_P:: to avoid ambiguity
        between __gnu_parallel:: and std::
        * include/parallel/algobase.h (equal): Likewise.
        * include/parallel/algo.h (find_first_of, search_n, merge, nth_element,
        partial_sort, max_element, min_element): Likewise.
        * include/parallel/partial_sum.h (__parallel_partial_sum_linear):
        Qualify accumulate call with __gnu_parallel::.

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

libstdc++-v3/ChangeLog
libstdc++-v3/include/parallel/algo.h
libstdc++-v3/include/parallel/algobase.h
libstdc++-v3/include/parallel/numeric
libstdc++-v3/include/parallel/partial_sum.h

index dac1b8e..36e44c3 100644 (file)
@@ -1,3 +1,14 @@
+2010-03-22  Johannes Singler  <singler@kit.edu>
+
+        * include/parallel/numeric (inner_product, partial_sum):
+        Precede subsequent call with _GLIBCXX_STD_P:: to avoid ambiguity 
+        between __gnu_parallel:: and std::
+        * include/parallel/algobase.h (equal): Likewise.
+        * include/parallel/algo.h (find_first_of, search_n, merge, nth_element,
+        partial_sort, max_element, min_element): Likewise.
+        * include/parallel/partial_sum.h (__parallel_partial_sum_linear):
+        Qualify accumulate call with __gnu_parallel::.
+
 2010-03-22  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * include/parallel/base.h (_PseudoSequence): Do not forward declare.
 2010-03-22  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * include/parallel/base.h (_PseudoSequence): Do not forward declare.
index aa87a48..cc2fc67 100644 (file)
@@ -292,8 +292,8 @@ namespace __parallel
       typedef typename _IIterTraits::value_type _IValueType;
       typedef typename iteratorf_traits::value_type _FValueType;
 
       typedef typename _IIterTraits::value_type _IValueType;
       typedef typename iteratorf_traits::value_type _FValueType;
 
-      return find_first_of(__begin1, __end1, __begin2, __end2, __gnu_parallel::
-                           _EqualTo<_IValueType, _FValueType>());
+      return _GLIBCXX_STD_P::find_first_of(__begin1, __end1, __begin2, __end2,
+                         __gnu_parallel::_EqualTo<_IValueType, _FValueType>());
     }
 
   // Sequential fallback
     }
 
   // Sequential fallback
@@ -1160,7 +1160,7 @@ namespace __parallel
              const _Tp& __val)
     {
       typedef typename iterator_traits<_FIterator>::value_type _ValueType;
              const _Tp& __val)
     {
       typedef typename iterator_traits<_FIterator>::value_type _ValueType;
-      return search_n(__begin, __end, __count, __val,
+      return _GLIBCXX_STD_P::search_n(__begin, __end, __count, __val,
                       __gnu_parallel::_EqualTo<_ValueType, _Tp>());
     }
 
                       __gnu_parallel::_EqualTo<_ValueType, _Tp>());
     }
 
@@ -2086,8 +2086,8 @@ namespace __parallel
       typedef typename _Iterator1Traits::value_type _ValueType1;
       typedef typename _Iterator2Traits::value_type _ValueType2;
 
       typedef typename _Iterator1Traits::value_type _ValueType1;
       typedef typename _Iterator2Traits::value_type _ValueType2;
 
-      return merge(__begin1, __end1, __begin2, __end2, __result, 
-                   __gnu_parallel::_Less<_ValueType1, _ValueType2>());
+      return _GLIBCXX_STD_P::merge(__begin1, __end1, __begin2, __end2,
+                  __result, __gnu_parallel::_Less<_ValueType1, _ValueType2>());
     }
 
   // Sequential fallback
     }
 
   // Sequential fallback
@@ -2128,7 +2128,8 @@ namespace __parallel
     {
       typedef iterator_traits<_RAIter> _TraitsType;
       typedef typename _TraitsType::value_type _ValueType;
     {
       typedef iterator_traits<_RAIter> _TraitsType;
       typedef typename _TraitsType::value_type _ValueType;
-      nth_element(__begin, __nth, __end, std::less<_ValueType>());
+      _GLIBCXX_STD_P::nth_element(__begin, __nth, __end,
+                                  std::less<_ValueType>());
     }
 
   // Sequential fallback
     }
 
   // Sequential fallback
@@ -2170,7 +2171,8 @@ namespace __parallel
     {
       typedef iterator_traits<_RAIter> _TraitsType;
       typedef typename _TraitsType::value_type _ValueType;
     {
       typedef iterator_traits<_RAIter> _TraitsType;
       typedef typename _TraitsType::value_type _ValueType;
-      partial_sort(__begin, __middle, __end, std::less<_ValueType>());
+      _GLIBCXX_STD_P::partial_sort(__begin, __middle, __end,
+                                   std::less<_ValueType>());
     }
 
   // Sequential fallback
     }
 
   // Sequential fallback
@@ -2239,7 +2241,8 @@ namespace __parallel
     max_element(_FIterator __begin, _FIterator __end)
     {
       typedef typename iterator_traits<_FIterator>::value_type _ValueType;
     max_element(_FIterator __begin, _FIterator __end)
     {
       typedef typename iterator_traits<_FIterator>::value_type _ValueType;
-      return max_element(__begin, __end, std::less<_ValueType>());
+      return _GLIBCXX_STD_P::max_element(__begin, __end,
+                                         std::less<_ValueType>());
     }
 
   // Public interface
     }
 
   // Public interface
@@ -2330,7 +2333,8 @@ namespace __parallel
     min_element(_FIterator __begin, _FIterator __end)
     {
       typedef typename iterator_traits<_FIterator>::value_type _ValueType;
     min_element(_FIterator __begin, _FIterator __end)
     {
       typedef typename iterator_traits<_FIterator>::value_type _ValueType;
-      return min_element(__begin, __end, std::less<_ValueType>());
+      return _GLIBCXX_STD_P::min_element(__begin, __end,
+                                         std::less<_ValueType>());
     }
 
   // Public interface
     }
 
   // Public interface
index df1c58b..9cc81bd 100644 (file)
@@ -141,14 +141,20 @@ namespace __parallel
   template<typename _IIter1, typename _IIter2>
     inline bool
     equal(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2)
   template<typename _IIter1, typename _IIter2>
     inline bool
     equal(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2)
-    { return mismatch(__begin1, __end1, __begin2).first == __end1; }
+    {
+      return _GLIBCXX_STD_P::mismatch(__begin1, __end1, __begin2).first
+              == __end1;
+    }
 
   // Public interface
   template<typename _IIter1, typename _IIter2, typename _Predicate>
     inline bool
     equal(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, 
           _Predicate __pred)
 
   // Public interface
   template<typename _IIter1, typename _IIter2, typename _Predicate>
     inline bool
     equal(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, 
           _Predicate __pred)
-    { return mismatch(__begin1, __end1, __begin2, __pred).first == __end1; }
+    {
+      return _GLIBCXX_STD_P::mismatch(__begin1, __end1, __begin2, __pred).first
+              == __end1;
+    }
 
   // Sequential fallback
   template<typename _IIter1, typename _IIter2>
 
   // Sequential fallback
   template<typename _IIter1, typename _IIter2>
index 76916ff..7ba44d2 100644 (file)
@@ -283,7 +283,7 @@ namespace __parallel
       typedef typename
         __gnu_parallel::_Multiplies<_ValueType1, _ValueType2>::result_type
         _MultipliesResultType;
       typedef typename
         __gnu_parallel::_Multiplies<_ValueType1, _ValueType2>::result_type
         _MultipliesResultType;
-      return inner_product(__first1, __last1, __first2, __init,
+      return _GLIBCXX_STD_P::inner_product(__first1, __last1, __first2, __init,
                            __gnu_parallel::_Plus<_Tp, _MultipliesResultType>(),
                            __gnu_parallel::
                            _Multiplies<_ValueType1, _ValueType2>(),
                            __gnu_parallel::_Plus<_Tp, _MultipliesResultType>(),
                            __gnu_parallel::
                            _Multiplies<_ValueType1, _ValueType2>(),
@@ -303,7 +303,7 @@ namespace __parallel
       typedef typename
         __gnu_parallel::_Multiplies<_ValueType1, _ValueType2>::result_type
         _MultipliesResultType;
       typedef typename
         __gnu_parallel::_Multiplies<_ValueType1, _ValueType2>::result_type
         _MultipliesResultType;
-      return inner_product(__first1, __last1, __first2, __init,
+      return _GLIBCXX_STD_P::inner_product(__first1, __last1, __first2, __init,
                            __gnu_parallel::_Plus<_Tp, _MultipliesResultType>(),
                            __gnu_parallel::
                            _Multiplies<_ValueType1, _ValueType2>());
                            __gnu_parallel::_Plus<_Tp, _MultipliesResultType>(),
                            __gnu_parallel::
                            _Multiplies<_ValueType1, _ValueType2>());
@@ -359,7 +359,8 @@ namespace __parallel
     partial_sum(_IIter __begin, _IIter __end, _OutputIterator __result)
     {
       typedef typename iterator_traits<_IIter>::value_type _ValueType;
     partial_sum(_IIter __begin, _IIter __end, _OutputIterator __result)
     {
       typedef typename iterator_traits<_IIter>::value_type _ValueType;
-      return partial_sum(__begin, __end, __result, std::plus<_ValueType>());
+      return _GLIBCXX_STD_P::partial_sum(__begin, __end,
+                                         __result, std::plus<_ValueType>());
     }
 
   // Public interface
     }
 
   // Public interface
index 487fd6d..966d9db 100644 (file)
@@ -158,7 +158,8 @@ namespace __gnu_parallel
         else
           {
             ::new(&(__sums[__iam]))
         else
           {
             ::new(&(__sums[__iam]))
-              _ValueType(std::accumulate(__begin + __borders[__iam] + 1,
+              _ValueType(__gnu_parallel::accumulate(
+                                         __begin + __borders[__iam] + 1,
                                          __begin + __borders[__iam + 1],
                                          *(__begin + __borders[__iam]),
                                          __bin_op,
                                          __begin + __borders[__iam + 1],
                                          *(__begin + __borders[__iam]),
                                          __bin_op,