|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r54050 - in sandbox/monotonic: boost/monotonic libs/monotonic/test
From: christian.schladetsch_at_[hidden]
Date: 2009-06-18 02:56:37
Author: cschladetsch
Date: 2009-06-18 02:56:36 EDT (Thu, 18 Jun 2009)
New Revision: 54050
URL: http://svn.boost.org/trac/boost/changeset/54050
Log:
fixes for GCC
Text files modified:
sandbox/monotonic/boost/monotonic/allocator.hpp | 2 +-
sandbox/monotonic/boost/monotonic/local.hpp | 3 +++
sandbox/monotonic/libs/monotonic/test/compare_memory_pool.cpp | 9 +++++----
sandbox/monotonic/libs/monotonic/test/main.cpp | 4 ++--
4 files changed, 11 insertions(+), 7 deletions(-)
Modified: sandbox/monotonic/boost/monotonic/allocator.hpp
==============================================================================
--- sandbox/monotonic/boost/monotonic/allocator.hpp (original)
+++ sandbox/monotonic/boost/monotonic/allocator.hpp 2009-06-18 02:56:36 EDT (Thu, 18 Jun 2009)
@@ -51,7 +51,7 @@
: Parent(boost::monotonic::get_storage()) { }
private:
- template <class T> struct local;
+ template <class Storage> struct local;
allocator(storage_base &store) throw()
: Parent(store) { }
Modified: sandbox/monotonic/boost/monotonic/local.hpp
==============================================================================
--- sandbox/monotonic/boost/monotonic/local.hpp (original)
+++ sandbox/monotonic/boost/monotonic/local.hpp 2009-06-18 02:56:36 EDT (Thu, 18 Jun 2009)
@@ -12,6 +12,9 @@
{
namespace monotonic
{
+ storage_base *set_storage(storage_base &new_storage);
+ void default_storage();
+
template <class Storage>
struct local : storage_base
{
Modified: sandbox/monotonic/libs/monotonic/test/compare_memory_pool.cpp
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/compare_memory_pool.cpp (original)
+++ sandbox/monotonic/libs/monotonic/test/compare_memory_pool.cpp 2009-06-18 02:56:36 EDT (Thu, 18 Jun 2009)
@@ -44,7 +44,7 @@
template <class Fun>
PoolResult compare_memory_pool(size_t count, size_t length, Fun fun)
{
- cout << "compare_memory_pool: " << count << ", " << length << endl;
+ //cout << "compare_memory_pool: " << count << ", " << length << endl;
typedef std::list<int, boost::pool_allocator<int,
boost::default_user_allocator_new_delete,
boost::details::pool::null_mutex> > pool_v;
@@ -121,7 +121,7 @@
}
// test std
- if (0)
+ if (1)
{
boost::timer timer;
for (size_t n = 0; n < count; ++n)
@@ -134,7 +134,7 @@
result.std_elapsed = timer.elapsed();
}
- cout << length << ": fast_pool, pool, std, mono, local: " << result.fast_pool_elapsed << ", " << result.pool_elapsed << ", " << result.std_elapsed << ", " << result.mono_elapsed << ", " << result.local_mono_elapsed << endl;
+ //cout << length << ": fast_pool, pool, std, mono, local: " << result.fast_pool_elapsed << ", " << result.pool_elapsed << ", " << result.std_elapsed << ", " << result.mono_elapsed << ", " << result.local_mono_elapsed << endl;
return result;
}
@@ -159,6 +159,7 @@
void compare_memory_pool()
{
size_t num_outter_loops = 1000;
+/*
PoolResults r0 = compare_memory_pool(num_outter_loops, 10000, 10, thrash_pool());
cout << "thrash_pool" << endl;
cout << "count\t" << "fast_p\t" << "pool\t" << "std\t" << "local\t" << "mono\t" << "fp/mono\t" << "fp/local" << endl;
@@ -167,7 +168,7 @@
PoolResult const &result = iter.second;
cout << iter.first << '\t' << result.fast_pool_elapsed << '\t' << result.pool_elapsed << "\t" << result.std_elapsed << '\t' << result.local_mono_elapsed << '\t' << result.mono_elapsed << '\t' << 100.*result.fast_pool_elapsed/result.mono_elapsed << "%\t" << '\t' << 100.*result.fast_pool_elapsed/result.local_mono_elapsed << endl;
}
-
+*/
PoolResults r1 = compare_memory_pool(num_outter_loops, 1000, 10, thrash_pool_sort());
cout << "thrash_pool_sort" << endl;
cout << "count\t" << "fast_p\t" << "pool\t" << "std\t" << "local\t" << "mono\t" << "fp/mono\t" << "fp/local" << endl;
Modified: sandbox/monotonic/libs/monotonic/test/main.cpp
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/main.cpp (original)
+++ sandbox/monotonic/libs/monotonic/test/main.cpp 2009-06-18 02:56:36 EDT (Thu, 18 Jun 2009)
@@ -370,8 +370,8 @@
#endif
//test_chained_storage();
- test_map_list_heap_stack();
- //compare_memory_pool();
+ //test_map_list_heap_stack();
+ compare_memory_pool();
//test_mono_map();
//test_mono_map();
//test_static_storage();
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk