timemory
3.2.1
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.
|
#include "timemory/components/user_bundle/components.hpp"
Public Types | |
using | tag_type = Tag |
using | mutex_t = std::mutex |
using | lock_t = std::unique_lock< mutex_t > |
using | string_t = std::string |
using | value_type = void |
using | this_type = user_bundle< Idx, Tag > |
using | base_type = base< this_type, value_type > |
using | storage_type = typename base_type::storage_type |
using | start_func_t = std::function< void *(const string_t &, scope::config)> |
using | stop_func_t = std::function< void(void *)> |
using | get_func_t = std::function< void(void *, void *&, size_t)> |
using | delete_func_t = std::function< void(void *)> |
using | opaque_array_t = std::vector< opaque > |
using | typeid_vec_t = std::vector< size_t > |
using | typeid_set_t = std::set< size_t > |
Public Member Functions | |
user_bundle () | |
user_bundle (const user_bundle &rhs) | |
user_bundle (const char *_prefix, scope::config _scope=scope::get_default()) | |
user_bundle (const char *_prefix, opaque_array_t _bundle_vec, typeid_vec_t _typeids, scope::config _scope=scope::get_default()) | |
user_bundle (const char *_prefix, opaque_array_t _bundle_vec, const typeid_set_t &_typeids, scope::config _scope=scope::get_default()) | |
~user_bundle () | |
user_bundle & | operator= (const user_bundle &rhs) |
user_bundle (user_bundle &&rhs) noexcept | |
user_bundle & | operator= (user_bundle &&rhs) noexcept |
void | setup () |
void | push () |
void | sample () |
void | start () |
void | stop () |
void | pop () |
void | clear () |
template<typename T > | |
T * | get () |
void | get (void *&ptr, size_t _hash) const |
void | get () |
void | set_prefix (const char *_prefix) |
void | set_scope (const scope::config &val) |
size_t | size () const |
void | insert (opaque &&obj, typeid_set_t &&_typeids) |
template<typename Type , typename... Types, typename... Args> | |
void | insert (Args... args) |
Static Public Member Functions | |
static string_t | label () |
static string_t | description () |
static value_type | record () |
static void | global_init () |
static void | global_init (storage_type *) |
static size_t | bundle_size () |
static void | configure (opaque &&obj, std::set< size_t > &&_typeids) |
template<typename Type , typename... Types, typename... Args> | |
static void | configure (Args &&... args) |
static void | reset () |
static opaque_array_t & | get_data () |
static typeid_vec_t & | get_typeids () |
static mutex_t & | get_lock () |
Static Public Attributes | |
static constexpr auto | index = Idx |
Static Protected Member Functions | |
static bool | contains (size_t _val, const typeid_vec_t &_targ) |
Protected Attributes | |
bool | m_setup = false |
scope::config | m_scope = {} |
const char * | m_prefix = nullptr |
typeid_vec_t | m_typeids = get_typeids() |
opaque_array_t | m_bundle = get_data() |
Friends | |
struct | operation::record< this_type > |
struct | operation::start< this_type > |
struct | operation::stop< this_type > |
struct | operation::set_started< this_type > |
struct | operation::set_stopped< this_type > |
Definition at line 121 of file components.hpp.
using tim::component::user_bundle< Idx, Tag >::base_type = base<this_type, value_type> |
Definition at line 134 of file components.hpp.
using tim::component::user_bundle< Idx, Tag >::delete_func_t = std::function<void(void*)> |
Definition at line 146 of file components.hpp.
using tim::component::user_bundle< Idx, Tag >::get_func_t = std::function<void(void*, void*&, size_t)> |
Definition at line 145 of file components.hpp.
using tim::component::user_bundle< Idx, Tag >::lock_t = std::unique_lock<mutex_t> |
Definition at line 129 of file components.hpp.
using tim::component::user_bundle< Idx, Tag >::mutex_t = std::mutex |
Definition at line 128 of file components.hpp.
using tim::component::user_bundle< Idx, Tag >::opaque_array_t = std::vector<opaque> |
Definition at line 159 of file components.hpp.
using tim::component::user_bundle< Idx, Tag >::start_func_t = std::function<void*(const string_t&, scope::config)> |
Definition at line 143 of file components.hpp.
using tim::component::user_bundle< Idx, Tag >::stop_func_t = std::function<void(void*)> |
Definition at line 144 of file components.hpp.
using tim::component::user_bundle< Idx, Tag >::storage_type = typename base_type::storage_type |
Definition at line 135 of file components.hpp.
using tim::component::user_bundle< Idx, Tag >::string_t = std::string |
Definition at line 130 of file components.hpp.
using tim::component::user_bundle< Idx, Tag >::tag_type = Tag |
Definition at line 127 of file components.hpp.
using tim::component::user_bundle< Idx, Tag >::this_type = user_bundle<Idx, Tag> |
Definition at line 133 of file components.hpp.
using tim::component::user_bundle< Idx, Tag >::typeid_set_t = std::set<size_t> |
Definition at line 161 of file components.hpp.
using tim::component::user_bundle< Idx, Tag >::typeid_vec_t = std::vector<size_t> |
Definition at line 160 of file components.hpp.
using tim::component::user_bundle< Idx, Tag >::value_type = void |
Definition at line 132 of file components.hpp.
|
inline |
Definition at line 170 of file components.hpp.
|
inline |
Definition at line 176 of file components.hpp.
References tim::component::user_bundle< Idx, Tag >::m_bundle.
|
inlineexplicit |
Definition at line 187 of file components.hpp.
|
inline |
|
inline |
|
inline |
Definition at line 213 of file components.hpp.
References tim::component::user_bundle< Idx, Tag >::m_bundle.
|
inlinenoexcept |
|
inlinestatic |
Definition at line 163 of file components.hpp.
References tim::component::user_bundle< Idx, Tag >::get_data().
|
inline |
Definition at line 358 of file components.hpp.
References tim::component::base< Tp, Value >::get_is_running(), tim::component::user_bundle< Idx, Tag >::m_bundle, tim::component::user_bundle< Idx, Tag >::m_setup, tim::component::user_bundle< Idx, Tag >::m_typeids, and tim::component::user_bundle< Idx, Tag >::stop().
|
inlinestatic |
Definition at line 289 of file components.hpp.
References tim::component::user_bundle< Idx, Tag >::configure(), and TIMEMORY_FOLD_EXPRESSION.
|
inlinestatic |
Definition at line 261 of file components.hpp.
References tim::component::user_bundle< Idx, Tag >::contains(), tim::debug, tim::component::user_bundle< Idx, Tag >::get_data(), tim::component::user_bundle< Idx, Tag >::get_lock(), tim::component::user_bundle< Idx, Tag >::get_typeids(), PRINT_HERE, and tim::verbose.
Referenced by tim::component::user_bundle< Idx, Tag >::configure().
|
inlinestaticprotected |
Definition at line 454 of file components.hpp.
Referenced by tim::component::user_bundle< Idx, Tag >::configure(), and tim::component::user_bundle< Idx, Tag >::insert().
|
inlinestatic |
Definition at line 149 of file components.hpp.
|
inline |
Definition at line 368 of file components.hpp.
References tim::component::user_bundle< Idx, Tag >::m_bundle.
|
inline |
Definition at line 394 of file components.hpp.
|
inline |
Definition at line 381 of file components.hpp.
References tim::component::user_bundle< Idx, Tag >::m_bundle.
|
inlinestatic |
Definition at line 477 of file components.hpp.
Referenced by tim::component::user_bundle< Idx, Tag >::bundle_size(), tim::component::user_bundle< Idx, Tag >::configure(), and tim::component::user_bundle< Idx, Tag >::reset().
|
inlinestatic |
Definition at line 487 of file components.hpp.
Referenced by tim::component::user_bundle< Idx, Tag >::configure(), and tim::component::user_bundle< Idx, Tag >::reset().
|
inlinestatic |
Definition at line 482 of file components.hpp.
Referenced by tim::component::user_bundle< Idx, Tag >::configure(), and tim::component::user_bundle< Idx, Tag >::reset().
|
static |
|
inlinestatic |
Definition at line 157 of file components.hpp.
References tim::component::user_bundle< Idx, Tag >::global_init().
Referenced by tim::component::user_bundle< Idx, Tag >::global_init().
|
inline |
Definition at line 439 of file components.hpp.
References tim::component::user_bundle< Idx, Tag >::insert(), and TIMEMORY_FOLD_EXPRESSION.
|
inline |
Definition at line 412 of file components.hpp.
References tim::component::user_bundle< Idx, Tag >::contains(), tim::debug, tim::component::user_bundle< Idx, Tag >::m_bundle, tim::component::user_bundle< Idx, Tag >::m_typeids, PRINT_HERE, and tim::verbose.
Referenced by tim::component::user_bundle< Idx, Tag >::insert().
|
inlinestatic |
Definition at line 148 of file components.hpp.
|
inline |
|
inlinenoexcept |
|
inline |
Definition at line 352 of file components.hpp.
References tim::component::user_bundle< Idx, Tag >::m_bundle.
|
inline |
|
inlinestatic |
Definition at line 154 of file components.hpp.
|
inlinestatic |
Definition at line 302 of file components.hpp.
References tim::debug, tim::component::user_bundle< Idx, Tag >::get_data(), tim::component::user_bundle< Idx, Tag >::get_lock(), tim::component::user_bundle< Idx, Tag >::get_typeids(), PRINT_HERE, and tim::verbose.
|
inline |
Definition at line 332 of file components.hpp.
References tim::component::user_bundle< Idx, Tag >::m_bundle, and tim::component::user_bundle< Idx, Tag >::setup().
|
inline |
Definition at line 396 of file components.hpp.
References tim::_prefix, tim::component::user_bundle< Idx, Tag >::m_prefix, and tim::component::user_bundle< Idx, Tag >::m_setup.
|
inline |
Definition at line 402 of file components.hpp.
References tim::component::user_bundle< Idx, Tag >::m_scope, and tim::component::user_bundle< Idx, Tag >::m_setup.
|
inline |
Definition at line 315 of file components.hpp.
References tim::component::user_bundle< Idx, Tag >::m_bundle, tim::component::user_bundle< Idx, Tag >::m_prefix, tim::component::user_bundle< Idx, Tag >::m_scope, and tim::component::user_bundle< Idx, Tag >::m_setup.
Referenced by tim::component::user_bundle< Idx, Tag >::push(), tim::component::user_bundle< Idx, Tag >::sample(), and tim::component::user_bundle< Idx, Tag >::start().
|
inline |
Definition at line 408 of file components.hpp.
References tim::component::user_bundle< Idx, Tag >::m_bundle.
|
inline |
Definition at line 339 of file components.hpp.
References tim::component::user_bundle< Idx, Tag >::m_bundle, and tim::component::user_bundle< Idx, Tag >::setup().
|
inline |
Definition at line 346 of file components.hpp.
References tim::component::user_bundle< Idx, Tag >::m_bundle.
Referenced by tim::component::user_bundle< Idx, Tag >::clear().
|
friend |
Definition at line 126 of file components.hpp.
|
friend |
Definition at line 126 of file components.hpp.
|
friend |
Definition at line 126 of file components.hpp.
|
friend |
Definition at line 126 of file components.hpp.
|
friend |
Definition at line 126 of file components.hpp.
|
staticconstexpr |
Definition at line 126 of file components.hpp.
|
protected |
Definition at line 451 of file components.hpp.
Referenced by tim::component::user_bundle< Idx, Tag >::user_bundle(), tim::component::user_bundle< Idx, Tag >::~user_bundle(), tim::component::user_bundle< Idx, Tag >::clear(), tim::component::user_bundle< Idx, Tag >::get(), tim::component::user_bundle< Idx, Tag >::insert(), tim::component::user_bundle< Idx, Tag >::operator=(), tim::component::user_bundle< Idx, Tag >::pop(), tim::component::user_bundle< Idx, Tag >::push(), tim::component::user_bundle< Idx, Tag >::sample(), tim::component::user_bundle< Idx, Tag >::setup(), tim::component::user_bundle< Idx, Tag >::size(), tim::component::user_bundle< Idx, Tag >::start(), and tim::component::user_bundle< Idx, Tag >::stop().
|
protected |
Definition at line 449 of file components.hpp.
Referenced by tim::component::user_bundle< Idx, Tag >::operator=(), tim::component::user_bundle< Idx, Tag >::push(), tim::component::user_bundle< Idx, Tag >::set_prefix(), and tim::component::user_bundle< Idx, Tag >::setup().
|
protected |
Definition at line 448 of file components.hpp.
Referenced by tim::component::user_bundle< Idx, Tag >::operator=(), tim::component::user_bundle< Idx, Tag >::push(), tim::component::user_bundle< Idx, Tag >::set_scope(), and tim::component::user_bundle< Idx, Tag >::setup().
|
protected |
Definition at line 447 of file components.hpp.
Referenced by tim::component::user_bundle< Idx, Tag >::clear(), tim::component::user_bundle< Idx, Tag >::set_prefix(), tim::component::user_bundle< Idx, Tag >::set_scope(), and tim::component::user_bundle< Idx, Tag >::setup().
|
protected |
Definition at line 450 of file components.hpp.
Referenced by tim::component::user_bundle< Idx, Tag >::clear(), tim::component::user_bundle< Idx, Tag >::insert(), and tim::component::user_bundle< Idx, Tag >::operator=().