From: Paolo Carlini Date: Thu, 19 Aug 2004 20:22:45 +0000 (+0000) Subject: insert.cc: For std::map instantiate the allocator for a correct pair type. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1b90e7a391c8c8d93e3d075dfbc6b9ab37fa6e39;p=gcc.git insert.cc: For std::map instantiate the allocator for a correct pair type. 2004-08-19 Paolo Carlini * 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. From-SVN: r86269 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e934d3bd88c..f849f164c79 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,16 @@ +2004-08-19 Paolo Carlini + + * 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 * testsuite/22_locale/time_put/put/char/1.cc: Add VERIFY on the diff --git a/libstdc++-v3/testsuite/performance/20_util/allocator/insert.cc b/libstdc++-v3/testsuite/performance/20_util/allocator/insert.cc index d9c8ceddb19..372b7e078cb 100644 --- a/libstdc++-v3/testsuite/performance/20_util/allocator/insert.cc +++ b/libstdc++-v3/testsuite/performance/20_util/allocator/insert.cc @@ -200,20 +200,32 @@ int main(void) #endif typedef less compare_type; + typedef pair pair_type; + typedef __gnu_cxx::malloc_allocator m_pair_alloc_type; + typedef __gnu_cxx::new_allocator n_pair_alloc_type; + typedef __gnu_cxx::__mt_alloc so_pair_alloc_type; + typedef __gnu_cxx::bitmap_allocator bit_pair_alloc_type; + typedef __gnu_cxx::__pool_alloc po_pair_alloc_type; + #ifdef TEST_B15 - test_container(map()); + test_container(map()); #endif #ifdef TEST_B16 - test_container(map()); + test_container(map()); #endif #ifdef TEST_B17 - test_container(map()); + test_container(map()); #endif #ifdef TEST_B18 - test_container(map()); + test_container(map()); #endif #ifdef TEST_B19 - test_container(map()); + test_container(map()); #endif #ifdef TEST_B20 @@ -280,21 +292,25 @@ int main(void) test_container(deque(), true); #endif - typedef less compare_type; #ifdef TEST_T15 - test_container(map(), true); + test_container(map(), true); #endif #ifdef TEST_T16 - test_container(map(), true); + test_container(map(), true); #endif #ifdef TEST_T17 - test_container(map(), true); + test_container(map(), true); #endif #ifdef TEST_T18 - test_container(map(), true); + test_container(map(), true); #endif #ifdef TEST_T19 - test_container(map(), true); + test_container(map(), true); #endif #ifdef TEST_T20 diff --git a/libstdc++-v3/testsuite/performance/20_util/allocator/insert_insert.cc b/libstdc++-v3/testsuite/performance/20_util/allocator/insert_insert.cc index ef1ff52dbce..455c9a42e92 100644 --- a/libstdc++-v3/testsuite/performance/20_util/allocator/insert_insert.cc +++ b/libstdc++-v3/testsuite/performance/20_util/allocator/insert_insert.cc @@ -171,20 +171,32 @@ int main(void) #endif typedef less compare_type; + typedef pair pair_type; + typedef __gnu_cxx::malloc_allocator m_pair_alloc_type; + typedef __gnu_cxx::new_allocator n_pair_alloc_type; + typedef __gnu_cxx::__mt_alloc so_pair_alloc_type; + typedef __gnu_cxx::bitmap_allocator bit_pair_alloc_type; + typedef __gnu_cxx::__pool_alloc po_pair_alloc_type; + #ifdef TEST_S15 - test_container(map()); + test_container(map()); #endif #ifdef TEST_S16 - test_container(map()); + test_container(map()); #endif #ifdef TEST_S17 - test_container(map()); + test_container(map()); #endif #ifdef TEST_S18 - test_container(map()); + test_container(map()); #endif #ifdef TEST_S19 - test_container(map()); + test_container(map()); #endif #ifdef TEST_S20 diff --git a/libstdc++-v3/testsuite/performance/20_util/allocator/list_sort_search.cc b/libstdc++-v3/testsuite/performance/20_util/allocator/list_sort_search.cc index 09d1821bf3c..cce55cc6a62 100644 --- a/libstdc++-v3/testsuite/performance/20_util/allocator/list_sort_search.cc +++ b/libstdc++-v3/testsuite/performance/20_util/allocator/list_sort_search.cc @@ -28,17 +28,16 @@ // 2004-03-11 Dhruv Matani #include -#include #include #include #include #include #include #include -#include -#include #include #include +#include +#include using namespace std; using __gnu_cxx::malloc_allocator; diff --git a/libstdc++-v3/testsuite/performance/20_util/allocator/map_mt_find.cc b/libstdc++-v3/testsuite/performance/20_util/allocator/map_mt_find.cc index 415f322ed97..a3ab267ad12 100644 --- a/libstdc++-v3/testsuite/performance/20_util/allocator/map_mt_find.cc +++ b/libstdc++-v3/testsuite/performance/20_util/allocator/map_mt_find.cc @@ -36,10 +36,10 @@ #include #include #include -#include -#include #include #include +#include +#include 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 int main() { + typedef pair pair_type; + #ifdef TEST_T0 - exec_tests >(); + exec_tests >(); #endif #ifdef TEST_T1 - exec_tests >(); + exec_tests >(); #endif #ifdef TEST_T2 - exec_tests<__mt_alloc >(); + exec_tests<__mt_alloc >(); #endif #ifdef TEST_T3 - exec_tests >(); + exec_tests >(); #endif #ifdef TEST_T4 - exec_tests<__pool_alloc >(); + exec_tests<__pool_alloc >(); #endif } diff --git a/libstdc++-v3/testsuite/performance/20_util/allocator/map_thread.cc b/libstdc++-v3/testsuite/performance/20_util/allocator/map_thread.cc index c9cf34c6096..487a8aa5cf4 100644 --- a/libstdc++-v3/testsuite/performance/20_util/allocator/map_thread.cc +++ b/libstdc++-v3/testsuite/performance/20_util/allocator/map_thread.cc @@ -111,24 +111,30 @@ template int main(void) { + typedef pair pair_type; + #ifdef TEST_T0 test_container(map()); #endif #ifdef TEST_T1 - test_container(map, new_allocator >()); + test_container(map, + new_allocator >()); #endif #ifdef TEST_T2 - test_container(map, malloc_allocator >()); + test_container(map, + malloc_allocator >()); #endif #ifdef TEST_T3 test_container(map, - __mt_alloc< pair > >()); + __mt_alloc >()); #endif #ifdef TEST_T4 - test_container(map, bitmap_allocator >()); + test_container(map, + bitmap_allocator >()); #endif #ifdef TEST_T5 - test_container(map, __pool_alloc >()); + test_container(map, + __pool_alloc >()); #endif return 0; } diff --git a/libstdc++-v3/testsuite/performance/20_util/allocator/producer_consumer.cc b/libstdc++-v3/testsuite/performance/20_util/allocator/producer_consumer.cc index 98f39c19709..dd277a95fb1 100644 --- a/libstdc++-v3/testsuite/performance/20_util/allocator/producer_consumer.cc +++ b/libstdc++-v3/testsuite/performance/20_util/allocator/producer_consumer.cc @@ -63,6 +63,13 @@ typedef __mt_alloc so_alloc_type; typedef bitmap_allocator bit_alloc_type; typedef __pool_alloc po_alloc_type; +typedef pair pair_type; +typedef malloc_allocator malloc_pair_alloc_type; +typedef new_allocator new_pair_alloc_type; +typedef __mt_alloc so_pair_alloc_type; +typedef bitmap_allocator bit_pair_alloc_type; +typedef __pool_alloc 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_container(map()); #endif #ifdef TEST_T11 - test_container(map()); + test_container(map()); #endif #ifdef TEST_T12 - test_container(map()); + test_container(map()); #endif #ifdef TEST_T13 - test_container(map()); + test_container(map()); #endif #ifdef TEST_T14 - test_container(map()); + test_container(map()); #endif return 0;