|
IBAMR
IBAMR version 0.19.
|
#include "SAMRAI_config.h"#include "tbox/Array.h"#include "tbox/Database.h"#include "tbox/List.h"#include "tbox/PIO.h"#include "tbox/Pointer.h"#include "tbox/Serializable.h"#include "tbox/Timer.h"#include <set>#include <iostream>Classes | |
| class | SAMRAI::tbox::TimerManager |
| class | SAMRAI::tbox::ScopedTimer |
Namespaces | |
| SAMRAI | |
| SAMRAI::tbox | |
Macros | |
| #define | included_iostream |
| #define | SAMRAI_COMBINE_TOKENS(x, y) x##y |
| #define | SAMRAI_CONCATENATE_TOKENS(x, y) SAMRAI_COMBINE_TOKENS(x, y) |
| #define | SAMRAI_SETUP_TIMER(timer_str) |
| #define | SAMRAI_SETUP_TIMER_AND_SCOPE(timer_str) |
| #define included_iostream |
| #define SAMRAI_COMBINE_TOKENS | ( | x, | |
| y | |||
| ) | x##y |
Macro wrapper for '##' to prevent it from being called before variables (e.g., LINE) are expanded.
| #define SAMRAI_CONCATENATE_TOKENS | ( | x, | |
| y | |||
| ) | SAMRAI_COMBINE_TOKENS(x, y) |
Second macro wrapper for '##' - the preprocessor does not fully expand nested macros containing '##', so we need another level of indirection.
| #define SAMRAI_SETUP_TIMER | ( | timer_str | ) |
Macro for setting up a timer. Defines a static pointer with name 'cardinal_timer_X' in the current scope, in which 'X' is the current line number. The arguments are the variable name of the timer (e.g., t_interpolate_velocity) and a string for identifying the timer in the output (e.g., "cardinal::fsi::IFEDMethod::interpolateVelocity()").
SAMRAI's TimerManager class stores the timers in an array: i.e., in order to find a timer, it must perform possibly hundreds of string comparisons. This is a performance problem for short functions which we still want to time. Hence, this macro sets up the timer as a static pointer and only defines it once. It does nothing if SAMRAI is not initialized.
| #define SAMRAI_SETUP_TIMER_AND_SCOPE | ( | timer_str | ) |
Convenience macro which sets up a ScopedTimer for the given timer name. Like the other macro, the pointer to the timer is named samrai_timer_X and the ScopedTimer is named samrai_timer_X_scope in which X is the current line number.
1.8.17