diff options
author | Erik Schnetter <schnetter@aei.mpg.de> | 2005-03-05 17:46:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@aei.mpg.de> | 2005-03-05 17:46:00 +0000 |
commit | 251b33dc90966225a9e5e799615a5152d9d14456 (patch) | |
tree | 18de4a4fcda7ee816ad2cf169a9adb37b7ee2714 /Carpet/CarpetLib/src/defs.cc | |
parent | 5cbb9a9180e724206411d38827c6ea02f9bc9fa8 (diff) |
CarpetLib: Introduce new class mem<T> for memory management
Introduce a new class mem<T> for memory management. Memory management
has become sufficiently complicated to move into its own class. The
class mem<T> features:
1. Allocating nelem items of type T
2. Managing contiguous regions of memory for several data<T> objects
for vector groups
3. Allowing a pointer to a memory region to be passed in, which is
used instead of allocating memory through new
4. Reference counting, so that the mem<T> object only goes away once
the last using data<T> object does not need it any more.
This makes it unnecessary to delete the first data<T> objects for a
grid function group last.
darcs-hash:20050305174647-891bb-e1f53adca34e5a668af96c662845cca0f259f8e6.gz
Diffstat (limited to 'Carpet/CarpetLib/src/defs.cc')
-rw-r--r-- | Carpet/CarpetLib/src/defs.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/defs.cc b/Carpet/CarpetLib/src/defs.cc index 9e1edba65..fcbbace14 100644 --- a/Carpet/CarpetLib/src/defs.cc +++ b/Carpet/CarpetLib/src/defs.cc @@ -165,6 +165,7 @@ template ostream& output (ostream& os, const list<bbox<int,3> >& l); template ostream& output (ostream& os, const set<bbox<int,3> >& s); template ostream& output (ostream& os, const set<bboxset<int,3> >& s); template ostream& output (ostream& os, const stack<bbox<int,3> >& s); +template ostream& output (ostream& os, const vector<bool>& v); template ostream& output (ostream& os, const vector<int>& v); template ostream& output (ostream& os, const vector<CCTK_REAL>& v); template ostream& output (ostream& os, const vector<bbox<int,3> >& v); |