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::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 storage_type = empty_storage
 
using attributes_t = int
 

Public Member Functions

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

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)
 
template<typename... Args>
static opaque get_opaque (Args &&...)
 
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]

◆ storage_type

Definition at line 66 of file declaration.hpp.

◆ 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 306 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 311 of file timemory.hpp.

312 {
313 return "Generic forwarding of markers to Caliper instrumentation";
314 }

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

void tim::component::empty_base::get ( ) const
inlineinherited

Definition at line 69 of file declaration.hpp.

69{}

◆ 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_opaque()

template<typename... Args>
static opaque tim::component::empty_base::get_opaque ( Args &&  ...)
inlinestaticinherited

Definition at line 72 of file declaration.hpp.

73 {
74 return opaque{};
75 }

◆ 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);
90 }
void consume_parameters(ArgsT &&...)
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 310 of file timemory.hpp.

310{ return "caliper_marker"; }

◆ set_prefix()

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

Definition at line 333 of file timemory.hpp.

333{ m_prefix = _prefix; }
char const std::string & _prefix
Definition: config.cpp:55

References tim::_prefix.

◆ start() [1/2]

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

Definition at line 318 of file timemory.hpp.

319 {
320 if(m_prefix == nullptr)
321 return;
322 DEBUG_PRINT_HERE("'%s'", m_prefix);
323 cali_begin_string(m_id, m_prefix);
324 }
#define DEBUG_PRINT_HERE(...)
Definition: macros.hpp:168

References DEBUG_PRINT_HERE.

◆ start() [2/2]

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

Definition at line 342 of file timemory.hpp.

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

◆ stop() [1/2]

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

Definition at line 325 of file timemory.hpp.

326 {
327 if(m_prefix == nullptr)
328 return;
329 DEBUG_PRINT_HERE("'%s'", m_prefix);
330 cali_safe_end_string(m_id, m_prefix);
331 }

References DEBUG_PRINT_HERE.

◆ stop() [2/2]

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

Definition at line 343 of file timemory.hpp.

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

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