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/operations/types/echo_measurement.hpp"
Public Types | |
using | type = Tp |
using | attributes_t = std::map< std::string, std::string > |
using | strset_t = std::set< string_t > |
using | stringstream_t = std::stringstream |
using | strvec_t = std::vector< string_t > |
using | sizevector_t = std::vector< size_t > |
Public Member Functions | |
template<typename Up = Tp, typename Vt = typename Up::value_type, enable_if_t< is_enabled< Up >::value, char > = 0, enable_if_t<!(trait::array_serialization< Up >::value||trait::iterable_measurement< Up >::value), int > = 0> | |
echo_measurement (Up &obj, const strvec_t &hierarchy) | |
assumes type is not a iterable More... | |
template<typename Up = Tp, typename Vt = typename Up::value_type, enable_if_t< is_enabled< Up >::value, char > = 0, enable_if_t< trait::array_serialization< Up >::value||trait::iterable_measurement< Up >::value, int > = 0> | |
echo_measurement (Up &obj, const strvec_t &hierarchy) | |
assumes type is iterable More... | |
template<typename... Args, typename Up = Tp, typename Vt = typename Up::value_type, enable_if_t<!is_enabled< Up >::value, char > = 0> | |
echo_measurement (Up &, Args &&...) | |
Static Public Member Functions | |
template<typename... Args> | |
static string_t | generate_name (const string_t &_prefix, string_t _unit, Args &&... _args) |
generate a name attribute More... | |
template<typename Tuple , typename... Args> | |
static string_t | generate_name (const string_t &_prefix, Tuple _unit, Args &&... _args) |
generate a name attribute More... | |
template<typename T , typename... Alloc, typename... Args> | |
static string_t | generate_name (const string_t &_prefix, std::vector< T, Alloc... > _unit, Args &&... _args) |
generate a name attribute More... | |
template<typename T , size_t N, typename... Args> | |
static string_t | generate_name (const string_t &_prefix, std::array< T, N > _unit, Args &&... _args) |
generate a name attribute More... | |
template<typename Vt > | |
static void | generate_measurement (std::ostream &os, const attributes_t &attributes, const Vt &value) |
generate a measurement tag More... | |
template<typename Vt , typename... ExtraT> | |
static void | generate_measurement (std::ostream &os, attributes_t attributes, const std::vector< Vt, ExtraT... > &value) |
generate a measurement tag More... | |
template<typename Lhs , typename Rhs , typename... ExtraT> | |
static void | generate_measurement (std::ostream &os, attributes_t attributes, const std::pair< Lhs, Rhs > &value) |
generate a measurement tag More... | |
static string_t | generate_prefix (const strvec_t &hierarchy) |
generate the prefix More... | |
template<typename Head , typename... Tail> | |
static constexpr bool | not_string (enable_if_t< sizeof...(Tail)==0, int >=0) |
template<typename Head , typename... Tail> | |
static constexpr bool | not_string (enable_if_t< sizeof...(Tail) !=0, int >=0) |
template<typename Head , typename... Tail> | |
static constexpr bool | is_string (enable_if_t< sizeof...(Tail)==0, int >=0) |
template<typename Head , typename... Tail> | |
static constexpr bool | is_string (enable_if_t< sizeof...(Tail) !=0, int >=0) |
template<typename Tp > | |
static size_t | get_distance (const Tp &_data) |
template<typename Tp , enable_if_t< std::is_arithmetic< Tp >::value, int > = 0> | |
static Tp | get_entry (const Tp &_data, size_t) |
template<typename Tp , enable_if_t<!std::is_arithmetic< Tp >::value, int > = 0> | |
static auto | get_entry (const Tp &_data, size_t _idx) -> decltype(get_entry_sfinae_(_data, _idx)) |
template<typename Tp , size_t Idx> | |
static Tp | get_entry (const Tp &_data, size_t) |
template<typename Tp , typename Wp , typename Pp > | |
static void | write (std::vector< std::stringstream * > &_os, std::ios_base::fmtflags _format, const Tp &_data, const Wp &_width, const Pp &_prec) |
template<typename... Tp, size_t... Idx, typename Wp , typename Pp > | |
static void | write (std::vector< std::stringstream * > &_os, std::ios_base::fmtflags _format, const std::tuple< Tp... > &_data, const Wp &_width, const Pp &_prec, index_sequence< Idx... >) |
template<typename... Tp, typename Wp , typename Pp > | |
static void | write (std::vector< std::stringstream * > &_os, std::ios_base::fmtflags _format, const std::tuple< Tp... > &_data, const Wp &_width, const Pp &_prec) |
template<typename Tp > | |
static int64_t | get_labels_size (const Tp &_data) |
template<typename Tp > | |
static strvec_t | get_labels (const Tp &_data) |
template<typename T > | |
static strvec_t | as_string_vec (const T &_data) |
template<typename... T, size_t... Idx> | |
static strvec_t | as_string_vec (const std::tuple< T... > &_obj, index_sequence< Idx... >) |
template<typename... T> | |
static strvec_t | as_string_vec (const std::tuple< T... > &_obj) |
template<typename Tp > | |
static std::string | as_string (const Tp &_obj) |
template<typename Tp > | |
static strvec_t | get_display_units (const Tp &_data) |
template<typename Tp > | |
static sizevector_t | get_widths (const Tp &_data) |
static string_t | attribute_string (const string_t &key, const string_t &item) |
generate an attribute More... | |
static string_t | replace (string_t &item, const string_t &str, const strset_t &values) |
replace matching values in item with str More... | |
static string_t | lowercase (string_t _str) |
convert to lowercase More... | |
static string_t | uppercase (string_t _str) |
convert to uppercase More... | |
static bool | contains (const string_t &str, const strset_t &items) |
check if str contains any of the string items More... | |
template<typename Tp , typename... Args> | |
static string_t | join (Tp &&_delim, Args &&... _args) |
shorthand for apply<string_t>::join(...) More... | |
static bool | is_empty (const std::string &obj) |
template<typename Tp , typename... _Extra> | |
static bool | is_empty (const std::vector< Tp, _Extra... > &obj) |
template<template< typename... > class Tuple, typename... Tp> | |
static bool | is_empty (const Tuple< Tp... > &obj) |
template<bool EnabledV, typename Arg , enable_if_t< EnabledV, int > = 0> | |
static void | print_tag (std::ostream &os, const Arg &_arg) |
template<bool EnabledV, typename Arg , enable_if_t<!EnabledV, int > = 0> | |
static void | print_tag (std::ostream &, const Arg &) |
Definition at line 62 of file echo_measurement.hpp.
using tim::operation::echo_measurement< Tp, true >::attributes_t = std::map<std::string, std::string> |
Definition at line 65 of file echo_measurement.hpp.
|
inherited |
Definition at line 452 of file declaration.hpp.
|
inherited |
Definition at line 198 of file declaration.hpp.
|
inherited |
Definition at line 197 of file declaration.hpp.
|
inherited |
Definition at line 199 of file declaration.hpp.
using tim::operation::echo_measurement< Tp, true >::type = Tp |
Definition at line 64 of file echo_measurement.hpp.
|
inline |
assumes type is not a iterable
Definition at line 269 of file echo_measurement.hpp.
|
inline |
|
inline |
Definition at line 314 of file echo_measurement.hpp.
|
inlinestaticinherited |
Definition at line 397 of file declaration.hpp.
Referenced by tim::operation::common_utils::as_string_vec().
|
inlinestaticinherited |
Definition at line 413 of file declaration.hpp.
References tim::operation::common_utils::as_string_vec().
|
inlinestaticinherited |
Definition at line 405 of file declaration.hpp.
References tim::operation::common_utils::as_string().
|
inlinestaticinherited |
Definition at line 391 of file declaration.hpp.
Referenced by tim::operation::common_utils::as_string_vec().
|
inlinestaticinherited |
generate an attribute
Definition at line 478 of file declaration.hpp.
References tim::mpl::apply< Ret >::join().
|
inlinestaticinherited |
check if str contains any of the string items
Definition at line 519 of file declaration.hpp.
References tim::operation::common_utils::lowercase().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
generate a measurement tag
Definition at line 184 of file echo_measurement.hpp.
References tim::os.
|
inlinestatic |
generate a name attribute
Definition at line 168 of file echo_measurement.hpp.
References tim::_args, tim::_prefix, and tim::plotting::operation::join().
|
inlinestatic |
generate a name attribute
Definition at line 151 of file echo_measurement.hpp.
References tim::_args, tim::_prefix, and tim::plotting::operation::join().
|
inlinestatic |
generate a name attribute
Definition at line 71 of file echo_measurement.hpp.
References tim::_args, tim::_prefix, tim::dart_label, tim::plotting::operation::join(), and tim::filepath::replace().
|
inlinestatic |
generate a name attribute
Definition at line 139 of file echo_measurement.hpp.
References tim::_args, and tim::_prefix.
|
inlinestatic |
generate the prefix
Definition at line 239 of file echo_measurement.hpp.
References tim::dart_label, and tim::filepath::replace().
|
inlinestaticinherited |
Definition at line 421 of file declaration.hpp.
Referenced by tim::operation::print< Tp >::print().
|
inlinestaticinherited |
Definition at line 228 of file declaration.hpp.
Referenced by tim::operation::common_utils::write().
|
inlinestaticinherited |
Definition at line 262 of file declaration.hpp.
|
inlinestaticinherited |
Definition at line 256 of file declaration.hpp.
|
inlinestaticinherited |
Definition at line 269 of file declaration.hpp.
|
inlinestaticinherited |
Definition at line 360 of file declaration.hpp.
Referenced by tim::operation::print< Tp >::print(), and tim::operation::print_header< Tp >::print_header().
|
inlinestaticinherited |
Definition at line 339 of file declaration.hpp.
|
inlinestaticinherited |
Definition at line 455 of file declaration.hpp.
|
inlinestaticinherited |
Definition at line 539 of file declaration.hpp.
Referenced by tim::operation::common_utils::print_tag().
|
inlinestaticinherited |
Definition at line 544 of file declaration.hpp.
|
inlinestaticinherited |
Definition at line 557 of file declaration.hpp.
References std::get(), and TIMEMORY_FOLD_EXPRESSION.
|
inlinestaticconstexprinherited |
Definition at line 221 of file declaration.hpp.
References tim::operation::common_utils::is_string().
|
inlinestaticconstexprinherited |
Definition at line 215 of file declaration.hpp.
Referenced by tim::operation::common_utils::is_string().
|
inlinestaticinherited |
shorthand for apply<string_t>::join(...)
Definition at line 531 of file declaration.hpp.
References tim::_args, and tim::mpl::apply< Ret >::join().
convert to lowercase
Definition at line 499 of file declaration.hpp.
Referenced by tim::operation::common_utils::contains().
|
inlinestaticconstexprinherited |
Definition at line 209 of file declaration.hpp.
References tim::operation::common_utils::not_string().
|
inlinestaticconstexprinherited |
Definition at line 203 of file declaration.hpp.
Referenced by tim::operation::common_utils::not_string().
|
inlinestaticinherited |
Definition at line 580 of file declaration.hpp.
|
inlinestaticinherited |
Definition at line 571 of file declaration.hpp.
References tim::operation::common_utils::is_empty(), and tim::os.
|
inlinestaticinherited |
replace matching values in item with str
Definition at line 486 of file declaration.hpp.
convert to uppercase
Definition at line 509 of file declaration.hpp.
|
inlinestaticinherited |
Definition at line 329 of file declaration.hpp.
References tim::operation::common_utils::write().
|
inlinestaticinherited |
Definition at line 320 of file declaration.hpp.
References TIMEMORY_FOLD_EXPRESSION, and tim::operation::common_utils::write().
|
inlinestaticinherited |
Definition at line 301 of file declaration.hpp.
References tim::operation::common_utils::get_distance().
Referenced by tim::operation::common_utils::write().