aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/data.hh
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/CarpetLib/src/data.hh')
-rw-r--r--Carpet/CarpetLib/src/data.hh10
1 files changed, 10 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/data.hh b/Carpet/CarpetLib/src/data.hh
index fa11e2852..be30a96c7 100644
--- a/Carpet/CarpetLib/src/data.hh
+++ b/Carpet/CarpetLib/src/data.hh
@@ -155,10 +155,20 @@ private:
public:
+ // Memory usage
+ size_t memory () const;
+
// Output
ostream & output (ostream& os) const;
friend ostream & operator<< <T> (ostream & os, data<T> const & d);
};
+
+// Memory usage
+template<typename T>
+inline size_t memoryof (data<T> const & d)
+{
+ return d.memory();
+}
#endif // DATA_HH