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_marker Struct Reference

Standard marker for the Caliper Performance Analysis Toolbox. More...

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

+ Collaboration diagram for tim::component::caliper_marker:

Public Types

using value_type = void
 
using this_type = caliper_marker
 
using base_type = base< this_type, value_type >
 
using value_type = void
 
using this_type = caliper_marker
 
using base_type = base< this_type, value_type >
 
using attributes_t = int
 

Public Member Functions

void start ()
 
void stop ()
 
void set_prefix (const char *_prefix)
 

Static Public Member Functions

static std::string label ()
 
static std::string description ()
 
static std::string label ()
 
static std::string description ()
 
static void start (const std::string &_name)
 
static void stop (const std::string &_name)
 
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 ()
 

Detailed Description

Standard marker for the Caliper Performance Analysis Toolbox.

Definition at line 55 of file components.hpp.

Member Typedef Documentation

◆ attributes_t

Definition at line 77 of file timemory.hpp.

◆ base_type [1/2]

◆ base_type [2/2]

◆ this_type [1/2]

◆ this_type [2/2]

◆ value_type [1/2]

Definition at line 57 of file components.hpp.

◆ value_type [2/2]

Definition at line 300 of file timemory.hpp.

Member Function Documentation

◆ _init()

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

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 tim::component::caliper_common::init().

◆ description() [1/2]

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

Definition at line 62 of file components.hpp.

63  {
64  return "Generic forwarding of markers to Caliper instrumentation";
65  }

◆ description() [2/2]

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

Definition at line 305 of file timemory.hpp.

306  {
307  return "Generic forwarding of markers to Caliper instrumentation";
308  }

◆ enable_process_scope()

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

◆ enable_task_scope()

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

◆ enable_thread_scope()

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

◆ get_attributes()

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

◆ get_channel()

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

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 ( )
inlinestaticinherited

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 tim::component::caliper_common::get_nested().

◆ get_nested()

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

◆ get_process_scope()

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

Definition at line 106 of file timemory.hpp.

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

References tim::component::caliper_common::get_nested().

Referenced by tim::component::caliper_common::enable_process_scope().

◆ get_task_scope()

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

Definition at line 116 of file timemory.hpp.

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

References tim::component::caliper_common::get_nested().

Referenced by tim::component::caliper_common::enable_task_scope().

◆ get_thread_scope()

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

Definition at line 111 of file timemory.hpp.

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

References tim::component::caliper_common::get_nested().

Referenced by tim::component::caliper_common::enable_thread_scope().

◆ init()

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

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 tim::component::caliper_common::_init(), and tim::consume_parameters().

Referenced by tim::component::caliper_common::caliper_common().

◆ label() [1/2]

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

Definition at line 61 of file components.hpp.

61 { return "caliper_marker"; }

◆ label() [2/2]

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

Definition at line 304 of file timemory.hpp.

304 { return "caliper_marker"; }

◆ set_prefix()

void tim::component::caliper_marker::set_prefix ( const char *  _prefix)
inline

Definition at line 323 of file timemory.hpp.

323 { m_prefix = _prefix; }
char const std::string & _prefix
Definition: definition.hpp:59

References tim::_prefix.

◆ start() [1/2]

void tim::component::caliper_marker::start ( )
inline

Definition at line 312 of file timemory.hpp.

313  {
314  DEBUG_PRINT_HERE("%s", m_prefix);
315  cali_begin_string(m_id, m_prefix);
316  }
#define DEBUG_PRINT_HERE(...)
Definition: macros.hpp:163

References DEBUG_PRINT_HERE.

◆ start() [2/2]

static void tim::component::caliper_marker::start ( const std::string &  _name)
inlinestatic

Definition at line 332 of file timemory.hpp.

332 { CALI_MARK_BEGIN(_name.c_str()); }

◆ stop() [1/2]

void tim::component::caliper_marker::stop ( )
inline

Definition at line 317 of file timemory.hpp.

318  {
319  DEBUG_PRINT_HERE("%s", m_prefix);
320  cali_safe_end_string(m_id, m_prefix);
321  }

References DEBUG_PRINT_HERE.

◆ stop() [2/2]

static void tim::component::caliper_marker::stop ( const std::string &  _name)
inlinestatic

Definition at line 333 of file timemory.hpp.

333 { CALI_MARK_END(_name.c_str()); }

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