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::vtune_frame Struct Reference

Implements __itt_domain More...

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

+ Collaboration diagram for tim::component::vtune_frame:

Public Types

using value_type = void
 
using this_type = vtune_frame
 
using base_type = base< this_type, value_type >
 
using storage_type = empty_storage
 

Public Member Functions

void start ()
 
void stop ()
 
void set_prefix (const std::string &_prefix)
 
void get () const
 

Static Public Member Functions

static std::string label ()
 
static std::string description ()
 
static value_type record ()
 
static void global_init ()
 
static void global_finalize ()
 
template<typename... Args>
static opaque get_opaque (Args &&...)
 

Protected Attributes

std::string m_prefix
 
int64_t m_index = -1
 
ittnotify::domain_t * m_domain = nullptr
 

Detailed Description

Implements __itt_domain

Definition at line 99 of file components.hpp.

Member Typedef Documentation

◆ base_type

◆ storage_type

Definition at line 66 of file declaration.hpp.

◆ this_type

◆ value_type

Definition at line 101 of file components.hpp.

Member Function Documentation

◆ description()

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

Definition at line 106 of file components.hpp.

107 {
108 return "Creates frames for Intel profiler running on the application";
109 }

◆ get()

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

Definition at line 69 of file declaration.hpp.

69{}

◆ 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 }

◆ global_finalize()

static void tim::component::vtune_frame::global_finalize ( )
inlinestatic

Definition at line 113 of file components.hpp.

113{ ittnotify::pause(); }

◆ global_init()

static void tim::component::vtune_frame::global_init ( )
inlinestatic

Definition at line 112 of file components.hpp.

112{ ittnotify::pause(); }

◆ label()

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

Definition at line 105 of file components.hpp.

105{ return "vtune_frame"; }

◆ record()

static value_type tim::component::vtune_frame::record ( )
inlinestatic

Definition at line 110 of file components.hpp.

110{}

◆ set_prefix()

void tim::component::vtune_frame::set_prefix ( const std::string &  _prefix)
inline

Definition at line 135 of file components.hpp.

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

References tim::_prefix, and m_prefix.

◆ start()

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

Definition at line 115 of file components.hpp.

116 {
117 get_index()++;
118
119 if(m_index == 0)
120 ittnotify::resume();
121 if(m_domain == nullptr)
122 m_domain = ittnotify::create_domain(m_prefix);
123 ittnotify::start_frame(m_domain);
124 }
ittnotify::domain_t * m_domain
Definition: components.hpp:140

References m_domain, m_index, and m_prefix.

◆ stop()

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

Definition at line 126 of file components.hpp.

127 {
128 auto _index = --get_index();
129 if(m_domain)
130 ittnotify::end_frame(m_domain);
131 if(_index == 0)
132 ittnotify::pause();
133 }

References m_domain.

Member Data Documentation

◆ m_domain

ittnotify::domain_t* tim::component::vtune_frame::m_domain = nullptr
protected

Definition at line 140 of file components.hpp.

Referenced by start(), and stop().

◆ m_index

int64_t tim::component::vtune_frame::m_index = -1
protected

Definition at line 139 of file components.hpp.

Referenced by start().

◆ m_prefix

std::string tim::component::vtune_frame::m_prefix
protected

Definition at line 138 of file components.hpp.

Referenced by set_prefix(), and start().


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