#include <Timing.h>
Public Types | |
enum | TimingAccounts |
Definition of all available timing accounts. More... | |
enum | CountingAccounts |
Definition of all available counting accounts. More... | |
Public Member Functions | |
void | count (enum CountingAccounts account, int i=1) |
Counting frequency of certain events. | |
void | start_timing () |
Function to be called first, initializing the timers. | |
void | start () |
Enter a new timer frame. | |
void | stop (enum TimingAccounts account) |
Leave timer frame. | |
void | collect_timing (MPI_Comm Comm, enum TimingAccounts ac, double *stat_times) |
collect specific timing data of all nodes | |
void | collect_timing (MPI_Comm Comm) |
collect timing data of all nodes | |
void | print_timing (std::ostream &os) |
report generator | |
Static Public Member Functions | |
static void | collect (MPI_Comm Comm) |
compatibility function for calling report generator. | |
Protected Member Functions | |
template<typename T> | |
T | calcsum (typename std::vector< T > &data, int start, int end, T sum) |
calculate sum over values of an array. | |
void | pl (std::ostream &OS, char *name, enum TimingAccounts ac, bool opt=false) |
generate one report line. | |
Protected Attributes | |
bool | print_local_times |
statistics |
The times are added to accounts. Use start() to enter a new frame and stop(account) to leave it, adding spent time to the account and go back to the previous frame (therefore recursion is allowed). The MISC account is used starting and stopping the overall timing process and WHOLE is used for storing the summed up total runtime.
Definition of all available counting accounts.
_CCMAX is used internally and must not be used as account.
Definition of all available timing accounts.
_ACMAX is used internally and must not be used as account.
T Timing::calcsum | ( | typename std::vector< T > & | data, | |
int | start, | |||
int | end, | |||
T | sum | |||
) | [inline, protected] |
calculate sum over values of an array.
The sum is calculated from account start till end (including).
void Timing::count | ( | enum CountingAccounts | account, | |
int | i = 1 | |||
) | [inline] |
Counting frequency of certain events.
account | where to count | |
i | frequency to add. Can be negative too. (default=1) |
void Timing::print_timing | ( | std::ostream & | os | ) | [inline] |
report generator
os | the output stream to write the report to |
void Timing::stop | ( | enum TimingAccounts | account | ) | [inline] |
Leave timer frame.
account | where to add elapsed time |