|
CORSIKA
@c8_version@
The framework to simulate particle cascades for astroparticle physics
|
Wraps and measures the runtime of a single function type object. More...
#include <FunctionTimer.hpp>

Public Member Functions | |
| FunctionTimer (TFunc f) | |
| Constructs the wrapper with the given functionpointer. More... | |
| template<typename... TArgs> | |
| auto | operator() (TArgs &&... args) -> std::invoke_result_t< TFunc, TArgs... > |
| Functor for calling the wrapped function This functor calls the wrapped function and measures the elapsed time between call and return. More... | |
Wraps and measures the runtime of a single function type object.
| TFunc | funtion pointer that should be wrapped |
| TClock | type of the clock that should be used for measurements, default is high_resolution_clock |
| TDuration | type of std::duration to measure the elapsed time, default is microseconds |
Definition at line 29 of file FunctionTimer.hpp.
| corsika::FunctionTimer< TFunc, TTimer >::FunctionTimer | ( | TFunc | f | ) |
Constructs the wrapper with the given functionpointer.
| f | Function or functor whose runtime should be measured |
| auto corsika::FunctionTimer< TFunc, TTimer >::operator() | ( | TArgs &&... | args | ) | -> std::invoke_result_t< TFunc, TArgs... > |
Functor for calling the wrapped function This functor calls the wrapped function and measures the elapsed time between call and return.
The return value needs to be copy constructible.
| TArgs | Parameter types that are forwarded to the function. The use of correct types is the responsibility of the user, no checks are done. |
| args | Arguments are forwarded to the wrapped function. This method does not support overloaded function resolution. |