timemory 3.3.0
Modular C++ Toolkit for Performance Analysis and Logging. Profiling API and Tools for C, C++, CUDA, Fortran, and Python. The C++ template API is essentially a framework to creating tools: it is designed to provide a unifying interface for recording various performance measurements alongside data logging and interfaces to other tools.
tim::quirk::explicit_pop Struct Reference

Will suppress the implicit pop() within stop() for the bundlers with this characteristic. Combining this with tim::quirk::explicit_push will effectively allow the measurements within the bundler to only be recorded locally and statistics to not be updated during intermediate measurements. Usage: More...

#include "timemory/mpl/quirks.hpp"

+ Collaboration diagram for tim::quirk::explicit_pop:

Detailed Description

Will suppress the implicit pop() within stop() for the bundlers with this characteristic. Combining this with tim::quirk::explicit_push will effectively allow the measurements within the bundler to only be recorded locally and statistics to not be updated during intermediate measurements. Usage:

  • bundler template parameter
// usage as template parameter
static bundle_t fibonacci_total{ "total" };
long fibonacci(long n)
{
bundle_t tmp{};
tmp.start();
auto result = (n < 2) ? n : (fibonacci(n-1) + fibonacci(n-2));
fibonacci_total += tmp.stop();
return result;
}
long foo(long n)
{
// create new "fibonacci_total" entry in call-graph. Pushing will reset
// any previous measurements
bundle_total.push();
// invoke this function when foo returns
tim::scope::destructor _dtor{ []() { fibonacci_total.pop(); } };
return fibonacci(n);
}
This is a variadic component wrapper where all components are allocated on the stack and cannot be di...
Will suppress the implicit pop() within stop() for the bundlers with this characteristic....
Definition: quirks.hpp:184
Will suppress the implicit push() within start() for the bundlers with this characteristic Usage:
Definition: quirks.hpp:144
provides an object which can be returned from functions that will execute the lambda provided during ...
Definition: types.hpp:700

Definition at line 183 of file quirks.hpp.


The documentation for this struct was generated from the following file: