|
GADGET-4
|
declares constants and some classes used for log-file handling More...
#include <stdio.h>#include "../main/simulation.h"#include "../mpi_utils/setcomm.h"#include "../logs/timer.h"#include "../data/simparticles.h"Go to the source code of this file.
Classes | |
| class | logs |
| struct | logs::timer_d |
| struct containing the information of a CPU timer More... | |
Macros | |
| #define | CPU_STRING_LEN 120 |
| #define | TIMER_STACK_DEPTH 30 |
| #define | TIMER_STRUCT |
| #define | TIMER_ENUM |
| #define | TIMER_START_INTERNAL(counter) |
| #define | TIMER_START(counter) TIMER_START_INTERNAL(counter) |
| Starts the timer counter. More... | |
| #define | TIMER_STOP_INTERNAL(counter) |
| #define | TIMER_STOP(counter) TIMER_STOP_INTERNAL(counter) |
| Stops the timer counter. More... | |
| #define | TIMER_STOPSTART(stop, start) |
| Stops the timer 'stop' and starts the timer 'start'. More... | |
| #define | TIMER_ADD(counter, amount) Logs.CPU_Step[counter] += (amount); |
| Adds amount to the timer counter. More... | |
| #define | TIMER_DIFF(counter) (Logs.CPU_Step[logs::counter] - Logs.CPU_Step_Stored[logs::counter]) |
| Returns amount elapsed for the timer since last save with TIMER_STORE. More... | |
| #define | TIMER_STORE memcpy(Logs.CPU_Step_Stored, Logs.CPU_Step, sizeof(Logs.CPU_Step)); |
| Copies the current value of CPU times to a stored variable, such that differences with respect to this reference can be calculated. More... | |
Variables | |
| logs | Logs |
declares constants and some classes used for log-file handling
Definition in file logs.h.
| #define TIMER_ADD | ( | counter, | |
| amount | |||
| ) | Logs.CPU_Step[counter] += (amount); |
| #define TIMER_DIFF | ( | counter | ) | (Logs.CPU_Step[logs::counter] - Logs.CPU_Step_Stored[logs::counter]) |
| #define TIMER_START | ( | counter | ) | TIMER_START_INTERNAL(counter) |
| #define TIMER_START_INTERNAL | ( | counter | ) |
| #define TIMER_STOP | ( | counter | ) | TIMER_STOP_INTERNAL(counter) |
| #define TIMER_STOP_INTERNAL | ( | counter | ) |
| #define TIMER_STOPSTART | ( | stop, | |
| start | |||
| ) |
Stops the timer 'stop' and starts the timer 'start'.
Use this macro instead of directly accessing the CPU_Step array, so manual instrumentation APIs can be attached.
| stop | Name of the timer to stop |
| start | Name of the timer to start |
| #define TIMER_STORE memcpy(Logs.CPU_Step_Stored, Logs.CPU_Step, sizeof(Logs.CPU_Step)); |
| #define TIMER_STRUCT |