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::ompt_data_tracker< Api > Struct Template Reference

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

+ Collaboration diagram for tim::component::ompt_data_tracker< Api >:

Public Types

using api_type = Api
 
using this_type = ompt_data_tracker< api_type >
 
using value_type = void
 
using base_type = base< this_type, value_type >
 
using storage_type = typename base_type::storage_type
 
using tracker_t = ompt_data_tracker_t
 

Public Member Functions

void start ()
 
void stop ()
 
template<typename... Args>
void store (Args &&...)
 
void store (ompt_id_t target_id, ompt_id_t host_op_id, ompt_target_data_op_t optype, void *host_addr, void *device_addr, size_t bytes)
 
void store (ompt_id_t target_id, unsigned int nitems, void **host_addr, void **device_addr, const size_t *bytes, unsigned int *mapping_flags)
 
void set_prefix (uint64_t _prefix_hash)
 
void set_scope (scope::config _scope)
 
void get () const
 

Static Public Member Functions

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

Detailed Description

template<typename Api>
struct tim::component::ompt_data_tracker< Api >

Definition at line 160 of file components.hpp.

Member Typedef Documentation

◆ api_type

template<typename Api >
using tim::component::ompt_data_tracker< Api >::api_type = Api

Definition at line 162 of file components.hpp.

◆ base_type

Definition at line 165 of file components.hpp.

◆ storage_type

template<typename Api >
using tim::component::ompt_data_tracker< Api >::storage_type = typename base_type::storage_type

Definition at line 166 of file components.hpp.

◆ this_type

Definition at line 163 of file components.hpp.

◆ tracker_t

template<typename Api >
using tim::component::ompt_data_tracker< Api >::tracker_t = ompt_data_tracker_t

Definition at line 168 of file components.hpp.

◆ value_type

template<typename Api >
using tim::component::ompt_data_tracker< Api >::value_type = void

Definition at line 164 of file components.hpp.

Member Function Documentation

◆ description()

template<typename Api >
static std::string tim::component::ompt_data_tracker< Api >::description ( )
inlinestatic

Definition at line 171 of file components.hpp.

172 {
173 return std::string("OpenMP tools data tracker ") + demangle<api_type>();
174 }
tim::mpl::apply< std::string > string
Definition: macros.hpp:53

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

template<typename Api >
static void tim::component::ompt_data_tracker< Api >::global_init ( )
inlinestatic

Definition at line 182 of file components.hpp.

183 {
184 preinit();
185 tracker_t::label() = "ompt_data_tracker";
186 }

References tim::component::ompt_data_tracker< Api >::preinit().

◆ label()

template<typename Api >
static std::string tim::component::ompt_data_tracker< Api >::label ( )
inlinestatic

Definition at line 170 of file components.hpp.

170{ return "ompt_data_tracker"; }

◆ preinit()

template<typename Api >
static void tim::component::ompt_data_tracker< Api >::preinit ( )
inlinestatic

Definition at line 176 of file components.hpp.

177 {
178 static thread_local auto _tracker_storage = storage_initializer::get<tracker_t>();
179 consume_parameters(_tracker_storage);
180 }
void consume_parameters(ArgsT &&...)
Definition: types.hpp:285

References tim::consume_parameters().

Referenced by tim::component::ompt_data_tracker< Api >::global_init().

◆ set_prefix()

template<typename Api >
void tim::component::ompt_data_tracker< Api >::set_prefix ( uint64_t  _prefix_hash)
inline

Definition at line 216 of file components.hpp.

216{ m_prefix_hash = _prefix_hash; }

◆ set_scope()

template<typename Api >
void tim::component::ompt_data_tracker< Api >::set_scope ( scope::config  _scope)
inline

Definition at line 217 of file components.hpp.

217{ m_scope_config = _scope; }

◆ start()

template<typename Api >
void tim::component::ompt_data_tracker< Api >::start ( )
inline

Definition at line 188 of file components.hpp.

188{}

◆ stop()

template<typename Api >
void tim::component::ompt_data_tracker< Api >::stop ( )
inline

Definition at line 189 of file components.hpp.

189{}

◆ store() [1/3]

template<typename Api >
template<typename... Args>
void tim::component::ompt_data_tracker< Api >::store ( Args &&  ...)
inline

Definition at line 192 of file components.hpp.

193 {
194 apply_store<tracker_t>(std::plus<size_t>{}, 1);
195 }

◆ store() [2/3]

template<typename Api >
void tim::component::ompt_data_tracker< Api >::store ( ompt_id_t  target_id,
ompt_id_t  host_op_id,
ompt_target_data_op_t  optype,
void *  host_addr,
void *  device_addr,
size_t  bytes 
)
inline

Definition at line 197 of file components.hpp.

199 {
200 apply_store<tracker_t>(std::plus<size_t>{}, bytes);
201 consume_parameters(target_id, host_op_id, optype, host_addr, device_addr);
202 }

References tim::consume_parameters().

◆ store() [3/3]

template<typename Api >
void tim::component::ompt_data_tracker< Api >::store ( ompt_id_t  target_id,
unsigned int  nitems,
void **  host_addr,
void **  device_addr,
const size_t *  bytes,
unsigned int *  mapping_flags 
)
inline

Definition at line 204 of file components.hpp.

206 {
207 size_t _tot = 0;
208 for(unsigned int i = 0; i < nitems; ++i)
209 _tot += bytes[i];
210 apply_store<tracker_t>(std::plus<size_t>{}, _tot);
211 consume_parameters(target_id, host_addr, device_addr, mapping_flags);
212 // auto _prefix = tim::get_hash_identifier(m_prefix_hash);
213 }

References tim::consume_parameters().


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