aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/gh.hh
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2008-02-02 15:43:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2008-02-02 15:43:00 +0000
commit1beb710e75a868f71b74ca5a2b13017593a4469e (patch)
treed9d916cb78ae9b3ee1bd824fbfc9d32401892d2d /Carpet/CarpetLib/src/gh.hh
parentd2d5504fd8975ae714d70cbdda4805d49f0c5bf5 (diff)
CarpetLib: Add function memoryof to measure size of data structures
Add an overloaded function memoryof which measures the size in bytes of CarpetLib's data structures. darcs-hash:20080202154302-dae7b-de41c79cb04617327695fae27928c05c5d431ee8.gz
Diffstat (limited to 'Carpet/CarpetLib/src/gh.hh')
-rw-r--r--Carpet/CarpetLib/src/gh.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/gh.hh b/Carpet/CarpetLib/src/gh.hh
index 6346e1509..4d1592120 100644
--- a/Carpet/CarpetLib/src/gh.hh
+++ b/Carpet/CarpetLib/src/gh.hh
@@ -128,6 +128,7 @@ public:
void remove (dh * d);
// Output
+ size_t memory () const;
ostream & output (ostream & os) const;
private:
@@ -138,6 +139,11 @@ private:
+inline size_t memoryof (gh const & g)
+{
+ return g.memory ();
+}
+
inline ostream & operator<< (ostream & os, gh const & h)
{
return h.output(os);