timemory  3.2.1
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::scope Namespace Reference

Classes

struct  transient_destructor
 
struct  tree
 Dummy struct to designates tree (hierarchical) storage. This scope (default) maintains nesting in the call-graph storage. In this scoping mode, the results will be separated from each other based on the identifier AND the current number of component instances in a "start" region. E.g. for two components with the same identifiers where the first calls start, then the second calls start then the second will be at a depth of +1 relative to the first (i.e. a child of the first). More...
 
struct  flat
 Dummy struct to designates flat (no hierarchy) storage. When flat scoping is globally enabled, all entries to the call-graph storage at entered at a depth of zero. Thus, if you want a report of all the function calls and their total values for each identifier, flat scoping should be globally enabled. This can be combined with timeline scoping to produce results where every measurement is its own call-graph entry at a depth of zero (produces a large amount of data). Flat-scoping can be enabled at the component bundler level also, there are two ways to do this: (1) to enable flat-scoping for all instances of the bundle, add tim::quirk::flat_scope to the template parameters of the bundler; (2) to enable flat-scoping for specific bundler instances, pass. More...
 
struct  timeline
 Dummy struct to designates timeline (hierarchical, non-duplicated) storage. It is meaningless by itself and should be combined with tim::scope::tree or tim::scope::flat. A tree timeline has all the hierarchy properties of the tree scope but entries at the same depth with the same identifiers are separated entries in the resuls. Timeline-scoping can be enabled at the component bundler level also, there are two ways to do this: (1) to enable timeline-scoping for all instances of the bundle, add tim::quirk::timeline_scope to the template parameters of the bundler; (2) to enable timeline-scoping for specific bundler instances, pass. More...
 
struct  config
 this data type encodes the options of storage scope. The default is hierarchical (tree) scope. Specification of flat scope overrides the hierarchy scope, e.g. you cannot have a hierarchical flat scope. The timeline scope is meaningless should a specification of tree or flat, thus the valid combinations are: tree, flat, tree + timeline, flat + timeline. More...
 
struct  destructor
 provides an object which can be returned from functions that will execute the lambda provided during construction when it is destroyed More...
 

Typedefs

using data_type = std::bitset< scope_count >
 
using input_type = std::array< bool, scope_count >
 

Functions

input_typeget_fields ()
 
config operator+ (config _lhs, tree)
 
config operator+ (config _lhs, flat)
 
config operator+ (config _lhs, timeline)
 
config operator+ (config _lhs, config _rhs)
 

Typedef Documentation

◆ data_type

using tim::scope::data_type = typedef std::bitset<scope_count>

Definition at line 395 of file types.hpp.

◆ input_type

using tim::scope::input_type = typedef std::array<bool, scope_count>

Definition at line 396 of file types.hpp.

Function Documentation

◆ get_fields()

input_type& tim::scope::get_fields ( )
inline

Definition at line 401 of file types.hpp.

402 {
403  static input_type _instance{ { false, false, false } };
404  return _instance;
405 }
std::array< bool, scope_count > input_type
Definition: types.hpp:396

◆ operator+() [1/4]

auto tim::scope::operator+ ( config  _lhs,
config  _rhs 
)

Definition at line 688 of file types.hpp.

689 {
690  return config{ either(_lhs, _rhs, make_index_sequence<scope_count>{}) };
691 }

◆ operator+() [2/4]

auto tim::scope::operator+ ( config  _lhs,
flat   
)

Definition at line 670 of file types.hpp.

671 {
672  _lhs.set(flat::value, true);
673  return _lhs;
674 }

References tim::scope::config::set().

◆ operator+() [3/4]

auto tim::scope::operator+ ( config  _lhs,
timeline   
)

Definition at line 679 of file types.hpp.

680 {
681  _lhs.set(timeline::value, true);
682  return _lhs;
683 }

References tim::scope::config::set().

◆ operator+() [4/4]

auto tim::scope::operator+ ( config  _lhs,
tree   
)

Definition at line 661 of file types.hpp.

662 {
663  _lhs.set(tree::value, true);
664  return _lhs;
665 }

References tim::scope::config::set().