diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2007-03-12 16:08:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2007-03-12 16:08:00 +0000 |
commit | c541fddc3f724add906dbae09ca29c157146ad31 (patch) | |
tree | 4d96e2f1729a2b356f4621b657afc05e94c0d9c8 /Carpet/CarpetLib/src/mem.cc | |
parent | 054755b50795cd280c10d76a9921860fc3d1aee4 (diff) |
CarpetLib: Simplify timer interface
Remove some parameters which are not necessary:
CarpetLib::print_timestats
CarpetLib::timestat_disable
Allow the value -1 as well as 0 to disable output for timers and
memory statistics.
darcs-hash:20070312160854-dae7b-6c60bf0c64a5cac03da97595bb30bb2b47568165.gz
Diffstat (limited to 'Carpet/CarpetLib/src/mem.cc')
-rw-r--r-- | Carpet/CarpetLib/src/mem.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Carpet/CarpetLib/src/mem.cc b/Carpet/CarpetLib/src/mem.cc index 8776e642b..a983fc497 100644 --- a/Carpet/CarpetLib/src/mem.cc +++ b/Carpet/CarpetLib/src/mem.cc @@ -54,7 +54,7 @@ mem (size_t const vectorlength, size_t const nelems, T * const memptr) DECLARE_CCTK_PARAMETERS; if (memptr == NULL) { const double nbytes = vectorlength * nelems * sizeof (T); - if (max_allowed_memory_MB + if (max_allowed_memory_MB > 0 and (total_allocated_bytes + nbytes > 1.0e6 * max_allowed_memory_MB)) { T Tdummy; @@ -142,7 +142,7 @@ void CarpetLib_printmemstats (CCTK_ARGUMENTS) DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS; - if (print_memstats_every + if (print_memstats_every > 0 and cctk_iteration % print_memstats_every == 0) { cout << "Memory statistics from CarpetLib:" << endl |