[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
|   | timing.hxx File Reference |  | 
#include <iostream>#include <sstream>#include <vector>#include <sys/time.h>Go to the source code of this file.
| Macros | |
| #define | TIC | 
| #define | TICPUSH | 
| #define | TICTOCLOOP_BEGIN(inner_repetitions, outer_repetitions) | 
| #define | TICTOCLOOP_END | 
| #define | TOC | 
| #define | TOCN | 
| #define | TOCS | 
| #define | USE_NESTED_TICTOC | 
| #define | USETICTOC | 
Timing macros for runtime measurements
This header defines timing macros for runtime measurements. See Timing macros for runtime measurements for examples.
| #define USETICTOC | 
Enable timing using TIC/TOC* pairs. This macro defines temporary storage for the timing data, so it needs to precede the TIC/TOC macros in their context.
| #define TIC | 
Start timing. Requires USE_TICTOC to be defined in the current context.
| #define TOC | 
Stop timing and output result (the time difference w.r.t. the last TIC or TICPUSH instance) to std::cerr.
| #define TOCN | 
Stop timing. This macro evaluates to the time difference (w.r.t. the last TIC or TICPUSH) in msec as a double.
| #define TOCS | 
Stop timing. This macro evaluates to the time difference (w.r.t. the last TIC or TICPUSH) as a std::string (including units).
| #define USE_NESTED_TICTOC | 
Enable timing using TICPUSH/TOC* pairs. This macro defines temporary storage for the timing data, so it needs to precede the TIC/TOC macros in their context.
| #define TICPUSH | 
Start timing, possibly a nested block of code within some other timed code block. Requires USE_NESTED_TICTOC to be defined once in the current context.
| #define TICTOCLOOP_BEGIN | ( | inner_repetitions, | |
| outer_repetitions | |||
| ) | 
Executes the code block up to TICTOCLOOP_END outer_repetitions x inner_repetitions times. The measurement is averaged over the inner_repetitions, and the best result of the outer_repetitions is reported to std::cerr.
| #define TICTOCLOOP_END | 
Ends the timing loop started with the TICTOCLOOP_BEGIN macro and outputs the result.
| 
© Ullrich Köthe     (ullrich.koethe@iwr.uni-heidelberg.de)  | 
html generated using doxygen and Python
 |