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::component::base_state Struct Reference

Provide state configuration options for a component instance. The current states are: More...

#include "timemory/components/base/data.hpp"

+ Collaboration diagram for tim::component::base_state:

Public Member Functions

bool get_is_running () const
 
bool get_is_on_stack () const
 
bool get_is_transient () const
 
bool get_is_flat () const
 
bool get_depth_change () const
 
bool get_is_invalid () const
 
void set_is_running (bool v)
 
void set_is_on_stack (bool v)
 
void set_is_transient (bool v)
 
void set_is_flat (bool v)
 
void set_depth_change (bool v)
 
void set_is_invalid (bool v)
 

Protected Types

enum  State {
  RunningIdx = 0 ,
  OnStackIdx = 1 ,
  TransientIdx = 2 ,
  FlatIdx = 3 ,
  DepthIdx = 4 ,
  InvalidIdx = 5
}
 
using base_type = utility::bit_flags< 6 >
 

Detailed Description

Provide state configuration options for a component instance. The current states are:

  1. get_is_running() : returns true if a component has started collection.
  2. get_is_on_stack() : returns true if a component has bookmarked a storage location.
  3. get_is_transient() : returns true if the value returned from get() (or similar) represents a phase measurement.
  4. get_is_flat() : returns true if the component bookmarked storage at a call-stack depth of zero explicitly.
  5. get_depth_change() : used internally by components to determine if a push operation incremented/decremented the call-stack depth.
  6. get_is_invalid() : used to indicate that the metric does not have a valid state. If set to false before a push operation, this will suppress insertion into storage.

Definition at line 445 of file data.hpp.

Member Typedef Documentation

◆ base_type

Definition at line 448 of file data.hpp.

Member Enumeration Documentation

◆ State

Enumerator
RunningIdx 
OnStackIdx 
TransientIdx 
FlatIdx 
DepthIdx 
InvalidIdx 

Definition at line 470 of file data.hpp.

Member Function Documentation

◆ get_depth_change()

bool tim::component::base_state::get_depth_change ( ) const
inline

Definition at line 459 of file data.hpp.

459{ return test<DepthIdx>(); }

◆ get_is_flat()

bool tim::component::base_state::get_is_flat ( ) const
inline

Definition at line 458 of file data.hpp.

458{ return test<FlatIdx>(); }

◆ get_is_invalid()

bool tim::component::base_state::get_is_invalid ( ) const
inline

Definition at line 460 of file data.hpp.

460{ return test<InvalidIdx>(); }

◆ get_is_on_stack()

bool tim::component::base_state::get_is_on_stack ( ) const
inline

Definition at line 456 of file data.hpp.

456{ return test<OnStackIdx>(); }

◆ get_is_running()

bool tim::component::base_state::get_is_running ( ) const
inline

Definition at line 455 of file data.hpp.

455{ return test<RunningIdx>(); }

◆ get_is_transient()

bool tim::component::base_state::get_is_transient ( ) const
inline

Definition at line 457 of file data.hpp.

457{ return test<TransientIdx>(); }

◆ set_depth_change()

void tim::component::base_state::set_depth_change ( bool  v)
inline

Definition at line 466 of file data.hpp.

466{ set<DepthIdx>(v); }

◆ set_is_flat()

void tim::component::base_state::set_is_flat ( bool  v)
inline

Definition at line 465 of file data.hpp.

465{ set<FlatIdx>(v); }

◆ set_is_invalid()

void tim::component::base_state::set_is_invalid ( bool  v)
inline

Definition at line 467 of file data.hpp.

467{ set<InvalidIdx>(v); }

◆ set_is_on_stack()

void tim::component::base_state::set_is_on_stack ( bool  v)
inline

Definition at line 463 of file data.hpp.

463{ set<OnStackIdx>(v); }

◆ set_is_running()

void tim::component::base_state::set_is_running ( bool  v)
inline

Definition at line 462 of file data.hpp.

462{ set<RunningIdx>(v); }

◆ set_is_transient()

void tim::component::base_state::set_is_transient ( bool  v)
inline

Definition at line 464 of file data.hpp.

464{ set<TransientIdx>(v); }

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