OSDN Git Service

2004-08-19 Paolo Carlini <pcarlini@suse.de>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Aug 2004 20:22:45 +0000 (20:22 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Aug 2004 20:22:45 +0000 (20:22 +0000)
* testsuite/performance/20_util/allocator/insert.cc: For std::map
instantiate the allocator for a correct pair type.
* testsuite/performance/20_util/allocator/insert_insert.cc: Likewise.
* testsuite/performance/20_util/allocator/map_thread.cc: Likewise.
* testsuite/performance/20_util/allocator/producer_consumer.cc:
Likewise.

* testsuite/performance/20_util/allocator/list_sort_search.cc: Very
minor formatting fixes.
* testsuite/performance/20_util/allocator/map_mt_find.cc: Likewise.

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

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/performance/20_util/allocator/insert.cc
libstdc++-v3/testsuite/performance/20_util/allocator/insert_insert.cc
libstdc++-v3/testsuite/performance/20_util/allocator/list_sort_search.cc
libstdc++-v3/testsuite/performance/20_util/allocator/map_mt_find.cc
libstdc++-v3/testsuite/performance/20_util/allocator/map_thread.cc
libstdc++-v3/testsuite/performance/20_util/allocator/producer_consumer.cc

index e934d3b..f849f16 100644 (file)
@@ -1,5 +1,18 @@
 2004-08-19  Paolo Carlini  <pcarlini@suse.de>
 
+       * testsuite/performance/20_util/allocator/insert.cc: For std::map
+       instantiate the allocator for a correct pair type.
+       * testsuite/performance/20_util/allocator/insert_insert.cc: Likewise.
+       * testsuite/performance/20_util/allocator/map_thread.cc: Likewise.
+       * testsuite/performance/20_util/allocator/producer_consumer.cc:
+       Likewise.
+
+       * testsuite/performance/20_util/allocator/list_sort_search.cc: Very
+       minor formatting fixes.
+       * testsuite/performance/20_util/allocator/map_mt_find.cc: Likewise.
+
+2004-08-19  Paolo Carlini  <pcarlini@suse.de>
+
        * testsuite/22_locale/time_put/put/char/1.cc: Add VERIFY on the
        results.
        * testsuite/22_locale/time_put/put/char/2.cc: Likewise.
index d9c8ced..372b7e0 100644 (file)
@@ -200,20 +200,32 @@ int main(void)
 #endif
 
   typedef less<test_type> compare_type;
+  typedef pair<const test_type, test_type> pair_type;
+  typedef __gnu_cxx::malloc_allocator<pair_type> m_pair_alloc_type;
+  typedef __gnu_cxx::new_allocator<pair_type> n_pair_alloc_type;
+  typedef __gnu_cxx::__mt_alloc<pair_type> so_pair_alloc_type;
+  typedef __gnu_cxx::bitmap_allocator<pair_type> bit_pair_alloc_type;
+  typedef __gnu_cxx::__pool_alloc<pair_type> po_pair_alloc_type;
+
 #ifdef TEST_B15
-  test_container(map<test_type, test_type, compare_type, m_alloc_type>());
+  test_container(map<test_type, test_type, compare_type,
+                m_pair_alloc_type>());
 #endif
 #ifdef TEST_B16
-  test_container(map<test_type, test_type, compare_type, n_alloc_type>());
+  test_container(map<test_type, test_type, compare_type,
+                n_pair_alloc_type>());
 #endif
 #ifdef TEST_B17
-  test_container(map<test_type, test_type, compare_type, so_alloc_type>());
+  test_container(map<test_type, test_type, compare_type,
+                so_pair_alloc_type>());
 #endif
 #ifdef TEST_B18
-  test_container(map<test_type, test_type, compare_type, bit_alloc_type>());
+  test_container(map<test_type, test_type, compare_type,
+                bit_pair_alloc_type>());
 #endif
 #ifdef TEST_B19
-  test_container(map<test_type, test_type, compare_type, po_alloc_type>());
+  test_container(map<test_type, test_type, compare_type,
+                po_pair_alloc_type>());
 #endif
 
 #ifdef TEST_B20
@@ -280,21 +292,25 @@ int main(void)
   test_container(deque<test_type, po_alloc_type>(), true);
 #endif
 
-  typedef less<test_type> compare_type;
 #ifdef TEST_T15
-  test_container(map<test_type, test_type, compare_type, m_alloc_type>(), true);
+  test_container(map<test_type, test_type, compare_type,
+                m_pair_alloc_type>(), true);
 #endif
 #ifdef TEST_T16
-  test_container(map<test_type, test_type, compare_type, n_alloc_type>(), true);
+  test_container(map<test_type, test_type, compare_type,
+                n_pair_alloc_type>(), true);
 #endif
 #ifdef TEST_T17
-  test_container(map<test_type, test_type, compare_type, so_alloc_type>(), true);
+  test_container(map<test_type, test_type, compare_type,
+                so_pair_alloc_type>(), true);
 #endif
 #ifdef TEST_T18
-  test_container(map<test_type, test_type, compare_type, bit_alloc_type>(), true);
+  test_container(map<test_type, test_type, compare_type,
+                bit_pair_alloc_type>(), true);
 #endif
 #ifdef TEST_T19
-  test_container(map<test_type, test_type, compare_type, po_alloc_type>(), true);
+  test_container(map<test_type, test_type, compare_type,
+                po_pair_alloc_type>(), true);
 #endif
 
 #ifdef TEST_T20
index ef1ff52..455c9a4 100644 (file)
@@ -171,20 +171,32 @@ int main(void)
 #endif
 
   typedef less<test_type> compare_type;
+  typedef pair<const test_type, test_type> pair_type;
+  typedef __gnu_cxx::malloc_allocator<pair_type> m_pair_alloc_type;
+  typedef __gnu_cxx::new_allocator<pair_type> n_pair_alloc_type;
+  typedef __gnu_cxx::__mt_alloc<pair_type> so_pair_alloc_type;
+  typedef __gnu_cxx::bitmap_allocator<pair_type> bit_pair_alloc_type;
+  typedef __gnu_cxx::__pool_alloc<pair_type> po_pair_alloc_type;
+
 #ifdef TEST_S15
-  test_container(map<test_type, test_type, compare_type, m_alloc_type>());
+  test_container(map<test_type, test_type, compare_type,
+                m_pair_alloc_type>());
 #endif
 #ifdef TEST_S16
-  test_container(map<test_type, test_type, compare_type, n_alloc_type>());
+  test_container(map<test_type, test_type, compare_type,
+                n_pair_alloc_type>());
 #endif
 #ifdef TEST_S17
-  test_container(map<test_type, test_type, compare_type, so_alloc_type>());
+  test_container(map<test_type, test_type, compare_type,
+                so_pair_alloc_type>());
 #endif
 #ifdef TEST_S18
-  test_container(map<test_type, test_type, compare_type, bit_alloc_type>());
+  test_container(map<test_type, test_type, compare_type,
+                bit_pair_alloc_type>());
 #endif
 #ifdef TEST_S19
-  test_container(map<test_type, test_type, compare_type, po_alloc_type>());
+  test_container(map<test_type, test_type, compare_type,
+                po_pair_alloc_type>());
 #endif
 
 #ifdef TEST_S20
index 09d1821..cce55cc 100644 (file)
 // 2004-03-11  Dhruv Matani  <dhruvbird@HotPOP.com>
 
 #include <list>
-#include <map>
 #include <algorithm>
 #include <cstdlib>
 #include <typeinfo>
 #include <sstream>
 #include <ext/mt_allocator.h>
 #include <ext/malloc_allocator.h>
-#include <cxxabi.h>
-#include <testsuite_performance.h>
 #include <ext/bitmap_allocator.h>
 #include <ext/pool_allocator.h>
+#include <cxxabi.h>
+#include <testsuite_performance.h>
 
 using namespace std;
 using __gnu_cxx::malloc_allocator;
index 415f322..a3ab267 100644 (file)
 #include <sstream>
 #include <ext/mt_allocator.h>
 #include <ext/malloc_allocator.h>
-#include <cxxabi.h>
-#include <testsuite_performance.h>
 #include <ext/bitmap_allocator.h>
 #include <ext/pool_allocator.h>
+#include <cxxabi.h>
+#include <testsuite_performance.h>
 
 using namespace std;
 using __gnu_cxx::malloc_allocator;
@@ -48,9 +48,7 @@ using __gnu_cxx::__mt_alloc;
 using __gnu_cxx::bitmap_allocator;
 using __gnu_cxx::__pool_alloc;
 
-typedef int test_type;
-
-bool less_int(int x1, int x2) { return x1<x2; }
+bool less_int(int x1, int x2) { return x1 < x2; }
 
 #if defined USE_FUNCTION_COMPARE
 #define COMPARE_T typeof(&less_int)
@@ -133,19 +131,21 @@ template <typename Alloc>
 
 int main()
 {
+  typedef pair<const int, string> pair_type;
+
 #ifdef TEST_T0
-  exec_tests<new_allocator<int> >();
+  exec_tests<new_allocator<pair_type> >();
 #endif
 #ifdef TEST_T1
-  exec_tests<malloc_allocator<int> >();
+  exec_tests<malloc_allocator<pair_type> >();
 #endif
 #ifdef TEST_T2
-  exec_tests<__mt_alloc<int> >();
+  exec_tests<__mt_alloc<pair_type> >();
 #endif
 #ifdef TEST_T3
-  exec_tests<bitmap_allocator<int> >();
+  exec_tests<bitmap_allocator<pair_type> >();
 #endif
 #ifdef TEST_T4
-  exec_tests<__pool_alloc<int> >();
+  exec_tests<__pool_alloc<pair_type> >();
 #endif
 }
index c9cf34c..487a8aa 100644 (file)
@@ -111,24 +111,30 @@ template<typename Container>
 
 int main(void)
 {
+  typedef pair<const int, int> pair_type;
+
 #ifdef TEST_T0
   test_container(map<int, int>());
 #endif
 #ifdef TEST_T1
-  test_container(map<int, int, less<const int>, new_allocator<int> >());
+  test_container(map<int, int, less<const int>,
+                new_allocator<pair_type> >());
 #endif
 #ifdef TEST_T2
-  test_container(map<int, int, less<const int>, malloc_allocator<int> >());
+  test_container(map<int, int, less<const int>,
+                malloc_allocator<pair_type> >());
 #endif
 #ifdef TEST_T3
   test_container(map<int, int, less<const int>,
-                     __mt_alloc< pair<const int, int> > >());
+                __mt_alloc<pair_type> >());
 #endif
 #ifdef TEST_T4
-  test_container(map<int, int, less<const int>, bitmap_allocator<int> >());
+  test_container(map<int, int, less<const int>,
+                bitmap_allocator<pair_type> >());
 #endif
 #ifdef TEST_T5
-  test_container(map<int, int, less<const int>, __pool_alloc<int> >());
+  test_container(map<int, int, less<const int>,
+                __pool_alloc<pair_type> >());
 #endif
   return 0;
 }
index 98f39c1..dd277a9 100644 (file)
@@ -63,6 +63,13 @@ typedef __mt_alloc<test_type> so_alloc_type;
 typedef bitmap_allocator<test_type> bit_alloc_type;
 typedef __pool_alloc<test_type> po_alloc_type;
 
+typedef pair<const test_type, test_type> pair_type;
+typedef malloc_allocator<pair_type> malloc_pair_alloc_type;
+typedef new_allocator<pair_type> new_pair_alloc_type;
+typedef __mt_alloc<pair_type> so_pair_alloc_type;
+typedef bitmap_allocator<pair_type> bit_pair_alloc_type;
+typedef __pool_alloc<pair_type> po_pair_alloc_type;
+
 // The number of iterations to be performed.
 int iterations = 10000;
 
@@ -323,19 +330,24 @@ int main(void)
 #endif
 
 #ifdef TEST_T10
-  test_container(map<test_type, test_type, compare_type, malloc_alloc_type>());
+  test_container(map<test_type, test_type, compare_type,
+                malloc_pair_alloc_type>());
 #endif
 #ifdef TEST_T11
-  test_container(map<test_type, test_type, compare_type, new_alloc_type>());
+  test_container(map<test_type, test_type, compare_type,
+                new_pair_alloc_type>());
 #endif
 #ifdef TEST_T12
-  test_container(map<test_type, test_type, compare_type, so_alloc_type>());
+  test_container(map<test_type, test_type, compare_type,
+                so_pair_alloc_type>());
 #endif
 #ifdef TEST_T13
-  test_container(map<test_type, test_type, compare_type, bit_alloc_type>());
+  test_container(map<test_type, test_type, compare_type,
+                bit_pair_alloc_type>());
 #endif
 #ifdef TEST_T14
-  test_container(map<test_type, test_type, compare_type, po_alloc_type>());
+  test_container(map<test_type, test_type, compare_type,
+                po_pair_alloc_type>());
 #endif
 
   return 0;