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.
|
#include "timemory/components/base/declaration.hpp"
Public Types | |
using | EmptyT = std::tuple<> |
template<typename U > | |
using | vector_t = std::vector< U > |
using | Type = Tp |
using | value_type = Value |
using | data_type = base_data_t< Tp, Value > |
using | accum_type = typename data_type::accum_type |
using | last_type = typename data_type::last_type |
using | dynamic_type = typename trait::dynamic_base< Tp >::type |
using | cache_type = typename trait::cache< Tp >::type |
using | this_type = Tp |
using | base_type = base< Tp, Value > |
using | base_storage_type = tim::base::storage |
using | storage_type = storage< Tp, Value > |
using | graph_iterator = graph_iterator_t< Tp > |
using | state_t = state< this_type > |
using | statistics_policy = policy::record_statistics< Tp, Value > |
using | fmtflags = std::ios_base::fmtflags |
Public Member Functions | |
~base ()=default | |
void | set_started () |
store that start has been called More... | |
void | set_stopped () |
store that stop has been called More... | |
void | reset () |
reset the values More... | |
void | get (void *&ptr, size_t _typeid_hash) const |
assign type to a pointer More... | |
auto | get () const |
retrieve the current measurement value in the units for the type More... | |
auto | get_display () const |
retrieve the current measurement value in the units for the type in a format that can be piped to the output stream operator ('<<') More... | |
Type & | operator+= (const Type &rhs) |
Type & | operator-= (const Type &rhs) |
Type & | operator*= (const Type &rhs) |
Type & | operator/= (const Type &rhs) |
Type & | operator+= (const Value &rhs) |
Type & | operator-= (const Value &rhs) |
Type & | operator*= (const Value &rhs) |
Type & | operator/= (const Value &rhs) |
template<typename Up = Tp> | |
void | print (std::ostream &, enable_if_t< trait::uses_value_storage< Up, Value >::value, int >=0) const |
template<typename Up = Tp> | |
void | print (std::ostream &, enable_if_t<!trait::uses_value_storage< Up, Value >::value, long >=0) const |
template<typename Archive , typename Up = Type, enable_if_t<!trait::custom_serialization< Up >::value, int > = 0> | |
void | load (Archive &ar, unsigned int) |
serialization load (input) More... | |
template<typename Archive , typename Up = Type, enable_if_t<!trait::custom_serialization< Up >::value, int > = 0> | |
void | save (Archive &ar, unsigned int version) const |
serialization store (output) More... | |
int64_t | get_laps () const |
add a sample More... | |
auto | get_iterator () const |
void | set_laps (int64_t v) |
void | set_iterator (graph_iterator itr) |
decltype(auto) | load () |
decltype(auto) | load () const |
auto | plus (crtp::base, const base_type &rhs) |
auto | minus (crtp::base, const base_type &rhs) |
bool | get_depth_change () const |
bool | get_is_flat () const |
bool | get_is_invalid () const |
bool | get_is_on_stack () const |
bool | get_is_running () const |
bool | get_is_transient () const |
void | set_depth_change (bool v) |
void | set_is_flat (bool v) |
void | set_is_invalid (bool v) |
void | set_is_on_stack (bool v) |
void | set_is_running (bool v) |
void | set_is_transient (bool v) |
Static Public Member Functions | |
template<typename... Args> | |
static void | configure (Args &&...) |
static opaque | get_opaque (scope::config) |
get the opaque binding for user-bundle More... | |
template<typename Vp , typename Up = Tp, enable_if_t< trait::sampler< Up >::value, int > = 0> | |
static void | add_sample (Vp &&) |
static base_storage_type * | get_storage () |
template<typename Up = Type, typename UnitT = typename trait::units<Up>::type, enable_if_t< std::is_same< UnitT, int64_t >::value, int > = 0> | |
static int64_t | unit () |
template<typename Up = Type, typename UnitT = typename trait::units<Up>::display_type, enable_if_t< std::is_same< UnitT, std::string >::value, int > = 0> | |
static std::string | display_unit () |
template<typename Up = Type, typename UnitT = typename trait::units<Up>::type, enable_if_t< std::is_same< UnitT, int64_t >::value, int > = 0> | |
static int64_t | get_unit () |
template<typename Up = Type, typename UnitT = typename trait::units<Up>::display_type, enable_if_t< std::is_same< UnitT, std::string >::value, int > = 0> | |
static std::string | get_display_unit () |
static short | get_width () |
static short | get_precision () |
static fmtflags | get_format_flags () |
static std::string | label () |
static std::string | description () |
static std::string | get_label () |
static std::string | get_description () |
template<typename... Args> | |
static opaque | get_opaque (Args &&...) |
Static Public Attributes | |
static constexpr bool | is_component = true |
static constexpr bool | timing_category_v = trait::is_timing_category<Type>::value |
static constexpr bool | memory_category_v = trait::is_memory_category<Type>::value |
static constexpr bool | timing_units_v = trait::uses_timing_units<Type>::value |
static constexpr bool | memory_units_v = trait::uses_memory_units<Type>::value |
static constexpr bool | percent_units_v = trait::uses_percent_units<Type>::value |
static constexpr auto | ios_fixed = std::ios_base::fixed |
static constexpr auto | ios_decimal = std::ios_base::dec |
static constexpr auto | ios_showpoint = std::ios_base::showpoint |
static const fmtflags | format_flags = ios_fixed | ios_decimal | ios_showpoint |
Protected Member Functions | |
Type & | plus_oper (const Type &rhs) |
Type & | minus_oper (const Type &rhs) |
Type & | multiply_oper (const Type &rhs) |
Type & | divide_oper (const Type &rhs) |
Type & | plus_oper (const Value &rhs) |
Type & | minus_oper (const Value &rhs) |
Type & | multiply_oper (const Value &rhs) |
Type & | divide_oper (const Value &rhs) |
void | plus (const base_type &rhs) |
void | minus (const base_type &rhs) |
Protected Attributes | |
int64_t | laps = 0 |
graph_iterator | graph_itr = graph_iterator{ nullptr } |
Definition at line 93 of file declaration.hpp.
using tim::component::base< Tp, Value >::accum_type = typename data_type::accum_type |
Definition at line 108 of file declaration.hpp.
using tim::component::base< Tp, Value >::base_storage_type = tim::base::storage |
Definition at line 115 of file declaration.hpp.
using tim::component::base< Tp, Value >::base_type = base<Tp, Value> |
Definition at line 114 of file declaration.hpp.
using tim::component::base< Tp, Value >::cache_type = typename trait::cache<Tp>::type |
Definition at line 111 of file declaration.hpp.
using tim::component::base< Tp, Value >::data_type = base_data_t<Tp, Value> |
Definition at line 107 of file declaration.hpp.
using tim::component::base< Tp, Value >::dynamic_type = typename trait::dynamic_base<Tp>::type |
Definition at line 110 of file declaration.hpp.
using tim::component::base< Tp, Value >::EmptyT = std::tuple<> |
Definition at line 99 of file declaration.hpp.
using tim::component::base< Tp, Value >::fmtflags = std::ios_base::fmtflags |
Definition at line 120 of file declaration.hpp.
using tim::component::base< Tp, Value >::graph_iterator = graph_iterator_t<Tp> |
Definition at line 117 of file declaration.hpp.
using tim::component::base< Tp, Value >::last_type = typename data_type::last_type |
Definition at line 109 of file declaration.hpp.
using tim::component::base< Tp, Value >::state_t = state<this_type> |
Definition at line 118 of file declaration.hpp.
using tim::component::base< Tp, Value >::statistics_policy = policy::record_statistics<Tp, Value> |
Definition at line 119 of file declaration.hpp.
using tim::component::base< Tp, Value >::storage_type = storage<Tp, Value> |
Definition at line 116 of file declaration.hpp.
using tim::component::base< Tp, Value >::this_type = Tp |
Definition at line 113 of file declaration.hpp.
using tim::component::base< Tp, Value >::Type = Tp |
Definition at line 105 of file declaration.hpp.
using tim::component::base< Tp, Value >::value_type = Value |
Definition at line 106 of file declaration.hpp.
using tim::component::base< Tp, Value >::vector_t = std::vector<U> |
Definition at line 101 of file declaration.hpp.
|
default |
|
static |
|
inlinestatic |
Definition at line 166 of file declaration.hpp.
|
static |
|
static |
|
protected |
Referenced by tim::component::base< Tp, Value >::operator/=().
|
protected |
|
inline |
retrieve the current measurement value in the units for the type
Definition at line 186 of file declaration.hpp.
References tim::component::base< Tp, Value >::load().
Referenced by tim::component::user_bundle< Idx, Tag >::get().
void tim::component::base< Tp, Value >::get | ( | void *& | ptr, |
size_t | _typeid_hash | ||
) | const |
assign type to a pointer
|
inline |
|
static |
|
inline |
retrieve the current measurement value in the units for the type in a format that can be piped to the output stream operator ('<<')
Definition at line 190 of file declaration.hpp.
References tim::component::base< Tp, Value >::load().
|
static |
|
static |
Referenced by tim::component::cupti_counters::get_display(), tim::component::read_char::get_display(), tim::component::written_char::get_display(), tim::component::read_bytes::get_display(), tim::component::written_bytes::get_display(), tim::component::network_stats::get_display(), tim::component::papi_array< MaxNumEvents >::get_display(), tim::component::papi_tuple< EventTypes >::get_display(), and tim::component::papi_vector::get_display().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 455 of file data.hpp.
Referenced by tim::component::user_bundle< Idx, Tag >::clear().
|
inline |
Definition at line 457 of file data.hpp.
Referenced by tim::component::base< Tp, Value >::load().
|
inline |
Definition at line 232 of file declaration.hpp.
References tim::component::base< Tp, Value >::graph_itr.
|
static |
|
inline |
add a sample
get number of measurement
Definition at line 231 of file declaration.hpp.
References tim::component::base< Tp, Value >::laps.
|
inlinestaticinherited |
Definition at line 72 of file declaration.hpp.
|
static |
get the opaque binding for user-bundle
|
static |
Referenced by tim::component::cupti_counters::get_display(), tim::component::read_char::get_display(), tim::component::written_char::get_display(), tim::component::read_bytes::get_display(), tim::component::written_bytes::get_display(), tim::component::network_stats::get_display(), tim::component::papi_array< MaxNumEvents >::get_display(), tim::component::papi_tuple< EventTypes >::get_display(), and tim::component::papi_vector::get_display().
|
static |
|
static |
Referenced by tim::component::cupti_activity::get(), tim::component::malloc_gotcha::get(), tim::component::hip_event::get(), tim::component::page_rss::get(), tim::component::virtual_memory::get(), tim::component::user_mode_time::get(), tim::component::kernel_mode_time::get(), tim::component::cuda_event::get(), tim::component::system_clock::get(), tim::component::user_clock::get(), tim::component::cpu_clock::get(), tim::component::monotonic_clock::get(), tim::component::monotonic_raw_clock::get(), tim::component::thread_cpu_clock::get(), tim::component::process_cpu_clock::get(), and tim::component::data_tracker< InpT, Tag >::get_unit().
|
static |
Referenced by tim::component::cupti_counters::get_display(), tim::component::read_char::get_display(), tim::component::written_char::get_display(), tim::component::read_bytes::get_display(), tim::component::written_bytes::get_display(), tim::component::network_stats::get_display(), tim::component::papi_array< MaxNumEvents >::get_display(), tim::component::papi_tuple< EventTypes >::get_display(), and tim::component::papi_vector::get_display().
|
static |
|
inline |
Definition at line 256 of file declaration.hpp.
References tim::component::base< Tp, Value >::get_is_transient(), and tim::cereal::load().
Referenced by tim::component::base< Tp, Value >::get(), tim::component::craypat_counters::get(), tim::component::read_char::get(), tim::component::written_char::get(), tim::component::read_bytes::get(), tim::component::written_bytes::get(), tim::component::page_rss::get(), tim::component::virtual_memory::get(), tim::component::base< Tp, Value >::get_display(), and tim::component::craypat_counters::get_display().
|
inline |
Definition at line 257 of file declaration.hpp.
References tim::component::base< Tp, Value >::get_is_transient(), and tim::cereal::load().
void tim::component::base< Tp, Value >::load | ( | Archive & | ar, |
unsigned int | |||
) |
serialization load (input)
|
inlineprotected |
Definition at line 279 of file declaration.hpp.
References tim::component::base< Tp, Value >::laps, and tim::component::base< Tp, Value >::set_is_transient().
|
inline |
Definition at line 288 of file declaration.hpp.
References tim::component::base< Tp, Value >::minus().
Referenced by tim::component::base< Tp, Value >::minus().
|
protected |
Referenced by tim::component::base< Tp, Value >::operator-=().
|
protected |
|
protected |
Referenced by tim::component::base< Tp, Value >::operator*=().
|
protected |
|
inline |
Definition at line 194 of file declaration.hpp.
References tim::component::base< Tp, Value >::multiply_oper().
|
inline |
Definition at line 199 of file declaration.hpp.
References tim::component::base< Tp, Value >::multiply_oper().
|
inline |
Definition at line 192 of file declaration.hpp.
References tim::component::base< Tp, Value >::plus_oper().
|
inline |
Definition at line 197 of file declaration.hpp.
References tim::component::base< Tp, Value >::plus_oper().
|
inline |
Definition at line 193 of file declaration.hpp.
References tim::component::base< Tp, Value >::minus_oper().
|
inline |
Definition at line 198 of file declaration.hpp.
References tim::component::base< Tp, Value >::minus_oper().
|
inline |
Definition at line 195 of file declaration.hpp.
References tim::component::base< Tp, Value >::divide_oper().
|
inline |
Definition at line 200 of file declaration.hpp.
References tim::component::base< Tp, Value >::divide_oper().
|
inlineprotected |
Definition at line 272 of file declaration.hpp.
References tim::component::base< Tp, Value >::laps, and tim::component::base< Tp, Value >::set_is_transient().
|
inline |
Definition at line 287 of file declaration.hpp.
References tim::component::base< Tp, Value >::plus().
Referenced by tim::component::base< Tp, Value >::plus().
|
protected |
Referenced by tim::component::base< Tp, Value >::operator+=().
|
protected |
void tim::component::base< Tp, Value >::print | ( | std::ostream & | , |
enable_if_t< trait::uses_value_storage< Up, Value >::value, int > | = 0 |
||
) | const |
void tim::component::base< Tp, Value >::print | ( | std::ostream & | , |
enable_if_t<!trait::uses_value_storage< Up, Value >::value, long > | = 0 |
||
) | const |
void tim::component::base< Tp, Value >::reset | ( | ) |
reset the values
void tim::component::base< Tp, Value >::save | ( | Archive & | ar, |
unsigned int | version | ||
) | const |
serialization store (output)
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 464 of file data.hpp.
Referenced by tim::component::base< Tp, Value >::minus(), and tim::component::base< Tp, Value >::plus().
|
inline |
Definition at line 234 of file declaration.hpp.
References tim::component::base< Tp, Value >::graph_itr.
|
inline |
void tim::component::base< Tp, Value >::set_started | ( | ) |
store that start has been called
void tim::component::base< Tp, Value >::set_stopped | ( | ) |
store that stop has been called
|
static |
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 156 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 104 of file declaration.hpp.
|
friend |
Definition at line 210 of file declaration.hpp.
|
static |
Definition at line 307 of file declaration.hpp.
|
protected |
Definition at line 292 of file declaration.hpp.
Referenced by tim::component::base< Tp, Value >::get_iterator(), and tim::component::base< Tp, Value >::set_iterator().
|
staticconstexpr |
Definition at line 305 of file declaration.hpp.
|
staticconstexpr |
Definition at line 304 of file declaration.hpp.
|
staticconstexpr |
Definition at line 306 of file declaration.hpp.
|
staticconstexpr |
Definition at line 104 of file declaration.hpp.
|
protected |
Definition at line 291 of file declaration.hpp.
Referenced by tim::component::base< Tp, Value >::get_laps(), tim::component::base< Tp, Value >::minus(), tim::component::base< Tp, Value >::plus(), and tim::component::base< Tp, Value >::set_laps().
|
staticconstexpr |
Definition at line 300 of file declaration.hpp.
|
staticconstexpr |
Definition at line 302 of file declaration.hpp.
|
staticconstexpr |
Definition at line 303 of file declaration.hpp.
|
staticconstexpr |
Definition at line 299 of file declaration.hpp.
|
staticconstexpr |
Definition at line 301 of file declaration.hpp.