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

Implements __itt_event More...

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

+ Collaboration diagram for tim::component::vtune_event:

Public Types

using value_type = void
 
using this_type = vtune_event
 
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

bool m_created = false
 
std::string m_prefix
 
int64_t m_index = -1
 
ittnotify::event_t m_event
 

Detailed Description

Implements __itt_event

Definition at line 40 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 42 of file components.hpp.

Member Function Documentation

◆ description()

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

Definition at line 47 of file components.hpp.

48 {
49 return "Creates events for Intel profiler running on the application";
50 }

◆ 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_event::global_finalize ( )
inlinestatic

Definition at line 54 of file components.hpp.

54{ ittnotify::pause(); }

◆ global_init()

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

Definition at line 53 of file components.hpp.

53{ ittnotify::pause(); }

◆ label()

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

Definition at line 46 of file components.hpp.

46{ return "vtune_event"; }

◆ record()

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

Definition at line 51 of file components.hpp.

51{}

◆ set_prefix()

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

Definition at line 78 of file components.hpp.

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

References tim::_prefix, and m_prefix.

◆ start()

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

Definition at line 56 of file components.hpp.

57 {
58 get_index()++;
59
60 if(m_index == 0)
61 ittnotify::resume();
62 if(!m_created)
63 {
64 m_event = ittnotify::create_event(m_prefix);
65 m_created = true;
66 }
67 ittnotify::start_event(m_event);
68 }
ittnotify::event_t m_event
Definition: components.hpp:84

References m_created, m_event, m_index, and m_prefix.

◆ stop()

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

Definition at line 70 of file components.hpp.

71 {
72 auto _index = --get_index();
73 ittnotify::end_event(m_event);
74 if(_index == 0)
75 ittnotify::pause();
76 }

References m_event.

Member Data Documentation

◆ m_created

bool tim::component::vtune_event::m_created = false
protected

Definition at line 81 of file components.hpp.

Referenced by start().

◆ m_event

ittnotify::event_t tim::component::vtune_event::m_event
protected

Definition at line 84 of file components.hpp.

Referenced by start(), and stop().

◆ m_index

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

Definition at line 83 of file components.hpp.

Referenced by start().

◆ m_prefix

std::string tim::component::vtune_event::m_prefix
protected

Definition at line 82 of file components.hpp.

Referenced by set_prefix(), and start().


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