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

#include "timemory/components/caliper/timemory.hpp"

+ Collaboration diagram for tim::component::caliper_common:

Public Types

using attributes_t = int
 

Public Member Functions

 caliper_common ()
 

Static Public Member Functions

static void _init ()
 
static void init ()
 
static std::string & get_channel ()
 
static attributes_tget_attributes ()
 
static attributes_t get_default_attributes ()
 
static attributes_t get_nested ()
 
static auto get_process_scope ()
 
static auto get_thread_scope ()
 
static auto get_task_scope ()
 
static void enable_process_scope ()
 
static void enable_thread_scope ()
 
static void enable_task_scope ()
 
static std::string label ()
 
static std::string description ()
 

Detailed Description

Definition at line 75 of file timemory.hpp.

Member Typedef Documentation

◆ attributes_t

Definition at line 77 of file timemory.hpp.

Constructor & Destructor Documentation

◆ caliper_common()

tim::component::caliper_common::caliper_common ( )
inline

Definition at line 132 of file timemory.hpp.

132 { init(); }

References init().

Member Function Documentation

◆ _init()

static void tim::component::caliper_common::_init ( )
inlinestatic

Definition at line 79 of file timemory.hpp.

80  {
82  puts("Initializing caliper...");
83  cali_init();
84  }

References tim::debug, and tim::verbose.

Referenced by init().

◆ description()

static std::string tim::component::caliper_common::description ( )
inlinestatic

Definition at line 126 of file timemory.hpp.

127  {
128  return "Forwards markers to Caliper instrumentation";
129  }

◆ enable_process_scope()

static void tim::component::caliper_common::enable_process_scope ( )
inlinestatic

Definition at line 121 of file timemory.hpp.

static attributes_t & get_attributes()
Definition: timemory.hpp:94

References get_attributes(), and get_process_scope().

◆ enable_task_scope()

static void tim::component::caliper_common::enable_task_scope ( )
inlinestatic

Definition at line 123 of file timemory.hpp.

References get_attributes(), and get_task_scope().

◆ enable_thread_scope()

static void tim::component::caliper_common::enable_thread_scope ( )
inlinestatic

Definition at line 122 of file timemory.hpp.

References get_attributes(), and get_thread_scope().

◆ get_attributes()

static attributes_t& tim::component::caliper_common::get_attributes ( )
inlinestatic

Definition at line 94 of file timemory.hpp.

94 { return get_persistent_data().attributes; }

Referenced by enable_process_scope(), enable_task_scope(), and enable_thread_scope().

◆ get_channel()

static std::string& tim::component::caliper_common::get_channel ( )
inlinestatic

Definition at line 92 of file timemory.hpp.

92 { return get_persistent_data().channel; }

◆ get_default_attributes()

static attributes_t tim::component::caliper_common::get_default_attributes ( )
inlinestatic

Definition at line 96 of file timemory.hpp.

97  {
98  return (get_nested() | CALI_ATTR_SCOPE_THREAD);
99  }
static attributes_t get_nested()
Definition: timemory.hpp:101

References get_nested().

◆ get_nested()

static attributes_t tim::component::caliper_common::get_nested ( )
inlinestatic

Definition at line 101 of file timemory.hpp.

102  {
103  return (tim::settings::flat_profile()) ? 0 : CALI_ATTR_NESTED;
104  }
flat_profile
Definition: settings.cpp:1491

References tim::flat_profile.

Referenced by get_default_attributes(), get_process_scope(), get_task_scope(), and get_thread_scope().

◆ get_process_scope()

static auto tim::component::caliper_common::get_process_scope ( )
inlinestatic

Definition at line 106 of file timemory.hpp.

107  {
108  return attributes_t(get_nested() | CALI_ATTR_SCOPE_PROCESS);
109  }

References get_nested().

Referenced by enable_process_scope().

◆ get_task_scope()

static auto tim::component::caliper_common::get_task_scope ( )
inlinestatic

Definition at line 116 of file timemory.hpp.

117  {
118  return attributes_t(get_nested() | CALI_ATTR_SCOPE_TASK);
119  }

References get_nested().

Referenced by enable_task_scope().

◆ get_thread_scope()

static auto tim::component::caliper_common::get_thread_scope ( )
inlinestatic

Definition at line 111 of file timemory.hpp.

112  {
113  return attributes_t(get_nested() | CALI_ATTR_SCOPE_THREAD);
114  }

References get_nested().

Referenced by enable_thread_scope().

◆ init()

static void tim::component::caliper_common::init ( )
inlinestatic

Definition at line 86 of file timemory.hpp.

87  {
88  static bool _ini = (_init(), true);
89  consume_parameters(_ini);
90  }
void consume_parameters(ArgsT &&...) TIMEMORY_HIDDEN
Definition: types.hpp:285

References _init(), and tim::consume_parameters().

Referenced by caliper_common().

◆ label()

static std::string tim::component::caliper_common::label ( )
inlinestatic

Definition at line 125 of file timemory.hpp.

125 { return "caliper"; }

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