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::mpip_handle< Toolset, Tag > Struct Template Reference

#include "timemory/components/gotcha/mpip.hpp"

+ Collaboration diagram for tim::component::mpip_handle< Toolset, Tag >:

Public Types

using value_type = void
 
using this_type = mpip_handle< Toolset, Tag >
 
using base_type = base< this_type, value_type >
 
using mpi_toolset_t = Toolset
 
using mpip_gotcha_t = tim::component::gotcha< mpip_wrapper_count, mpi_toolset_t, Tag >
 
using mpip_tuple_t = tim::component_tuple< mpip_gotcha_t >
 
using toolset_ptr_t = std::shared_ptr< mpip_tuple_t >
 
using storage_type = empty_storage
 

Public Member Functions

void get ()
 
void start ()
 
void stop ()
 
int get_count ()
 
void get () const
 

Static Public Member Functions

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

Static Public Attributes

static constexpr size_t mpip_wrapper_count = 246
 

Detailed Description

template<typename Toolset, typename Tag>
struct tim::component::mpip_handle< Toolset, Tag >

Definition at line 77 of file mpip.hpp.

Member Typedef Documentation

◆ base_type

Definition at line 83 of file mpip.hpp.

◆ mpi_toolset_t

Definition at line 85 of file mpip.hpp.

◆ mpip_gotcha_t

◆ mpip_tuple_t

◆ storage_type

Definition at line 66 of file declaration.hpp.

◆ this_type

Definition at line 82 of file mpip.hpp.

◆ toolset_ptr_t

template<typename Toolset , typename Tag >
using tim::component::mpip_handle< Toolset, Tag >::toolset_ptr_t = std::shared_ptr<mpip_tuple_t>

Definition at line 88 of file mpip.hpp.

◆ value_type

template<typename Toolset , typename Tag >
using tim::component::mpip_handle< Toolset, Tag >::value_type = void

Definition at line 81 of file mpip.hpp.

Member Function Documentation

◆ description()

template<typename Toolset , typename Tag >
static std::string tim::component::mpip_handle< Toolset, Tag >::description ( )
inlinestatic

Definition at line 91 of file mpip.hpp.

91{ return "Handle for activating MPI wrappers"; }

◆ get() [1/2]

template<typename Toolset , typename Tag >
void tim::component::mpip_handle< Toolset, Tag >::get ( )
inline

Definition at line 93 of file mpip.hpp.

93{}

Referenced by tim::component::mpip_handle< Toolset, Tag >::stop().

◆ get() [2/2]

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

Definition at line 69 of file declaration.hpp.

69{}

◆ get_count()

template<typename Toolset , typename Tag >
int tim::component::mpip_handle< Toolset, Tag >::get_count ( )
inline

Definition at line 115 of file mpip.hpp.

115{ return get_tool_count().load(); }

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

◆ label()

template<typename Toolset , typename Tag >
static std::string tim::component::mpip_handle< Toolset, Tag >::label ( )
inlinestatic

Definition at line 90 of file mpip.hpp.

90{ return "mpip_handle"; }

◆ start()

template<typename Toolset , typename Tag >
void tim::component::mpip_handle< Toolset, Tag >::start ( )
inline

Definition at line 95 of file mpip.hpp.

96 {
97 if(get_tool_count()++ == 0)
98 {
99 get_tool_instance() = std::make_shared<mpip_tuple_t>("timemory_mpip");
100 get_tool_instance()->start();
101 }
102 }

◆ stop()

template<typename Toolset , typename Tag >
void tim::component::mpip_handle< Toolset, Tag >::stop ( )
inline

Definition at line 104 of file mpip.hpp.

105 {
106 auto idx = --get_tool_count();
107 if(get_tool_instance().get())
108 {
109 get_tool_instance()->stop();
110 if(idx == 0)
111 get_tool_instance().reset();
112 }
113 }

References tim::component::mpip_handle< Toolset, Tag >::get().

Member Data Documentation

◆ mpip_wrapper_count

template<typename Toolset , typename Tag >
constexpr size_t tim::component::mpip_handle< Toolset, Tag >::mpip_wrapper_count = 246
staticconstexpr

Definition at line 79 of file mpip.hpp.


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