|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53948 - in sandbox/monotonic: boost/monotonic libs/monotonic/test
From: christian.schladetsch_at_[hidden]
Date: 2009-06-15 18:54:34
Author: cschladetsch
Date: 2009-06-15 18:54:33 EDT (Mon, 15 Jun 2009)
New Revision: 53948
URL: http://svn.boost.org/trac/boost/changeset/53948
Log:
renamed inline_storage to storage
Text files modified:
sandbox/monotonic/boost/monotonic/inline_storage.h | 6 +++---
sandbox/monotonic/libs/monotonic/test/main.cpp | 24 ++++++++++++------------
sandbox/monotonic/libs/monotonic/test/rope.cpp | 4 ++--
sandbox/monotonic/libs/monotonic/test/test_bubble_sort.cpp | 2 +-
sandbox/monotonic/libs/monotonic/test/test_dupe.cpp | 2 +-
sandbox/monotonic/libs/monotonic/test/test_map_list.cpp | 2 +-
6 files changed, 20 insertions(+), 20 deletions(-)
Modified: sandbox/monotonic/boost/monotonic/inline_storage.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/inline_storage.h (original)
+++ sandbox/monotonic/boost/monotonic/inline_storage.h 2009-06-15 18:54:33 EDT (Mon, 15 Jun 2009)
@@ -9,7 +9,7 @@
#include <boost/array.hpp>
#include <boost/aligned_storage.hpp>
-// define this to use boost::auto_buffer<> rather than boost::array for monotonic::inline_storage
+// define this to use boost::auto_buffer<> rather than boost::array for monotonic::storage
//#define BOOST_MONOTONIC_USE_AUTOBUFFER
// this currently does not work, because resizing the underlying buffer breaks
// containers that may reference the previously used memory
@@ -24,7 +24,7 @@
{
/// storage for an allocator that is on the stack or heap
template <size_t N>
- struct inline_storage : storage_base
+ struct storage : storage_base
{
#ifdef BOOST_MONOTONIC_USE_AUTOBUFFER
@@ -40,7 +40,7 @@
size_t num_allocations;
#endif
public:
- inline_storage()
+ storage()
: cursor(0)
#ifndef NDEBUG
, num_allocations(0)
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-15 18:54:33 EDT (Mon, 15 Jun 2009)
@@ -39,7 +39,7 @@
void test_deque()
{
- monotonic::inline_storage<4000> storage; // create local storage on the stack
+ monotonic::storage<4000> storage; // create local storage on the stack
{
{
std::list<int, boost::monotonic::allocator<int> > list(storage);
@@ -79,7 +79,7 @@
void test_basic()
{
- monotonic::inline_storage<1000*sizeof(int)> storage1; // create local storage on the stack
+ monotonic::storage<1000*sizeof(int)> storage1; // create local storage on the stack
monotonic::vector<int> v1(storage1); // create a vector that uses this storage
for(int i = 0; i < 100; ++i)
@@ -95,7 +95,7 @@
// create the storage that will be used for the various monotonic containers.
// while it is on the stack here, it could be on the heap as well.
- monotonic::inline_storage<1000> storage;
+ monotonic::storage<1000> storage;
// create a list that uses inline, monotonically-increasing storage
monotonic::list<int> list(storage);
@@ -116,7 +116,7 @@
void test_copy()
{
- monotonic::inline_storage<1000*sizeof(int)> storage;
+ monotonic::storage<1000*sizeof(int)> storage;
monotonic::vector<int> v1(storage);
for (int n = 0; n < 100; ++n)
@@ -132,7 +132,7 @@
void test_ctors()
{
- monotonic::inline_storage<1000*sizeof(int)> storage;
+ monotonic::storage<1000*sizeof(int)> storage;
string foo = "foo";
monotonic::vector<char> v1(foo.begin(), foo.end(), storage);
assert(v1.size() == 3);
@@ -161,7 +161,7 @@
void test_speed()
{
typedef monotonic::map<int, monotonic::list<int> > map_with_list;
- monotonic::inline_storage<1000000> storage;
+ monotonic::storage<1000000> storage;
map_with_list m(storage);
size_t count = 10000;
boost::timer timer;
@@ -201,7 +201,7 @@
size_t num_iterations = 100000;
typedef monotonic::map<int, monotonic::list<int> > map_with_list;
- monotonic::inline_storage<10000000> *storage = new monotonic::inline_storage<10000000>;
+ monotonic::storage<10000000> *storage = new monotonic::storage<10000000>;
// do the test with monotonic containers and heap-based storage
{
@@ -240,11 +240,11 @@
}
}
-// #define BOOST_MONOTONIC_USE_AUTOBUFFER before including <boost/monotonic/inline_storage.h> to
+// #define BOOST_MONOTONIC_USE_AUTOBUFFER before including <boost/monotonic/storage.h> to
// try this at home.
void test_auto_buffer()
{
- monotonic::inline_storage<10> storage;
+ monotonic::storage<10> storage;
// this fails because the storage that the vector uses
// will be moved when the buffer resizes...
@@ -282,7 +282,7 @@
template<typename C>
void test_loop_monotonic()
{
- boost::monotonic::inline_storage<100000> storage;
+ boost::monotonic::storage<100000> storage;
boost::monotonic::vector<Foo<C> > vec(storage);
Foo<C> orig = { 'A', 65 };
vec.assign(ELEM_COUNT, orig);
@@ -310,7 +310,7 @@
void test_alignment()
{
- monotonic::inline_storage<10000> storage;
+ monotonic::storage<10000> storage;
// the two arguments to storage.allocate are the size, and the required alignment
void *P = storage.allocate(3, 4);
@@ -383,7 +383,7 @@
void test_shared_allocators()
{
- monotonic::inline_storage<500> sa, sb;
+ monotonic::storage<500> sa, sb;
typedef monotonic::allocator<int> Al;
{
std::vector<int, Al> v0(sa), v1(sa);
Modified: sandbox/monotonic/libs/monotonic/test/rope.cpp
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/rope.cpp (original)
+++ sandbox/monotonic/libs/monotonic/test/rope.cpp 2009-06-15 18:54:33 EDT (Mon, 15 Jun 2009)
@@ -47,7 +47,7 @@
void test_rope()
{
{
- monotonic::inline_storage<4000> storage; // create local storage on the stack
+ monotonic::storage<4000> storage; // create local storage on the stack
{
monotonic::chain<int, 100> rope(storage);
for (int n = 0; n < 200; ++n)
@@ -58,7 +58,7 @@
}
- monotonic::inline_storage<1000> storage;
+ monotonic::storage<1000> storage;
{
typedef monotonic::chain<Foo, 2> Rope2;
Rope2 foo(4, storage);
Modified: sandbox/monotonic/libs/monotonic/test/test_bubble_sort.cpp
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/test_bubble_sort.cpp (original)
+++ sandbox/monotonic/libs/monotonic/test/test_bubble_sort.cpp 2009-06-15 18:54:33 EDT (Mon, 15 Jun 2009)
@@ -26,7 +26,7 @@
pair<double,double> test_bubble_sort(size_t count = 50*1000, size_t length = 20)
{
- monotonic::inline_storage<100000> storage;// = new monotonic::inline_storage<100000>();
+ monotonic::storage<100000> storage;// = new monotonic::storage<100000>();
boost::timer mono_timer;
for (size_t n = 0; n < count; ++n)
{
Modified: sandbox/monotonic/libs/monotonic/test/test_dupe.cpp
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/test_dupe.cpp (original)
+++ sandbox/monotonic/libs/monotonic/test/test_dupe.cpp 2009-06-15 18:54:33 EDT (Mon, 15 Jun 2009)
@@ -14,7 +14,7 @@
pair<double,double> test_dupe(size_t num_tests, size_t count, size_t size)
{
- monotonic::inline_storage<1000000> storage;
+ monotonic::storage<1000000> storage;
boost::timer mono_timer;
for (size_t n = 0; n < num_tests; ++n)
Modified: sandbox/monotonic/libs/monotonic/test/test_map_list.cpp
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/test_map_list.cpp (original)
+++ sandbox/monotonic/libs/monotonic/test/test_map_list.cpp 2009-06-15 18:54:33 EDT (Mon, 15 Jun 2009)
@@ -25,7 +25,7 @@
// amount of work the next frame.
void test_map_list_realtime()
{
- monotonic::inline_storage<1000000> storage;// = new monotonic::inline_storage<10000000>;
+ monotonic::storage<1000000> storage;// = new monotonic::storage<10000000>;
const size_t outter_loops = 10*1000;
const size_t inner_loops = 10000;
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