]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2009-09-25 Johannes Singler <singler@ira.uka.de>
authorJohannes Singler <singler@ira.uka.de>
Fri, 25 Sep 2009 08:39:09 +0000 (08:39 +0000)
committerJohannes Singler <singler@gcc.gnu.org>
Fri, 25 Sep 2009 08:39:09 +0000 (08:39 +0000)
        * include/parallel/include/parallel/checkers.h
        (is_sorted_failure, is_sorted_print_failures):  Remove (unused).
        (__is_sorted):  Remove default parameter for _Compare; remove
        inappropriate printf.

From-SVN: r152162

libstdc++-v3/ChangeLog
libstdc++-v3/include/parallel/checkers.h

index cf5d185c59d9be839f5fc18f07671684d8949401..83edeb759156b36063616011fb33fe735a961649 100644 (file)
@@ -1,3 +1,10 @@
+2009-09-25  Johannes Singler  <singler@ira.uka.de>
+
+        * include/parallel/include/parallel/checkers.h 
+        (is_sorted_failure, is_sorted_print_failures):  Remove (unused).
+        (__is_sorted):  Remove default parameter for _Compare; remove 
+        inappropriate printf.
+
 2009-09-25  Johannes Singler  <singler@ira.uka.de>
 
         * include/parallel/base.h:  Comment on presence of min/max duplicates.
index 5d3acfa4b8d2e46ea0d1de1cbff96b0734d40bd0..70cc949e3fed58fc119ed80796cca178c5a52798 100644 (file)
@@ -46,13 +46,9 @@ namespace __gnu_parallel
    * @param __comp Comparator.
    * @return @__c true if sorted, @__c false otherwise.
    */
-  // XXX Compare default template argument
   template<typename _IIter, typename _Compare>
     bool
-    __is_sorted(_IIter __begin, _IIter __end,
-              _Compare __comp
-              = std::less<typename std::iterator_traits<_IIter>::
-              _ValueType>())
+    __is_sorted(_IIter __begin, _IIter __end, _Compare __comp)
     {
       if (__begin == __end)
         return true;
@@ -64,8 +60,6 @@ namespace __gnu_parallel
         {
           if (__comp(*__current, *__recent))
             {
-              printf("__is_sorted: check failed before position %__i.\n",
-                     __position);
               return false;
             }
           __recent = __current;
@@ -75,83 +69,4 @@ namespace __gnu_parallel
       return true;
     }
 
-  /**
-   * @brief Check whether @__c [__begin, @__c __end) is sorted according to
-   * @__c __comp.
-   * Prints the position in case an unordered pair is found.
-   * @param __begin Begin iterator of sequence.
-   * @param __end End iterator of sequence.
-   * @param __first_failure The first failure is returned in this variable.
-   * @param __comp Comparator.
-   * @return @__c true if sorted, @__c false otherwise.
-   */
-  // XXX Compare default template argument
-  template<typename _IIter, typename _Compare>
-    bool
-    is_sorted_failure(_IIter __begin, _IIter __end,
-                      _IIter& __first_failure,
-                      _Compare __comp
-                      = std::less<typename std::iterator_traits<_IIter>::
-                      _ValueType>())
-    {
-      if (__begin == __end)
-        return true;
-
-      _IIter __current(__begin), __recent(__begin);
-
-      unsigned long long __position = 1;
-      for (__current++; __current != __end; __current++)
-        {
-          if (__comp(*__current, *__recent))
-            {
-              __first_failure = __current;
-              printf("__is_sorted: check failed before position %lld.\n",
-                     __position);
-              return false;
-            }
-          __recent = __current;
-          __position++;
-        }
-
-      __first_failure = __end;
-      return true;
-    }
-
-  /**
-   * @brief Check whether @__c [__begin, @__c __end) is sorted according to
-   * @__c __comp.
-   * Prints all unordered pair, including the surrounding two elements.
-   * @param __begin Begin iterator of sequence.
-   * @param __end End iterator of sequence.
-   * @param __comp Comparator.
-   * @return @__c true if sorted, @__c false otherwise.
-   */
-  template<typename _IIter, typename _Compare>
-    bool
-    // XXX Compare default template argument
-    is_sorted_print_failures(_IIter __begin, _IIter __end,
-                             _Compare __comp
-                             = std::less<typename std::iterator_traits
-                             <_IIter>::value_type>())
-    {
-      if (__begin == __end)
-        return true;
-
-      _IIter __recent(__begin);
-      bool __ok = true;
-
-      for (_IIter __pos(__begin + 1); __pos != __end; __pos++)
-        {
-          if (__comp(*__pos, *__recent))
-            {
-              printf("%ld: %d %d %d %d\n", __pos - __begin, *(__pos - 2),
-                     *(__pos- 1), *__pos, *(__pos + 1));
-              __ok = false;
-            }
-          __recent = __pos;
-        }
-      return __ok;
-    }
-}
-
 #endif /* _GLIBCXX_PARALLEL_CHECKERS_H */