From patchwork Fri May 27 16:42:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 97708 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 89493B6F90 for ; Sat, 28 May 2011 02:42:19 +1000 (EST) Received: (qmail 17007 invoked by alias); 27 May 2011 16:42:17 -0000 Received: (qmail 16981 invoked by uid 22791); 27 May 2011 16:42:14 -0000 X-SWARE-Spam-Status: No, hits=0.1 required=5.0 tests=AWL, BAYES_50, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from smtp204.alice.it (HELO smtp204.alice.it) (82.57.200.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 27 May 2011 16:41:59 +0000 Received: from [192.168.1.4] (79.36.197.165) by smtp204.alice.it (8.5.124.08) id 4D7E0F64069A09E9; Fri, 27 May 2011 18:41:55 +0200 Message-ID: <4DDFD47A.6030105@oracle.com> Date: Fri, 27 May 2011 18:42:34 +0200 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110414 SUSE/3.1.10 Thunderbird/3.1.10 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: libstdc++ Subject: [v3] libstdc++/49187 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, parallel-mode should be back to usable. Note, I didn't try to clean-up the tangle of includes we have in parallel-mode files, a lot can be improved, for sure. I also added gates for the *_debug.cc pb_ds testfiles, otherwise all spuriously fail in check-parallel, etc. Tested x86_64-linux normal, debug, parallel modes. Committed to mainline. Paolo. //////////////////////// 2011-05-27 Paolo Carlini PR libstdc++/49187 * include/parallel/losertree.h: Add missing using declarations of _Base::_M_comp. * include/parallel/algobase.h: Include . * include/parallel/multiway_merge.h: Include , forward declare __merge_advance. * include/parallel/multiseq_selection.h: Don't include here. * include/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp: Fix qualification of upper_bound. * testsuite/ext/pb_ds/regression/tree_no_data_map_rand_debug.cc: Use dg-require-debug-mode. * testsuite/ext/pb_ds/regression/tree_data_map_rand_debug.cc: Likewise. * testsuite/ext/pb_ds/regression/priority_queue_rand_debug.cc: Likewise. * testsuite/ext/pb_ds/regression/trie_no_data_map_rand_debug.cc: Likewise. * testsuite/ext/pb_ds/regression/trie_data_map_rand_debug.cc: Likewise. * testsuite/ext/pb_ds/regression/list_update_no_data_map_rand_debug.cc: Likewise. * testsuite/ext/pb_ds/regression/list_update_data_map_rand_debug.cc: Likewise. * testsuite/ext/pb_ds/regression/hash_no_data_map_rand_debug.cc: Likewise. * testsuite/ext/pb_ds/regression/hash_data_map_rand_debug.cc: Likewise. * include/parallel/algo.h: Minor uglification fixes. Index: include/parallel/multiway_merge.h =================================================================== --- include/parallel/multiway_merge.h (revision 174336) +++ include/parallel/multiway_merge.h (working copy) @@ -45,6 +45,7 @@ #include #include #include +#include #if _GLIBCXX_ASSERTIONS #include #endif @@ -54,6 +55,12 @@ namespace __gnu_parallel { + template + _OutputIterator + __merge_advance(_RAIter1&, _RAIter1, _RAIter2&, _RAIter2, + _OutputIterator, _DifferenceTp, _Compare); + /** @brief _Iterator wrapper supporting an implicit supremum at the end * of the sequence, dominating all comparisons. * Index: include/parallel/losertree.h =================================================================== --- include/parallel/losertree.h (revision 174336) +++ include/parallel/losertree.h (working copy) @@ -171,6 +171,7 @@ { typedef _LoserTreeBase<_Tp, _Compare> _Base; using _Base::_M_k; + using _Base::_M_comp; using _Base::_M_losers; using _Base::_M_first_insert; @@ -263,6 +264,7 @@ typedef _LoserTreeBase<_Tp, _Compare> _Base; using _Base::_M_log_k; using _Base::_M_k; + using _Base::_M_comp; using _Base::_M_losers; using _Base::_M_first_insert; @@ -409,6 +411,7 @@ { typedef _LoserTreePointerBase<_Tp, _Compare> _Base; using _Base::_M_k; + using _Base::_M_comp; using _Base::_M_losers; public: @@ -490,6 +493,7 @@ { typedef _LoserTreePointerBase<_Tp, _Compare> _Base; using _Base::_M_k; + using _Base::_M_comp; using _Base::_M_losers; public: @@ -644,6 +648,7 @@ { typedef _LoserTreeUnguardedBase<_Tp, _Compare> _Base; using _Base::_M_k; + using _Base::_M_comp; using _Base::_M_losers; public: @@ -731,6 +736,7 @@ { typedef _LoserTreeUnguardedBase<_Tp, _Compare> _Base; using _Base::_M_k; + using _Base::_M_comp; using _Base::_M_losers; public: @@ -887,6 +893,7 @@ { typedef _LoserTreePointerUnguardedBase<_Tp, _Compare> _Base; using _Base::_M_k; + using _Base::_M_comp; using _Base::_M_losers; public: @@ -972,6 +979,7 @@ { typedef _LoserTreePointerUnguardedBase<_Tp, _Compare> _Base; using _Base::_M_k; + using _Base::_M_comp; using _Base::_M_losers; public: Index: include/parallel/multiseq_selection.h =================================================================== --- include/parallel/multiseq_selection.h (revision 174336) +++ include/parallel/multiseq_selection.h (working copy) @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -46,8 +46,6 @@ #include -#include - namespace __gnu_parallel { /** @brief Compare __a pair of types lexicographically, ascending. */ Index: include/parallel/algobase.h =================================================================== --- include/parallel/algobase.h (revision 174336) +++ include/parallel/algobase.h (working copy) @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -38,8 +38,7 @@ #include #include -#include -#include +#include #include #include Index: include/parallel/algo.h =================================================================== --- include/parallel/algo.h (revision 174336) +++ include/parallel/algo.h (working copy) @@ -273,12 +273,12 @@ _BinaryPredicate __comp) { typedef std::iterator_traits<_IIter> _IIterTraits; - typedef std::iterator_traits<_FIterator> iteratorf_traits; + typedef std::iterator_traits<_FIterator> _FIterTraits; typedef typename _IIterTraits::iterator_category _IIteratorCategory; - typedef typename iteratorf_traits::iterator_category iteratorf_category; + typedef typename _FIterTraits::iterator_category _FIteratorCategory; return __find_first_of_switch(__begin1, __end1, __begin2, __end2, __comp, - _IIteratorCategory(), iteratorf_category()); + _IIteratorCategory(), _FIteratorCategory()); } // Public interface, insert default comparator @@ -288,9 +288,9 @@ _FIterator __begin2, _FIterator __end2) { typedef std::iterator_traits<_IIter> _IIterTraits; - typedef std::iterator_traits<_FIterator> iteratorf_traits; + typedef std::iterator_traits<_FIterator> _FIterTraits; typedef typename _IIterTraits::value_type _IValueType; - typedef typename iteratorf_traits::value_type _FValueType; + typedef typename _FIterTraits::value_type _FValueType; return __gnu_parallel::find_first_of(__begin1, __end1, __begin2, __end2, __gnu_parallel::_EqualTo<_IValueType, _FValueType>()); Index: include/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp =================================================================== --- include/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp (revision 174336) +++ include/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp (working copy) @@ -244,9 +244,9 @@ { using namespace std; const size_t* const p_upper = - _GLIBCXX_STD_A::upper_bound(g_a_rank_bounds, - g_a_rank_bounds + num_distinct_rank_bounds, - base_type::m_size); + std::upper_bound(g_a_rank_bounds, + g_a_rank_bounds + num_distinct_rank_bounds, + base_type::m_size); if (p_upper == g_a_rank_bounds + num_distinct_rank_bounds) return max_rank; Index: testsuite/ext/pb_ds/regression/tree_no_data_map_rand_debug.cc =================================================================== --- testsuite/ext/pb_ds/regression/tree_no_data_map_rand_debug.cc (revision 174336) +++ testsuite/ext/pb_ds/regression/tree_no_data_map_rand_debug.cc (working copy) @@ -1,7 +1,7 @@ +// { dg-require-debug-mode "" } // { dg-require-time "" } // This can take long on simulators, timing out the test. -// { dg-options "-D_GLIBCXX_DEBUG -DITERATIONS=5" { target simulator } } -// { dg-options "-D_GLIBCXX_DEBUG" } +// { dg-options "-DITERATIONS=5" { target simulator } } // { dg-timeout-factor 2.0 } // -*- C++ -*- Index: testsuite/ext/pb_ds/regression/tree_data_map_rand_debug.cc =================================================================== --- testsuite/ext/pb_ds/regression/tree_data_map_rand_debug.cc (revision 174336) +++ testsuite/ext/pb_ds/regression/tree_data_map_rand_debug.cc (working copy) @@ -1,7 +1,7 @@ +// { dg-require-debug-mode "" } // { dg-require-time "" } // This can take long on simulators, timing out the test. -// { dg-options "-D_GLIBCXX_DEBUG -DITERATIONS=5" { target simulator } } -// { dg-options "-D_GLIBCXX_DEBUG" } +// { dg-options "-DITERATIONS=5" { target simulator } } // { dg-timeout-factor 2.0 } // -*- C++ -*- Index: testsuite/ext/pb_ds/regression/priority_queue_rand_debug.cc =================================================================== --- testsuite/ext/pb_ds/regression/priority_queue_rand_debug.cc (revision 174336) +++ testsuite/ext/pb_ds/regression/priority_queue_rand_debug.cc (working copy) @@ -1,7 +1,7 @@ +// { dg-require-debug-mode "" } // { dg-require-time "" } // This can take long on simulators, timing out the test. -// { dg-options "-D_GLIBCXX_DEBUG -DITERATIONS=5" { target simulator } } -// { dg-options "-D_GLIBCXX_DEBUG" } +// { dg-options "-DITERATIONS=5" { target simulator } } // { dg-timeout-factor 2.0 } // -*- C++ -*- Index: testsuite/ext/pb_ds/regression/trie_no_data_map_rand_debug.cc =================================================================== --- testsuite/ext/pb_ds/regression/trie_no_data_map_rand_debug.cc (revision 174336) +++ testsuite/ext/pb_ds/regression/trie_no_data_map_rand_debug.cc (working copy) @@ -1,7 +1,7 @@ +// { dg-require-debug-mode "" } // { dg-require-time "" } // This can take long on simulators, timing out the test. -// { dg-options "-D_GLIBCXX_DEBUG -DITERATIONS=5" { target simulator } } -// { dg-options "-D_GLIBCXX_DEBUG" } +// { dg-options "-DITERATIONS=5" { target simulator } } // { dg-timeout-factor 2.0 } // -*- C++ -*- Index: testsuite/ext/pb_ds/regression/trie_data_map_rand_debug.cc =================================================================== --- testsuite/ext/pb_ds/regression/trie_data_map_rand_debug.cc (revision 174336) +++ testsuite/ext/pb_ds/regression/trie_data_map_rand_debug.cc (working copy) @@ -1,7 +1,7 @@ +// { dg-require-debug-mode "" } // { dg-require-time "" } // This can take long on simulators, timing out the test. -// { dg-options "-D_GLIBCXX_DEBUG -DITERATIONS=5" { target simulator } } -// { dg-options "-D_GLIBCXX_DEBUG" } +// { dg-options "-DITERATIONS=5" { target simulator } } // { dg-timeout-factor 2.0 } // -*- C++ -*- Index: testsuite/ext/pb_ds/regression/list_update_no_data_map_rand_debug.cc =================================================================== --- testsuite/ext/pb_ds/regression/list_update_no_data_map_rand_debug.cc (revision 174336) +++ testsuite/ext/pb_ds/regression/list_update_no_data_map_rand_debug.cc (working copy) @@ -1,5 +1,5 @@ +// { dg-require-debug-mode "" } // { dg-require-time "" } -// { dg-options "-D_GLIBCXX_DEBUG" } // { dg-timeout-factor 2.0 } // -*- C++ -*- Index: testsuite/ext/pb_ds/regression/list_update_data_map_rand_debug.cc =================================================================== --- testsuite/ext/pb_ds/regression/list_update_data_map_rand_debug.cc (revision 174336) +++ testsuite/ext/pb_ds/regression/list_update_data_map_rand_debug.cc (working copy) @@ -1,5 +1,5 @@ +// { dg-require-debug-mode "" } // { dg-require-time "" } -// { dg-options "-D_GLIBCXX_DEBUG" } // { dg-timeout-factor 2.0 } // -*- C++ -*- Index: testsuite/ext/pb_ds/regression/hash_no_data_map_rand_debug.cc =================================================================== --- testsuite/ext/pb_ds/regression/hash_no_data_map_rand_debug.cc (revision 174336) +++ testsuite/ext/pb_ds/regression/hash_no_data_map_rand_debug.cc (working copy) @@ -1,7 +1,7 @@ +// { dg-require-debug-mode "" } // { dg-require-time "" } // This can take long on simulators, timing out the test. -// { dg-options "-D_GLIBCXX_DEBUG -DITERATIONS=5" { target simulator } } -// { dg-options "-D_GLIBCXX_DEBUG" } +// { dg-options "-DITERATIONS=5" { target simulator } } // { dg-timeout-factor 2.0 } // -*- C++ -*- Index: testsuite/ext/pb_ds/regression/hash_data_map_rand_debug.cc =================================================================== --- testsuite/ext/pb_ds/regression/hash_data_map_rand_debug.cc (revision 174336) +++ testsuite/ext/pb_ds/regression/hash_data_map_rand_debug.cc (working copy) @@ -1,7 +1,7 @@ +// { dg-require-debug-mode "" } // { dg-require-time "" } // This can take long on simulators, timing out the test. -// { dg-options "-D_GLIBCXX_DEBUG -DITERATIONS=5" { target simulator } } -// { dg-options "-D_GLIBCXX_DEBUG" } +// { dg-options "-DITERATIONS=5" { target simulator } } // { dg-timeout-factor 2.0 } // -*- C++ -*-