[cig-commits] r14936 - short/3D/PyLith/trunk/modulesrc/utils
knepley at geodynamics.org
knepley at geodynamics.org
Fri May 8 17:38:09 PDT 2009
Author: knepley
Date: 2009-05-08 17:38:09 -0700 (Fri, 08 May 2009)
New Revision: 14936
Added:
short/3D/PyLith/trunk/modulesrc/utils/petsc_memory.i
Log:
Forgot to add file
Added: short/3D/PyLith/trunk/modulesrc/utils/petsc_memory.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/utils/petsc_memory.i (rev 0)
+++ short/3D/PyLith/trunk/modulesrc/utils/petsc_memory.i 2009-05-09 00:38:09 UTC (rev 14936)
@@ -0,0 +1,45 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+// ----------------------------------------------------------------------
+namespace ALE {
+ class MemoryLogger {
+ protected:
+ MemoryLogger();
+ public:
+ /** Return the global logger
+ *
+ * @returns the logger
+ */
+ static MemoryLogger& singleton();
+ int debug();
+ void setDebug(int debug);
+ public:
+ void stagePush(const char *name);
+ void stagePop();
+ void logAllocation(const char *className, int bytes);
+ void logAllocation(const char *stage, const char *className, int bytes);
+ void logDeallocation(const char *className, int bytes);
+ void logDeallocation(const char *stage, const char *className, int bytes);
+ public:
+ int getNumAllocations();
+ int getNumAllocations(const char *stage);
+ int getNumDeallocations();
+ int getNumDeallocations(const char *stage);
+ int getAllocationTotal();
+ int getAllocationTotal(const char *stage);
+ int getDeallocationTotal();
+ int getDeallocationTotal(const char *stage);
+ };
+}
+
+// End of file
More information about the CIG-COMMITS
mailing list