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.
|
common string manipulation utilities More...
#include "timemory/operations/declaration.hpp"
Public Types | |
using | attributes_t = std::map< string_t, string_t > |
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 > |
Static Public Member Functions | |
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 Tp > | |
static std::string | as_string (const Tp &_obj) |
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 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 &) |
common string manipulation utilities
Definition at line 194 of file declaration.hpp.
using tim::operation::common_utils::attributes_t = std::map<string_t, string_t> |
Definition at line 196 of file declaration.hpp.
using tim::operation::common_utils::sizevector_t = std::vector<size_t> |
Definition at line 452 of file declaration.hpp.
using tim::operation::common_utils::stringstream_t = std::stringstream |
Definition at line 198 of file declaration.hpp.
using tim::operation::common_utils::strset_t = std::set<string_t> |
Definition at line 197 of file declaration.hpp.
using tim::operation::common_utils::strvec_t = std::vector<string_t> |
Definition at line 199 of file declaration.hpp.
|
inlinestatic |
Definition at line 397 of file declaration.hpp.
Referenced by as_string_vec().
|
inlinestatic |
Definition at line 413 of file declaration.hpp.
References as_string_vec().
|
inlinestatic |
Definition at line 405 of file declaration.hpp.
References as_string().
|
inlinestatic |
Definition at line 391 of file declaration.hpp.
Referenced by as_string_vec().
|
inlinestatic |
generate an attribute
Definition at line 478 of file declaration.hpp.
References tim::mpl::apply< Ret >::join().
|
inlinestatic |
check if str contains any of the string items
Definition at line 519 of file declaration.hpp.
References lowercase().
|
inlinestatic |
Definition at line 421 of file declaration.hpp.
Referenced by tim::operation::print< Tp >::print().
|
inlinestatic |
Definition at line 228 of file declaration.hpp.
Referenced by write().
|
inlinestatic |
Definition at line 262 of file declaration.hpp.
|
inlinestatic |
Definition at line 256 of file declaration.hpp.
|
inlinestatic |
Definition at line 269 of file declaration.hpp.
|
inlinestatic |
Definition at line 360 of file declaration.hpp.
Referenced by tim::operation::print< Tp >::print(), and tim::operation::print_header< Tp >::print_header().
|
inlinestatic |
Definition at line 339 of file declaration.hpp.
|
inlinestatic |
Definition at line 455 of file declaration.hpp.
|
inlinestatic |
Definition at line 539 of file declaration.hpp.
Referenced by print_tag().
|
inlinestatic |
Definition at line 544 of file declaration.hpp.
|
inlinestatic |
Definition at line 557 of file declaration.hpp.
References std::get(), and TIMEMORY_FOLD_EXPRESSION.
|
inlinestaticconstexpr |
Definition at line 221 of file declaration.hpp.
References is_string().
|
inlinestaticconstexpr |
Definition at line 215 of file declaration.hpp.
Referenced by is_string().
|
inlinestatic |
shorthand for apply<string_t>::join(...)
Definition at line 531 of file declaration.hpp.
References tim::_args, and tim::mpl::apply< Ret >::join().
|
inlinestaticconstexpr |
Definition at line 209 of file declaration.hpp.
References not_string().
|
inlinestaticconstexpr |
Definition at line 203 of file declaration.hpp.
Referenced by not_string().
|
inlinestatic |
Definition at line 580 of file declaration.hpp.
|
inlinestatic |
Definition at line 571 of file declaration.hpp.
References is_empty(), and tim::os.
|
inlinestatic |
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.
|
inlinestatic |
Definition at line 329 of file declaration.hpp.
References write().
|
inlinestatic |
|
inlinestatic |
Definition at line 301 of file declaration.hpp.
References get_distance().
Referenced by write().