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 Namespace Reference

Namespaces

namespace  alias
 
namespace  argparse
 
namespace  audit
 
namespace  base
 
namespace  cereal
 
namespace  component
 
namespace  concepts
 
namespace  config
 
namespace  crtp
 
namespace  cupti
 
namespace  data
 
namespace  data_storage
 
namespace  device
 
namespace  env
 
namespace  ert
 
namespace  filepath
 
namespace  func
 
namespace  hash
 
namespace  invoke
 
namespace  kokkosp
 
namespace  lifetime
 
namespace  math
 
namespace  md5
 
namespace  mpl
 
namespace  node
 
namespace  ompt
 
namespace  openmp
 
namespace  operation
 
namespace  ostream
 the namespace provides overloads to output complex data types w/ streams
 
namespace  plotting
 
namespace  policy
 
namespace  popen
 
namespace  quirk
 
namespace  runtime
 
namespace  sampling
 
namespace  scope
 
namespace  socket
 
namespace  stl
 the namespace is provided to hide stl overload from global namespace but provide a method of using the namespace without a "using namespace tim;"
 
namespace  trace
 
namespace  trait
 
namespace  units
 
namespace  utility
 
namespace  variadic
 

Classes

struct  api_bundle
 
struct  api_bundle< ApiT, type_list< Types... > >
 
class  auto_base_bundle
 Static polymorphic base class for automatic start/stop bundlers. More...
 
class  auto_base_bundle< Tag, CompT, BundleT >
 Example: auto_base_bundle<Tag, component_bundle<Tag>, auto_bundle<Tag, Types...>> will use Tag + trait::is_available<Tag> or trait::runtime_available<Tag> to disable this bundle at compile-time or run-time, respectively. It will wrap auto-start/stop around component_bundle<Tag, Types...> and use auto_bundle<Tag, Types...> for function signatures. More...
 
class  auto_bundle
 This is a variadic component wrapper which combines the features of tim::auto_tuple<T...> and tim::auto_list<U..>. The "T" types (compile-time fixed, allocated on stack) should be specified as usual, the "U" types (runtime-time optional, allocated on the heap) should be specified as a pointer. Initialization of the optional types is similar to tim::auto_list<U...> but no environment variable is built-in since, ideally, this environment variable should be customized based on the Tag template parameter. More...
 
class  auto_bundle< Tag, Types... >
 
class  auto_hybrid
 
class  auto_hybrid< TupleT< TupleTypes... >, ListT< ListTypes... > >
 
class  auto_list
 This is a variadic component wrapper where all components are optional at runtime. Accept unlimited number of parameters. The constructor starts the components, the destructor stops the components. The default behavior is to query the TIMEMORY_AUTO_LIST_INIT environment variable once (the first time the bundle is used) and use that list of components (if any) to initialize the components which are part of it's template parameters. This behavior can be modified by assigning a new lambda/functor to the reference which is returned from tim::auto_list<Types...>::get_initializer(). Assignment is not thread-safe since this is relatively unnecessary... if a different set of components are required on a particular thread, just create a different type with those particular components or pass the initialization functor to the constructor. More...
 
class  auto_tuple
 This is a variadic component wrapper where all components are allocated on the stack and cannot be disabled at runtime. This bundler has the lowest overhead. Accepts unlimited number of template parameters. The constructor starts the components, the destructor stops the components. More...
 
struct  available_types
 
struct  basic_tree
 Basic hierarchical tree implementation. Expects population from tim::graph. More...
 
class  bundle
 Static polymorphic base class for component bundlers. More...
 
class  bundle< Tag, BundleT, TupleT >
 Example: bundle<Tag, component_bundle<Foo>, mixed_wrapper_types<concat<Bar, Baz>>> will use Tag + trait::is_available<Tag> or trait::runtime_available<Tag> to disable this bundle at compile-time or run-time, respectively. It will covert component_bundle<Foo> to component_bundle<Foo, Bar, Baz> for purposes of function signatures and it will instantiate std::tuple<...> depending on the compile-time availability of Bar and Baz. mixed_wrapper_types is a dummy type with the appropriate aliases to perform these conversions. Here is a theoretical implementation of mixed_wrapper_types (which supports allocating components on the stack and the heap): More...
 
struct  complete_types
 
class  component_bundle
 This is a variadic component wrapper which combines the features of tim::component_tuple<T...> and tim::component_list<U..>. The "T" types (compile-time fixed, allocated on stack) should be specified as usual, the "U" types (runtime-time optional, allocated on the heap) should be specified as a pointer. Initialization of the optional types is similar to tim::auto_list<U...> but no environment variable is built-in since, ideally, this environment variable should be customized based on the Tag template parameter. More...
 
class  component_bundle< Tag, Types... >
 
class  component_hybrid
 
class  component_hybrid< TupleT< TupleTypes... >, ListT< ListTypes... > >
 
class  component_list
 This is a variadic component wrapper where all components are optional at runtime. Accept unlimited number of parameters. The default behavior is to query the TIMEMORY_COMPONENT_LIST_INIT environment variable once (the first time the bundle is used) and use that list of components (if any) to initialize the components which are part of it's template parameters. This behavior can be modified by assigning a new lambda/functor to the reference which is returned from tim::component_list<Types...>::get_initializer(). Assignment is not thread-safe since this is relatively unnecessary... if a different set of components are required on a particular thread, just create a different type with those particular components or pass the initialization functor to the constructor. More...
 
class  component_tuple
 This is a variadic component wrapper where all components are allocated on the stack and cannot be disabled at runtime. This bundler has the lowest overhead. Accepts unlimited number of template parameters. This bundler is used by tim::auto_tuple whose constructor and destructor invoke the start() and stop() member functions respectively. More...
 
class  env_settings
 
struct  get_index_sequence
 
struct  get_index_sequence< Tuple< Types... > >
 
class  graph
 Arbitrary Graph / Tree (i.e. binary-tree but not binary). It is unlikely that this class will interacted with directly. More...
 
class  graph_data
 tim::graph instance + current node + head note + sea-level. Sea-level is defined as the node depth after a fork from another graph instance and is only relevant for worker-threads) More...
 
struct  hasher
 
struct  identity
 
class  lightweight_tuple
 This is a variadic component wrapper which provides the least amount of runtime and compilation overhead. More...
 
class  manager
 
struct  null_type
 this is a placeholder type for optional type-traits. It is used as the default type for the type-traits to signify there is no specialization. More...
 
struct  remove_pointers
 
struct  remove_pointers< Tuple< Tp... > >
 
struct  settings
 
class  signal_settings
 
class  singleton
 Thread-safe singleton management. More...
 
class  singleton< void, void, void >
 
class  source_location
 Provides source location information and variadic joining of source location tags. More...
 
struct  stack_bundle
 
struct  stack_bundle< type_list< Types... > >
 
struct  static_string
 
struct  statistics
 A generic class for statistical accumulation. It uses the timemory math overloads to enable statistics for containers such as std::vector<double>, etc. More...
 
class  storage
 
class  storage< Tp, type_list<> >
 
struct  storage_initializer
 This provides an object that can initialize the storage opaquely, e.g. More...
 
class  tgraph_node
 A node in the graph, combining links to other nodes as well as the actual data. More...
 
struct  tsettings
 Implements a specific setting. More...
 
struct  type_list
 lightweight tuple-alternative for meta-programming logic More...
 
struct  vsettings
 Virtual base class for storing settings. More...
 

Typedefs

using parser_t = argparse::argument_parser
 
using parser_err_t = typename parser_t::result_type
 
using minimal_auto_tuple_t = auto_bundle< TIMEMORY_API, TIMEMORY_MINIMAL_TUPLE_TYPES >
 
using minimal_auto_list_t = auto_bundle< TIMEMORY_API, TIMEMORY_MINIMAL_LIST_TYPES >
 
using minimal_auto_timer_t = auto_bundle< TIMEMORY_API, TIMEMORY_MINIMAL_TUPLE_TYPES, TIMEMORY_MINIMAL_LIST_TYPES >
 
using full_auto_tuple_t = auto_bundle< TIMEMORY_API, TIMEMORY_FULL_TUPLE_TYPES >
 
using full_auto_list_t = auto_bundle< TIMEMORY_API, TIMEMORY_FULL_LIST_TYPES >
 
using full_auto_timer_t = auto_bundle< TIMEMORY_API, TIMEMORY_FULL_TUPLE_TYPES, TIMEMORY_FULL_LIST_TYPES >
 
using auto_timer_tuple_t = minimal_auto_tuple_t
 
using auto_timer_list_t = minimal_auto_list_t
 
using auto_timer = minimal_auto_timer_t
 
using auto_timer_t = auto_timer
 
using auto_user_bundle_t = auto_bundle< TIMEMORY_API, component::user_global_bundle >
 
using hash_value_t = size_t
 
using hash_map_t = std::unordered_map< hash_value_t, std::string >
 
using hash_alias_map_t = std::unordered_map< hash_value_t, hash_value_t >
 
using hash_map_ptr_t = std::shared_ptr< hash_map_t >
 
using hash_map_ptr_pair_t = std::pair< hash_map_ptr_t, hash_map_ptr_t >
 
using hash_alias_ptr_t = std::shared_ptr< hash_alias_map_t >
 
using hash_resolver_t = std::function< bool(hash_value_t, std::string &)>
 
using hash_resolver_vec_t = std::vector< hash_resolver_t >
 
using string_view_t = std::string
 
using string_view_cref_t = const std::string &
 
template<typename... T>
using stl_tuple_t = convert_t< mpl::available_t< concat< T... > >, std::tuple<> >
 
template<typename... T>
using type_list_t = convert_t< mpl::available_t< concat< T... > >, type_list<> >
 
template<typename Tag , typename... T>
using component_bundle_t = convert_t< mpl::available_t< type_list< T... > >, component_bundle< Tag > >
 
template<typename... T>
using component_tuple_t = convert_t< mpl::available_t< concat< T... > >, component_tuple<> >
 
template<typename... T>
using component_list_t = convert_t< mpl::available_t< concat< T... > >, component_list<> >
 
template<typename... T>
using auto_tuple_t = convert_t< mpl::available_t< concat< T... > >, auto_tuple<> >
 
template<typename... T>
using auto_list_t = convert_t< mpl::available_t< concat< T... > >, auto_list<> >
 
template<typename Tag , typename... T>
using auto_bundle_t = convert_t< mpl::available_t< type_list< T... > >, auto_bundle< Tag > >
 
template<typename... T>
using lightweight_tuple_t = convert_t< mpl::available_t< concat< T... > >, lightweight_tuple<> >
 
template<typename T >
using is_empty_t = typename concepts::is_empty< T >::type
 
template<typename T >
using is_variadic_t = typename concepts::is_variadic< T >::type
 
template<typename T >
using is_wrapper_t = typename concepts::is_wrapper< T >::type
 
template<typename T >
using is_stack_wrapper_t = typename concepts::is_stack_wrapper< T >::type
 
template<typename T >
using is_heap_wrapper_t = typename concepts::is_heap_wrapper< T >::type
 
template<typename... Ts>
using tuple_concat_t = typename impl::tuple_concat< Ts... >::type
 
template<typename... Ts>
using type_concat_t = typename impl::type_concat< Ts... >::type
 
template<typename U >
using remove_pointer_t = typename std::remove_pointer< U >::type
 
template<typename U >
using add_pointer_t = conditional_t<(std::is_pointer< U >::value), U, U * >
 
template<typename Tp , typename Type >
using index_of = impl::index_of< Tp, Type >
 
template<typename Tp , typename Types >
using is_one_of = typename impl::is_one_of< Tp, Types >
 check if type is in expansion More...
 
template<template< typename > class Predicate, typename Types >
using contains_one_of = typename impl::contains_one_of< Predicate, Types >
 check if type is in expansion More...
 
template<template< typename > class Predicate, typename Types >
using contains_one_of_t = typename contains_one_of< Predicate, Types >::type
 
template<typename Tp >
using get_index_sequence_t = typename get_index_sequence< decay_t< Tp > >::type
 
template<typename T , typename U >
using convert_t = typename impl::convert< T, U >::type
 
template<template< typename... > class T, typename... U>
using convert_each_t = typename impl::convert_each< T, U... >::type
 
template<typename T >
using unwrap_t = typename impl::unwrapper< T >::type
 
template<template< typename > class CheckT, bool CheckV, template< typename > class TransformT, typename T , typename U >
using apply_transform_t = typename impl::apply_transform< CheckT, CheckV, TransformT, T, U >::type
 
template<typename Tuple , typename T >
using push_back_t = typename mpl::push_back< Tuple, T >::type
 
template<typename Tp >
using remove_pointers_t = typename remove_pointers< Tp >::type
 
template<typename Tp >
using storage_singleton = singleton< Tp, std::unique_ptr< Tp, impl::storage_deleter< Tp > >, TIMEMORY_API >
 
using complete_types_t = typename complete_types< std::make_index_sequence< TIMEMORY_COMPONENTS_END > >::type
 
using available_types_t = typename available_types< std::make_index_sequence< TIMEMORY_COMPONENTS_END > >::type
 
using complete_tuple_t = convert_t< complete_types_t, std::tuple<> >
 
using complete_component_list_t = convert_t< complete_types_t, component_list<> >
 
using complete_component_tuple_t = convert_t< complete_types_t, component_tuple<> >
 
using complete_auto_list_t = convert_t< complete_types_t, auto_list<> >
 
using complete_auto_tuple_t = convert_t< complete_types_t, auto_tuple<> >
 
using available_tuple_t = convert_t< available_types_t, std::tuple<> >
 
using available_component_list_t = convert_t< available_types_t, component_list<> >
 
using available_component_tuple_t = convert_t< available_types_t, component_tuple<> >
 
using available_auto_list_t = convert_t< available_types_t, auto_list<> >
 
using available_auto_tuple_t = convert_t< available_types_t, auto_tuple<> >
 
using complete_list_t = complete_component_list_t
 
using available_list_t = available_component_list_t
 
using global_bundle_t = component_tuple< component::user_global_bundle >
 
using ompt_bundle_t = component_tuple< component::user_ompt_bundle >
 
using mpip_bundle_t = component_tuple< component::user_mpip_bundle >
 
using ncclp_bundle_t = component_tuple< component::user_ncclp_bundle >
 
using mutex_t = std::recursive_mutex
 Recursive mutex is used for convenience since the performance penalty vs. a regular mutex is not really an issue since there are not many locks in general. More...
 
using auto_lock_t = std::unique_lock< mutex_t >
 Unique lock type around mutex_t. More...
 
using common_singleton = singleton< void, void, void >
 
template<typename Tp , Tp Num>
using make_integer_sequence = std::make_integer_sequence< Tp, Num >
 Alias template make_integer_sequence. More...
 
template<size_t... Idx>
using index_sequence = std::integer_sequence< size_t, Idx... >
 Alias template index_sequence. More...
 
template<size_t Num>
using make_index_sequence = std::make_integer_sequence< size_t, Num >
 Alias template make_index_sequence. More...
 
template<typename... Types>
using index_sequence_for = std::make_index_sequence< sizeof...(Types)>
 Alias template index_sequence_for. More...
 
template<bool B, typename T = int>
using enable_if_t = typename std::enable_if< B, T >::type
 Alias template for enable_if. More...
 
template<typename T >
using decay_t = typename std::decay< T >::type
 Alias template for decay. More...
 
template<bool B, typename Lhs , typename Rhs >
using conditional_t = typename std::conditional< B, Lhs, Rhs >::type
 
template<typename T >
using remove_cv_t = typename std::remove_cv< T >::type
 
template<typename T >
using remove_const_t = typename std::remove_const< T >::type
 
template<int N>
using priority_constant = std::integral_constant< int, N >
 
template<typename T >
using identity_t = typename identity< T >::type
 
template<size_t Idx, typename Tp >
using type_list_element_t = typename type_list_element< Idx, Tp >::type
 
using string_t = std::string
 
template<typename... T>
using component_hybrid_t = typename component_hybrid< T... >::type
 
using string = tim::mpl::apply< std::string >
 
template<typename... Types>
using concat = typename impl::concat< Types... >::type
 

Enumerations

enum class  sys_signal : int {
  Hangup = SIGHUP ,
  Interrupt = SIGINT ,
  Quit = SIGQUIT ,
  Illegal = SIGILL ,
  Trap = SIGTRAP ,
  Abort = SIGABRT ,
  Emulate = SIGEMT ,
  FPE = SIGFPE ,
  Kill = SIGKILL ,
  Bus = SIGBUS ,
  SegFault = SIGSEGV ,
  System = SIGSYS ,
  Pipe = SIGPIPE ,
  Alarm = SIGALRM ,
  Terminate = SIGTERM ,
  Urgent = SIGURG ,
  Stop = SIGTSTP ,
  CPUtime = SIGXCPU ,
  FileSize = SIGXFSZ ,
  VirtualAlarm = SIGVTALRM ,
  ProfileAlarm = SIGPROF ,
  User1 = SIGUSR1 ,
  User2 = SIGUSR2
}
 

Functions

template<>
auto invoke_preinit< kokkosp::memory_tracker > (long)
 
 TIMEMORY_CONFIG_LINKAGE (void) timemory_init(int argc
 
 if (_settings)
 
 while (exe_name.find('\\') !=std::string::npos) exe_name
 
 while (exe_name.find('/') !=std::string::npos) exe_name
 
 for (const auto &ext :_exe_suffixes)
 
 for (auto &itr :exe_name)
 
 while ((pos=exe_name.find("--")) !=std::string::npos) exe_name.erase(pos
 
 if (exe_name.empty()) exe_name
 
 if (_manager)
 
 timemory_argparse (argc, argv)
 
 timemory_argparse (argc, argv, &parser)
 
 if (_cleanup_parser) parser
 
 if (_cleanup_settings &&!_shared_settings) return
 
 if (_cleanup_settings) _settings
 
parser enable_help ()
 
parser on_error ([=](parser_t &p, const parser_err_t &_err) { err_action(_err);if(dmp::rank()==0 &&_settings->get_verbose() > 0) p.print_help("-- <NON_TIMEMORY_ARGS>");})
 
 for (const auto &itr :_settings->ordering())
 
parser add_argument () .names(
 
 description ("A generic option for any setting. Each argument MUST be passed in " "form: 'NAME=VALUE'. E.g. --timemory-args " "\"papi_events=PAPI_TOT_INS,PAPI_TOT_CYC\" text_output=off") .action([&](parser_t &p)
 
 err_action (parser->parse_known_args(argc, argv, "--", settings::verbose()))
 
 if (parser->exists("help")) help_action(*parser)
 
template<typename... Types, typename... Args, enable_if_t<(sizeof...(Types) > 0 &&sizeof...(Args) >=2), int > >
void timemory_init (Args &&... _args)
 
void timemory_init (int argc, char **argv, const std::string &_prefix="timemory-", const std::string &_suffix="-output")
 initialization (creates manager and configures output path) More...
 
void timemory_init (const std::string &exe_name, const std::string &_prefix="timemory-", const std::string &_suffix="-output")
 initialization (creates manager and configures output path) More...
 
void timemory_init (int *argc, char ***argv, const std::string &_prefix="timemory-", const std::string &_suffix="-output")
 initialization (creates manager, configures output path, mpi_init) More...
 
void timemory_init (int *argc, char ***argv, argparse::argument_parser &parser, const std::string &_prefix="timemory-", const std::string &_suffix="-output")
 
void timemory_init (std::vector< std::string > &, argparse::argument_parser &parser, const std::string &_prefix="timemory-", const std::string &_suffix="-output")
 
void timemory_finalize ()
 finalization of the specified types More...
 
void timemory_argparse (int *argc, char ***argv, argparse::argument_parser *parser=nullptr, settings *_settings=nullptr)
 
void timemory_argparse (std::vector< std::string > &, argparse::argument_parser *parser=nullptr, settings *_settings=nullptr)
 
template<typename... Args>
void init (Args &&... args)
 
void finalize ()
 
template<typename Tp >
Tp get_env (const std::string &env_id, Tp _default, bool _store)
 
template<typename Tp >
Tp get_env_choice (const std::string &env_id, Tp _default, std::set< Tp > _choices, bool _store)
 
template<typename Tp >
Tp load_env (const std::string &env_id, Tp _default)
 
template<typename Tp >
void set_env (const std::string &env_var, const Tp &_val, int override)
 
template<typename FuncT >
void print_env (std::ostream &os, FuncT &&_filter)
 Print all environment queries and their values which satisfy the filter conditions. More...
 
 TIMEMORY_ENVIRONMENT_LINKAGE (env_settings::~env_settings())
 
 TIMEMORY_ENVIRONMENT_LINKAGE (env_settings::env_map_t) env_settings
 
template<>
 TIMEMORY_ENVIRONMENT_LINKAGE (std::string) get_env(const std
 
template<>
 TIMEMORY_ENVIRONMENT_LINKAGE (bool) get_env(const std
 
 TIMEMORY_ENVIRONMENT_LINKAGE (void) print_env(std
 
 TIMEMORY_ENVIRONMENT_LINKAGE (tim::env_settings *) env_settings
 
template<>
std::string get_env (const std::string &env_id, std::string _default, bool _store)
 
template<>
bool get_env (const std::string &env_id, bool _default, bool _store)
 
template<>
std::string load_env (const std::string &env_id, std::string _default)
 
template<>
bool load_env (const std::string &env_id, bool _default)
 
void print_env (std::ostream &os=std::cout)
 
template<typename Tp , typename FuncT >
void generic_serialization (const std::string &fname, const Tp &obj, const std::string &_main_name="timemory", const std::string &_data_name="data", FuncT &&_func=[](typename policy::output_archive_t< decay_t< Tp > >::type &) {})
 
template<typename ArchiveT , typename ApiT = TIMEMORY_API, typename Tp , typename FuncT >
void generic_serialization (const std::string &fname, const Tp &obj, const std::string &_main_name="timemory", const std::string &_data_name="data", FuncT &&_func=[](typename policy::output_archive_t< decay_t< Tp > >::type &) {})
 
template<typename ArchiveT , typename ApiT = TIMEMORY_API, typename Tp , typename FuncT >
void generic_serialization (std::ostream &ofs, const Tp &obj, const std::string &_main_name="timemory", const std::string &_data_name="data", FuncT &&_func=[](typename policy::output_archive_t< decay_t< Tp > >::type &) {})
 
template<typename Tp , typename Tag , typename PtrT , typename PairT >
PairT & get_shared_ptr_pair ()
 
template<typename Tp , typename Tag , typename PtrT , typename PairT >
PtrT get_shared_ptr_pair_instance ()
 
template<typename Tp , typename Tag , typename PtrT , typename PairT >
PtrT get_shared_ptr_pair_main_instance ()
 
template<typename Tp , typename Tag , typename PtrT >
PtrT get_shared_ptr_lone_instance ()
 
 TIMEMORY_HASH_LINKAGE (hash_map_ptr_t &) get_hash_ids()
 
 TIMEMORY_HASH_LINKAGE (hash_alias_ptr_t &) get_hash_aliases()
 
 TIMEMORY_HASH_LINKAGE (std::shared_ptr< hash_resolver_vec_t > &) get_hash_resolvers()
 
 TIMEMORY_HASH_LINKAGE (hash_value_t) get_hash_id(const hash_alias_ptr_t &_hash_alias
 
 if (_alias_itr !=_hash_alias->end()) return _alias_itr -> second
 
 TIMEMORY_HASH_LINKAGE (void) add_hash_id(const hash_map_ptr_t &
 
 TIMEMORY_HASH_LINKAGE (void) add_hash_id(hash_value_t _hash_id
 
 if (_reported.count(_hash_id) > 0) return
 
_reported insert (_hash_id)
 
 if (!_hash_map)
 
 for (const auto &aitr :*_hash_alias)
 
 for (auto &mitr :*_hash_map)
 
 if (_hash_id > 0)
 
 TIMEMORY_HASH_LINKAGE (typename hash_map_t::const_iterator) find_hash_identifier(const hash_map_ptr_t &_hash_map
 
 if (_map_itr !=_hash_map->end()) return _map_itr = &_map_itr->second
 
return _hash_map end ()
 
 TIMEMORY_HASH_LINKAGE (typename hash_map_t::const_iterator) find_hash_identifier(hash_value_t _hash_id)
 
 TIMEMORY_HASH_LINKAGE (bool) get_hash_identifier(const hash_map_ptr_t &_hash_map
 
 if (static_string::is_registered(_hash_id)) = reinterpret_cast<const char*>(_hash_id)
 
 if (_hash_alias)
 
 TIMEMORY_HASH_LINKAGE (std::string) get_hash_identifier(hash_value_t _hash_id)
 
 TIMEMORY_HASH_LINKAGE (bool) get_hash_identifier(hash_value_t _hash_id
 
 TIMEMORY_HASH_LINKAGE (std::string) get_hash_identifier(const hash_map_ptr_t &_hash_map
 
 if (get_hash_identifier(_hash_map, _hash_alias, _hash_id, _ret)) return *_ret
 
 hash_identifier_error (_hash_map, _hash_alias, _hash_id)
 
hash_map_ptr_tget_hash_ids ()
 
hash_alias_ptr_tget_hash_aliases ()
 
std::shared_ptr< hash_resolver_vec_t > & get_hash_resolvers ()
 
template<typename Tp , std::enable_if_t< concepts::is_string_type< std::decay_t< Tp > >::value, int > = 0>
hash_value_t get_hash_id (Tp &&_prefix)
 
hash_value_t get_combined_hash_id (hash_value_t _lhs, hash_value_t _rhs)
 
template<typename Tp , std::enable_if_t<!std::is_integral< std::decay_t< Tp > >::value, int > = 0>
hash_value_t get_combined_hash_id (hash_value_t _lhs, Tp &&_rhs)
 
hash_value_t get_hash_id (const hash_alias_ptr_t &_hash_alias, hash_value_t _hash_id)
 
hash_value_t add_hash_id (hash_map_ptr_t &_hash_map, string_view_cref_t _prefix)
 add an string to the given hash-map (if it doesn't already exist) and return the hash More...
 
hash_value_t add_hash_id (string_view_cref_t _prefix)
 add an string to the default hash-map (if it doesn't already exist) and return the hash More...
 
void add_hash_id (const hash_map_ptr_t &_hash_map, const hash_alias_ptr_t &_hash_alias, hash_value_t _hash_id, hash_value_t _alias_hash_id)
 
void add_hash_id (const hash_alias_ptr_t &_hash_alias, hash_value_t _hash_id, hash_value_t _alias_hash_id)
 
void add_hash_id (hash_value_t _hash_id, hash_value_t _alias_hash_id)
 
void hash_identifier_error (const hash_map_ptr_t &_hash_map, const hash_alias_ptr_t &_hash_alias, hash_value_t _hash_id)
 
string_view_t get_hash_identifier_fast (hash_value_t _hash)
 this does not check other threads or aliases. Only call this function when you know that the hash exists on the thread and is not an alias More...
 
bool get_hash_identifier_fast (hash_value_t _hash, std::string *&_v)
 
bool get_hash_identifier_fast (hash_value_t _hash, const char *&_v)
 
hash_map_t::const_iterator find_hash_identifier (const hash_map_ptr_t &_hash_map, const hash_alias_ptr_t &_hash_alias, hash_value_t _hash_id)
 
hash_map_t::const_iterator find_hash_identifier (hash_value_t _hash_id)
 
bool get_hash_identifier (const hash_map_ptr_t &_hash_map, const hash_alias_ptr_t &_hash_alias, hash_value_t _hash_id, std::string *&_ret)
 
bool get_hash_identifier (const hash_map_ptr_t &_hash_map, const hash_alias_ptr_t &_hash_alias, hash_value_t _hash_id, const char *&_ret)
 
bool get_hash_identifier (hash_value_t _hash_id, std::string *&_ret)
 
bool get_hash_identifier (hash_value_t _hash_id, const char *&_ret)
 
std::string get_hash_identifier (const hash_map_ptr_t &_hash_map, const hash_alias_ptr_t &_hash_alias, hash_value_t _hash_id)
 
std::string get_hash_identifier (hash_value_t _hash_id)
 
template<typename FuncT >
size_t add_hash_resolver (FuncT &&_func)
 
std::string demangle_hash_identifier (std::string, char bdelim='[', char edelim=']')
 
template<typename... Args>
auto get_demangled_hash_identifier (Args &&... _args)
 
managertimemory_manager_master_instance ()
 
void timemory_library_constructor ()
 
template<typename Tp , size_t N, typename Other >
std::array< Tp, N > & operator+= (std::array< Tp, N > &, Other &&)
 
template<typename Lhs , typename Rhs , typename Other >
std::pair< Lhs, Rhs > & operator+= (std::pair< Lhs, Rhs > &, Other &&)
 
template<typename Tp , typename... _Extra, typename Other >
std::vector< Tp, _Extra... > & operator+= (std::vector< Tp, _Extra... > &, Other &&)
 
template<typename... Types, typename Other >
std::tuple< Types... > & operator+= (std::tuple< Types... > &, Other &&)
 
template<typename Tp , size_t N>
std::array< Tp, N > & operator-= (std::array< Tp, N > &, const std::array< Tp, N > &)
 
template<typename Lhs , size_t N, typename Rhs , enable_if_t< std::is_arithmetic< decay_t< Rhs > >::value, int > = 0>
std::array< Lhs, N > & operator-= (std::array< Lhs, N > &, const Rhs &)
 
template<typename Lhs , typename Rhs >
std::pair< Lhs, Rhs > & operator-= (std::pair< Lhs, Rhs > &, const std::pair< Lhs, Rhs > &)
 
template<typename Lhs , typename Rhs , typename ArithT , enable_if_t< std::is_arithmetic< decay_t< ArithT > >::value, int > = 0>
std::pair< Lhs, Rhs > & operator-= (std::pair< Lhs, Rhs > &, const ArithT &)
 
template<typename Tp , typename... _Extra>
std::vector< Tp, _Extra... > & operator-= (std::vector< Tp, _Extra... > &, const std::vector< Tp, _Extra... > &)
 
template<typename Lhs , typename Rhs , typename... _Extra, enable_if_t< std::is_arithmetic< decay_t< Rhs > >::value, int > = 0>
std::vector< Lhs, _Extra... > & operator-= (std::vector< Lhs, _Extra... > &, const Rhs &)
 
template<typename... Types>
std::tuple< Types... > & operator-= (std::tuple< Types... > &, const std::tuple< Types... > &)
 
template<typename... Lhs, typename Rhs , enable_if_t< std::is_arithmetic< decay_t< Rhs > >::value, int > = 0>
std::tuple< Lhs... > & operator-= (std::tuple< Lhs... > &, const Rhs &)
 
template<typename Tp , size_t N>
std::array< Tp, N > & operator*= (std::array< Tp, N > &, const std::array< Tp, N > &)
 
template<typename Lhs , size_t N, typename Rhs , enable_if_t< std::is_arithmetic< decay_t< Rhs > >::value, int > = 0>
std::array< Lhs, N > & operator*= (std::array< Lhs, N > &, const Rhs &)
 
template<typename Lhs , typename Rhs >
std::pair< Lhs, Rhs > & operator*= (std::pair< Lhs, Rhs > &, const std::pair< Lhs, Rhs > &)
 
template<typename Lhs , typename Rhs , typename ArithT , enable_if_t< std::is_arithmetic< decay_t< ArithT > >::value, int > = 0>
std::pair< Lhs, Rhs > & operator*= (std::pair< Lhs, Rhs > &, const ArithT &)
 
template<typename Tp , typename... _Extra>
std::vector< Tp, _Extra... > & operator*= (std::vector< Tp, _Extra... > &, const std::vector< Tp, _Extra... > &)
 
template<typename Lhs , typename Rhs , typename... _Extra, enable_if_t< std::is_arithmetic< decay_t< Rhs > >::value, int > = 0>
std::vector< Lhs, _Extra... > & operator*= (std::vector< Lhs, _Extra... > &, const Rhs &)
 
template<typename... Types>
std::tuple< Types... > & operator*= (std::tuple< Types... > &, const std::tuple< Types... > &)
 
template<typename... Lhs, typename Rhs , enable_if_t< std::is_arithmetic< decay_t< Rhs > >::value, int > = 0>
std::tuple< Lhs... > & operator*= (std::tuple< Lhs... > &, const Rhs &)
 
template<typename Tp , size_t N>
std::array< Tp, N > & operator/= (std::array< Tp, N > &, const std::array< Tp, N > &)
 
template<typename Lhs , size_t N, typename Rhs , enable_if_t< std::is_arithmetic< decay_t< Rhs > >::value, int > = 0>
std::array< Lhs, N > & operator/= (std::array< Lhs, N > &, const Rhs &)
 
template<typename Lhs , typename Rhs >
std::pair< Lhs, Rhs > & operator/= (std::pair< Lhs, Rhs > &, const std::pair< Lhs, Rhs > &)
 
template<typename Lhs , typename Rhs , typename ArithT , enable_if_t< std::is_arithmetic< decay_t< ArithT > >::value, int > = 0>
std::pair< Lhs, Rhs > & operator/= (std::pair< Lhs, Rhs > &, const ArithT &)
 
template<typename Tp , typename... _Extra>
std::vector< Tp, _Extra... > & operator/= (std::vector< Tp, _Extra... > &, const std::vector< Tp, _Extra... > &)
 
template<typename Lhs , typename Rhs , typename... _Extra, enable_if_t< std::is_arithmetic< decay_t< Rhs > >::value, int > = 0>
std::vector< Lhs, _Extra... > & operator/= (std::vector< Lhs, _Extra... > &, const Rhs &)
 
template<typename... Types>
std::tuple< Types... > & operator/= (std::tuple< Types... > &, const std::tuple< Types... > &)
 
template<typename... Lhs, typename Rhs , enable_if_t< std::is_arithmetic< decay_t< Rhs > >::value, int > = 0>
std::tuple< Lhs... > & operator/= (std::tuple< Lhs... > &, const Rhs &)
 
template<typename Lhs , typename Rhs , enable_if_t< std::is_arithmetic< decay_t< Rhs > >::value, int > = 0>
Lhs operator* (Lhs, const Rhs &)
 
template<typename Lhs , typename Rhs , enable_if_t< std::is_arithmetic< decay_t< Rhs > >::value, int > = 0>
Lhs operator/ (Lhs, const Rhs &)
 
template<typename Tp , size_t N>
std::array< Tp, N > operator+ (std::array< Tp, N > lhs, const std::array< Tp, N > &rhs)
 
template<typename... Types>
std::tuple< Types... > operator+ (std::tuple< Types... > lhs, const std::tuple< Types... > &rhs)
 
template<typename Lhs , typename Rhs >
std::pair< Lhs, Rhs > operator+ (std::pair< Lhs, Rhs > lhs, const std::pair< Lhs, Rhs > &rhs)
 
template<typename Tp , typename... Extra>
std::vector< Tp, Extra... > operator+ (std::vector< Tp, Extra... > lhs, const std::vector< Tp, Extra... > &rhs)
 
template<typename Tp , size_t N>
std::array< Tp, N > operator- (std::array< Tp, N > lhs, const std::array< Tp, N > &rhs)
 
template<typename... Types>
std::tuple< Types... > operator- (std::tuple< Types... > lhs, const std::tuple< Types... > &rhs)
 
template<typename Lhs , typename Rhs >
std::pair< Lhs, Rhs > operator- (std::pair< Lhs, Rhs > lhs, const std::pair< Lhs, Rhs > &rhs)
 
template<typename Tp , typename... Extra>
std::vector< Tp, Extra... > operator- (std::vector< Tp, Extra... > lhs, const std::vector< Tp, Extra... > &rhs)
 
template<typename Tp , size_t N>
std::array< Tp, N > operator* (std::array< Tp, N > lhs, const std::array< Tp, N > &rhs)
 
template<typename... Types>
std::tuple< Types... > operator* (std::tuple< Types... > lhs, const std::tuple< Types... > &rhs)
 
template<typename Lhs , typename Rhs >
std::pair< Lhs, Rhs > operator* (std::pair< Lhs, Rhs > lhs, const std::pair< Lhs, Rhs > &rhs)
 
template<typename Tp , typename... Extra>
std::vector< Tp, Extra... > operator* (std::vector< Tp, Extra... > lhs, const std::vector< Tp, Extra... > &rhs)
 
template<typename Tp , size_t N>
std::array< Tp, N > operator/ (std::array< Tp, N > lhs, const std::array< Tp, N > &rhs)
 
template<typename... Types>
std::tuple< Types... > operator/ (std::tuple< Types... > lhs, const std::tuple< Types... > &rhs)
 
template<typename Lhs , typename Rhs >
std::pair< Lhs, Rhs > operator/ (std::pair< Lhs, Rhs > lhs, const std::pair< Lhs, Rhs > &rhs)
 
template<typename Tp , typename... Extra>
std::vector< Tp, Extra... > operator/ (std::vector< Tp, Extra... > lhs, const std::vector< Tp, Extra... > &rhs)
 
template<typename Tp , size_t N, typename OtherT >
std::array< Tp, N > & operator+= (std::array< Tp, N > &lhs, OtherT &&rhs)
 
template<typename Lhs , typename Rhs , typename OtherT >
std::pair< Lhs, Rhs > & operator+= (std::pair< Lhs, Rhs > &lhs, OtherT &&rhs)
 
template<typename Tp , typename... ExtraT, typename OtherT >
std::vector< Tp, ExtraT... > & operator+= (std::vector< Tp, ExtraT... > &lhs, OtherT &&rhs)
 
template<typename... Types, typename OtherT >
std::tuple< Types... > & operator+= (std::tuple< Types... > &lhs, OtherT &&rhs)
 
template<typename Tp , typename... ExtraT>
std::vector< Tp, ExtraT... > & operator-= (std::vector< Tp, ExtraT... > &lhs, const std::vector< Tp, ExtraT... > &rhs)
 
template<typename Tp , typename... ExtraT>
std::vector< Tp, ExtraT... > & operator*= (std::vector< Tp, ExtraT... > &lhs, const std::vector< Tp, ExtraT... > &rhs)
 
template<typename Tp , typename... ExtraT>
std::vector< Tp, ExtraT... > & operator/= (std::vector< Tp, ExtraT... > &lhs, const std::vector< Tp, ExtraT... > &rhs)
 
template<typename Lhs , typename Rhs , typename... ExtraT, enable_if_t< std::is_arithmetic< decay_t< Rhs > >::value, int > >
std::vector< Lhs, ExtraT... > & operator*= (std::vector< Lhs, ExtraT... > &lhs, const Rhs &rhs)
 
template<typename Lhs , typename Rhs , typename... ExtraT, enable_if_t< std::is_arithmetic< decay_t< Rhs > >::value, int > >
std::vector< Lhs, ExtraT... > & operator/= (std::vector< Lhs, ExtraT... > &lhs, const Rhs &rhs)
 
template<typename Rhs , enable_if_t< std::is_arithmetic< decay_t< Rhs > >::value, int > = 0>
std::chrono::system_clock::time_point & operator/= (std::chrono::system_clock::time_point &lhs, Rhs)
 
template<typename T >
auto invoke_preinit (int) -> decltype(std::declval< T >().preinit(), void())
 
template<typename T >
auto invoke_preinit (long)
 
template<typename Bundle , typename EnumT , typename... Args>
void configure (std::initializer_list< EnumT > components, Args &&... args)
 
template<typename Bundle , typename... Args>
void configure (const std::initializer_list< std::string > &components, Args &&... args)
 
template<typename Bundle , typename... ExtraArgs, template< typename, typename... > class Container, typename... Args>
void configure (const Container< std::string, ExtraArgs... > &components, Args &&... args)
 this is for initializing with a container of string More...
 
template<typename Bundle , typename... Args>
void configure (const std::string &components, Args &&... args)
 this is for initializing with a string More...
 
template<typename Bundle , template< typename, typename... > class Container, typename Intp , typename... ExtraArgs, typename... Args, typename std::enable_if< std::is_integral< Intp >::value||std::is_same< Intp, TIMEMORY_NATIVE_COMPONENT >::value, int >::type >
void configure (const Container< Intp, ExtraArgs... > &components, Args &&... args)
 
template<typename Bundle , template< typename, typename... > class Container, typename... ExtraArgs, typename... Args>
void configure (const Container< const char *, ExtraArgs... > &components, Args &&... args)
 
template<typename Bundle , typename... Args>
void configure (const int ncomponents, const int *components, Args &&... args)
 
template<typename StringT , typename... ExtraArgs, template< typename, typename... > class Container>
std::vector< TIMEMORY_COMPONENTenumerate_components (const Container< StringT, ExtraArgs... > &component_names)
 description: use this function to generate an array of enumerations from a list of string that can be subsequently used to initialize an auto_list or a component_list More...
 
std::set< TIMEMORY_COMPONENTenumerate_components (const std::initializer_list< std::string > &component_names)
 
template<typename StringT = std::string>
std::vector< TIMEMORY_COMPONENTenumerate_components (const std::string &names, const StringT &env_id="")
 
template<typename... ExtraArgs>
std::set< TIMEMORY_COMPONENTenumerate_components (const std::set< std::string, ExtraArgs... > &component_names)
 
template<template< typename... > class CompList, typename... CompTypes, typename EnumT = int>
void initialize (CompList< CompTypes... > &obj, std::initializer_list< EnumT > components)
 
template<template< typename... > class CompList, typename... CompTypes>
void initialize (CompList< CompTypes... > &obj, std::initializer_list< std::string > components)
 
template<template< typename... > class CompList, typename... CompTypes, typename... ExtraArgs, template< typename, typename... > class Container>
void initialize (CompList< CompTypes... > &obj, const Container< std::string, ExtraArgs... > &components)
 
template<template< typename... > class CompList, typename... CompTypes>
void initialize (CompList< CompTypes... > &obj, const std::string &components)
 this is for initializing with a string More...
 
template<template< typename... > class CompList, typename... CompTypes, template< typename, typename... > class Container, typename Intp , typename... ExtraArgs, typename std::enable_if< std::is_integral< Intp >::value||std::is_same< Intp, TIMEMORY_NATIVE_COMPONENT >::value, int >::type >
void initialize (CompList< CompTypes... > &obj, const Container< Intp, ExtraArgs... > &components)
 description: use this function to initialize a auto_list or component_list from a list of enumerations More...
 
template<template< typename... > class CompList, typename... CompTypes, template< typename, typename... > class Container, typename... ExtraArgs>
void initialize (CompList< CompTypes... > &obj, const Container< const char *, ExtraArgs... > &components)
 
template<template< typename... > class CompList, typename... CompTypes>
void initialize (CompList< CompTypes... > &obj, const int ncomponents, const int *components)
 
template<size_t Idx, typename Type , template< size_t, typename > class Bundle, typename EnumT = int>
void insert (Bundle< Idx, Type > &obj, std::initializer_list< EnumT > components)
 
template<size_t Idx, typename Type , template< size_t, typename > class Bundle>
void insert (Bundle< Idx, Type > &obj, const std::initializer_list< std::string > &components)
 
template<size_t Idx, typename Type , template< size_t, typename > class Bundle, typename... ExtraArgs, template< typename, typename... > class Container>
void insert (Bundle< Idx, Type > &obj, const Container< std::string, ExtraArgs... > &components)
 this is for initializing with a container of string More...
 
template<size_t Idx, typename Type , template< size_t, typename > class Bundle>
void insert (Bundle< Idx, Type > &obj, const std::string &components)
 this is for initializing with a string More...
 
template<size_t Idx, typename Type , template< size_t, typename > class Bundle, template< typename, typename... > class Container, typename Intp , typename... ExtraArgs, typename std::enable_if< std::is_integral< Intp >::value||std::is_same< Intp, TIMEMORY_NATIVE_COMPONENT >::value, int >::type >
void insert (Bundle< Idx, Type > &obj, const Container< Intp, ExtraArgs... > &components)
 description: use this function to insert tools into a bundle More...
 
template<size_t Idx, typename Type , template< size_t, typename > class Bundle, template< typename, typename... > class Container, typename... ExtraArgs>
void insert (Bundle< Idx, Type > &obj, const Container< const char *, ExtraArgs... > &components)
 
template<size_t Idx, typename Type , template< size_t, typename > class Bundle>
void insert (Bundle< Idx, Type > &obj, const int ncomponents, const int *components)
 
template<typename T , typename... Args>
void initialize (T *obj, Args &&... args)
 
template<typename T , typename... Args>
void insert (T *obj, Args &&... args)
 
template<typename Bundle_t , template< typename, typename... > class Container, typename Intp , typename... ExtraArgs, typename... Args, typename std::enable_if< std::is_integral< Intp >::value||std::is_same< Intp, TIMEMORY_NATIVE_COMPONENT >::value, int >::type = 0>
void configure (const Container< Intp, ExtraArgs... > &components, Args &&...)
 description: use this function to insert tools into a bundle More...
 
TIMEMORY_SETTINGS_INLINE std::string get_local_datetime (const char *dt_format, std::time_t *dt_curr)
 
 TIMEMORY_SETTINGS_MEMBER_DEF (string_t, config_file, TIMEMORY_SETTINGS_KEY("CONFIG_FILE")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("SUPPRESS_PARSING")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("SUPPRESS_CONFIG")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("ENABLED")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("AUTO_OUTPUT")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("COUT_OUTPUT")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("FILE_OUTPUT")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("TEXT_OUTPUT")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("JSON_OUTPUT")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("TREE_OUTPUT")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("DART_OUTPUT")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("TIME_OUTPUT")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("PLOT_OUTPUT")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("DIFF_OUTPUT")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("FLAMEGRAPH_OUTPUT")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("CTEST_NOTES")) TIMEMORY_SETTINGS_MEMBER_DEF(int
 
 TIMEMORY_SETTINGS_KEY ("VERBOSE")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("DEBUG")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("BANNER")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("COLLAPSE_THREADS")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("COLLAPSE_PROCESSES")) TIMEMORY_SETTINGS_MEMBER_DEF(uint16_t
 
 TIMEMORY_SETTINGS_KEY ("MAX_DEPTH")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("TIME_FORMAT")) TIMEMORY_SETTINGS_MEMBER_DEF(int16_t
 
 TIMEMORY_SETTINGS_KEY ("PRECISION")) TIMEMORY_SETTINGS_MEMBER_DEF(int16_t
 
 TIMEMORY_SETTINGS_KEY ("WIDTH")) TIMEMORY_SETTINGS_MEMBER_DEF(int32_t
 
 TIMEMORY_SETTINGS_KEY ("MAX_WIDTH")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("SCIENTIFIC")) TIMEMORY_SETTINGS_MEMBER_DEF(int16_t
 
 TIMEMORY_SETTINGS_KEY ("TIMING_PRECISION")) TIMEMORY_SETTINGS_MEMBER_DEF(int16_t
 
 TIMEMORY_SETTINGS_KEY ("TIMING_WIDTH")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("TIMING_UNITS")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("TIMING_SCIENTIFIC")) TIMEMORY_SETTINGS_MEMBER_DEF(int16_t
 
 TIMEMORY_SETTINGS_KEY ("MEMORY_PRECISION")) TIMEMORY_SETTINGS_MEMBER_DEF(int16_t
 
 TIMEMORY_SETTINGS_KEY ("MEMORY_WIDTH")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("MEMORY_UNITS")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("MEMORY_SCIENTIFIC")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("OUTPUT_PATH")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("OUTPUT_PREFIX")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("INPUT_PATH")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("INPUT_PREFIX")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("INPUT_EXTENSIONS")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("DART_TYPE")) TIMEMORY_SETTINGS_MEMBER_DEF(uint64_t
 
 TIMEMORY_SETTINGS_KEY ("DART_COUNT")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("DART_LABEL")) TIMEMORY_SETTINGS_MEMBER_DEF(size_t
 
 TIMEMORY_SETTINGS_KEY ("MAX_THREAD_BOOKMARKS")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("CPU_AFFINITY")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("STACK_CLEARING")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("ADD_SECONDARY")) TIMEMORY_SETTINGS_MEMBER_DEF(size_t
 
 TIMEMORY_SETTINGS_KEY ("THROTTLE_COUNT")) TIMEMORY_SETTINGS_MEMBER_DEF(size_t
 
 TIMEMORY_SETTINGS_KEY ("THROTTLE_VALUE")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("GLOBAL_COMPONENTS")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("TUPLE_COMPONENTS")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("LIST_COMPONENTS")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("OMPT_COMPONENTS")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("MPIP_COMPONENTS")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("NCCLP_COMPONENTS")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("TRACE_COMPONENTS")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("PROFILER_COMPONENTS")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("KOKKOS_COMPONENTS")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("COMPONENTS")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("MPI_INIT")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("MPI_FINALIZE")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("MPI_THREAD")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("MPI_THREAD_TYPE")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("UPCXX_INIT")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("UPCXX_FINALIZE")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("PAPI_THREADING")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("PAPI_MULTIPLEXING")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("PAPI_FAIL_ON_ERROR")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("PAPI_QUIET")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("PAPI_EVENTS")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("PAPI_ATTACH")) TIMEMORY_SETTINGS_MEMBER_DEF(int
 
 TIMEMORY_SETTINGS_KEY ("PAPI_OVERFLOW")) TIMEMORY_SETTINGS_MEMBER_DEF(uint64_t
 
 TIMEMORY_SETTINGS_KEY ("CUDA_EVENT_BATCH_SIZE")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("NVTX_MARKER_DEVICE_SYNC")) TIMEMORY_SETTINGS_MEMBER_DEF(int32_t
 
 TIMEMORY_SETTINGS_KEY ("CUPTI_ACTIVITY_LEVEL")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("CUPTI_ACTIVITY_KINDS")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("CUPTI_EVENTS")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("CUPTI_METRICS")) TIMEMORY_SETTINGS_MEMBER_DEF(int
 
 TIMEMORY_SETTINGS_KEY ("CUPTI_DEVICE")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("ROOFLINE_MODE")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("ROOFLINE_MODE_CPU")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("ROOFLINE_MODE_GPU")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("ROOFLINE_EVENTS_CPU")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("ROOFLINE_EVENTS_GPU")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("ROOFLINE_TYPE_LABELS")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("ROOFLINE_TYPE_LABELS_CPU")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("ROOFLINE_TYPE_LABELS_GPU")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("INSTRUCTION_ROOFLINE")) TIMEMORY_SETTINGS_MEMBER_DEF(uint64_t
 
 TIMEMORY_SETTINGS_KEY ("ERT_NUM_THREADS")) TIMEMORY_SETTINGS_MEMBER_DEF(uint64_t
 
 TIMEMORY_SETTINGS_KEY ("ERT_NUM_THREADS_CPU")) TIMEMORY_SETTINGS_MEMBER_DEF(uint64_t
 
 TIMEMORY_SETTINGS_KEY ("ERT_NUM_THREADS_GPU")) TIMEMORY_SETTINGS_MEMBER_DEF(uint64_t
 
 TIMEMORY_SETTINGS_KEY ("ERT_NUM_STREAMS")) TIMEMORY_SETTINGS_MEMBER_DEF(uint64_t
 
 TIMEMORY_SETTINGS_KEY ("ERT_GRID_SIZE")) TIMEMORY_SETTINGS_MEMBER_DEF(uint64_t
 
 TIMEMORY_SETTINGS_KEY ("ERT_BLOCK_SIZE")) TIMEMORY_SETTINGS_MEMBER_DEF(uint64_t
 
 TIMEMORY_SETTINGS_KEY ("ERT_ALIGNMENT")) TIMEMORY_SETTINGS_MEMBER_DEF(uint64_t
 
 TIMEMORY_SETTINGS_KEY ("ERT_MIN_WORKING_SIZE")) TIMEMORY_SETTINGS_MEMBER_DEF(uint64_t
 
 TIMEMORY_SETTINGS_KEY ("ERT_MIN_WORKING_SIZE_CPU")) TIMEMORY_SETTINGS_MEMBER_DEF(uint64_t
 
 TIMEMORY_SETTINGS_KEY ("ERT_MIN_WORKING_SIZE_GPU")) TIMEMORY_SETTINGS_MEMBER_DEF(uint64_t
 
 TIMEMORY_SETTINGS_KEY ("ERT_MAX_DATA_SIZE")) TIMEMORY_SETTINGS_MEMBER_DEF(uint64_t
 
 TIMEMORY_SETTINGS_KEY ("ERT_MAX_DATA_SIZE_CPU")) TIMEMORY_SETTINGS_MEMBER_DEF(uint64_t
 
 TIMEMORY_SETTINGS_KEY ("ERT_MAX_DATA_SIZE_GPU")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("ERT_SKIP_OPS")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("CRAYPAT")) TIMEMORY_SETTINGS_MEMBER_DEF(int32_t
 
 TIMEMORY_SETTINGS_KEY ("NODE_COUNT")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("DESTRUCTOR_REPORT")) TIMEMORY_SETTINGS_MEMBER_DEF(string_t
 
 TIMEMORY_SETTINGS_KEY ("PYTHON_EXE")) TIMEMORY_SETTINGS_MEMBER_DEF(int64_t
 
 TIMEMORY_SETTINGS_KEY ("SEPARATOR_FREQ")) TIMEMORY_SETTINGS_MEMBER_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("ENABLE_SIGNAL_HANDLER")) TIMEMORY_SETTINGS_REFERENCE_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("ALLOW_SIGNAL_HANDLER")) TIMEMORY_SETTINGS_REFERENCE_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("ENABLE_ALL_SIGNALS")) TIMEMORY_SETTINGS_REFERENCE_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("DISABLE_ALL_SIGNALS")) TIMEMORY_SETTINGS_REFERENCE_DEF(bool
 
 TIMEMORY_SETTINGS_KEY ("FLAT_PROFILE")) TIMEMORY_SETTINGS_REFERENCE_DEF(bool
 
 TIMEMORY_SETTINGS_LINKAGE (vsettings::display_map_t) vsettings
 
 TIMEMORY_SETTINGS_LINKAGE (bool) vsettings
 
template<typename Tp >
storage_singleton< Tp > * get_storage_singleton ()
 
template<typename T >
void print_graph_bracketed (const graph< T > &t, std::ostream &os=std::cout)
 
template<typename T >
void print_subgraph_bracketed (const graph< T > &t, typename graph< T >::iterator root, std::ostream &os=std::cout)
 
template<typename T , typename Formatter = std::function<std::string(const T&)>>
void print_graph (const tim::graph< T > &t, Formatter format, std::ostream &str=std::cout)
 
template<typename T , typename Formatter = std::function<std::string(const T&)>>
void print_subgraph (const tim::graph< T > &t, Formatter format, typename tim::graph< T >::iterator root, std::ostream &str=std::cout)
 
template<typename T >
void print_graph (const tim::graph< T > &t, std::ostream &str)
 
template<typename T , typename Formatter = std::function<std::string(const T&)>>
void print_graph_hierarchy (const tim::graph< T > &t, Formatter format, std::ostream &str=std::cout)
 
template<typename T , typename Formatter = std::function<std::string(const T&)>>
void print_subgraph_hierarchy (const tim::graph< T > &t, Formatter format, typename tim::graph< T >::iterator root, std::ostream &str=std::cout)
 
void insert_and_remove (const sys_signal &_type, signal_settings::signal_set_t *_ins, signal_settings::signal_set_t *_rem)
 
template<typename T >
from_string (const std::string &str)
 
template<typename T >
from_string (const char *cstr)
 
template<typename ContainerT = std::vector<std::string>, typename PredicateT = std::function<std::string(const std::string&)>>
ContainerT delimit (const std::string &line, const std::string &delimiters="\"',;: ", PredicateT &&predicate=[](const std::string &s) -> std::string { return s;})
 
template<typename PredicateT = std::function<std::string(const std::string&)>>
std::string str_transform (const std::string &input, const std::string &_begin, const std::string &_end, PredicateT &&predicate)
 apply a string transformation to substring inbetween a common delimiter. e.g. More...
 
std::string demangle (const char *_mangled_name, int *_status=nullptr)
 
std::string demangle (const std::string &_str, int *_status=nullptr)
 
template<typename Tp >
auto try_demangle ()
 
template<typename Tp >
auto demangle ()
 
 TIMEMORY_UTILITY_LINKAGE (bool) launch_process(const char *cmd
 
 if (delim.size()< 2)
 
_args fill (nullptr)
 
_args at (0)
 
_args at (1)
 
_args at (2)
 
 if (fp==nullptr)
 
 if (os)
 
 if (ec !=0)
 
bool launch_process (const char *cmd, const std::string &extra="", std::ostream *os=nullptr)
 
template<typename Tp , typename ApiT = TIMEMORY_API, size_t N = 4, typename MutexT = mutex_t>
MutexT & type_mutex (uint64_t _n=0)
 A simple way to get a mutex for a class or common behavior, e.g. type_mutex<decltype(std::cout)>() provides a mutex for synchronizing output streams. Recommend using in conjunction with auto-lock: tim::auto_lock_t _lk{ type_mutex<Foo>() }. More...
 
template<typename FuncT , typename TraitsT = mpl::function_traits<FuncT>>
std::string mangle (const std::string &func)
 
bool enable_signal_detection (signal_settings::signal_set_t=signal_settings::get_default())
 
template<typename Tp , enable_if_t<!std::is_enum< Tp >::value &&std::is_integral< Tp >::value > = 0>
bool enable_signal_detection (std::initializer_list< Tp > &&)
 
void disable_signal_detection ()
 
void update_signal_detection (const signal_settings::signal_set_t &_signals)
 
template<typename... ArgsT>
void consume_parameters (ArgsT &&...)
 
std::string dirname (std::string _fname)
 
int makedir (std::string _dir, int umask)
 
bool get_bool (const std::string &strbool, bool _default) noexcept
 
std::vector< std::string > read_command_line (pid_t _pid)
 
template<typename Tp >
bool isfinite (const Tp &arg)
 
template<typename Tp >
auto typeid_hash ()
 
template<typename T >
size_t get_hash (T &&obj)
 
size_t get_hash (string_view_cref_t str)
 
size_t get_hash (const char *cstr)
 
template<typename Tag , typename... Types>
auto get (const auto_bundle< Tag, Types... > &_obj)
 
template<typename Tag , typename... Types>
auto get_labeled (const auto_bundle< Tag, Types... > &_obj)
 
template<typename... Types>
auto get (const auto_list< Types... > &_obj)
 
template<typename... Types>
auto get_labeled (const auto_list< Types... > &_obj)
 
template<typename... Types>
auto get (const auto_tuple< Types... > &_obj)
 
template<typename... Types>
auto get_labeled (const auto_tuple< Types... > &_obj)
 
template<typename... Types>
auto get (const component_bundle< Types... > &_obj) -> decltype(std::declval< component_bundle< Types... > >().get())
 
template<typename... Types>
auto get_labeled (const component_bundle< Types... > &_obj) -> decltype(std::declval< component_bundle< Types... > >().get_labeled())
 
template<typename... Types>
auto get (const component_list< Types... > &_obj) -> decltype(std::declval< component_list< Types... > >().get())
 
template<typename... Types>
auto get_labeled (const component_list< Types... > &_obj) -> decltype(std::declval< component_list< Types... > >().get_labeled())
 
template<typename... Types>
auto get (const component_tuple< Types... > &_obj) -> decltype(std::declval< component_tuple< Types... > >().get())
 
template<typename... Types>
auto get_labeled (const component_tuple< Types... > &_obj) -> decltype(std::declval< component_tuple< Types... > >().get_labeled())
 
template<typename... Types>
auto get (const lightweight_tuple< Types... > &_obj) -> decltype(std::declval< lightweight_tuple< Types... > >().get())
 
template<typename... Types>
auto get_labeled (const lightweight_tuple< Types... > &_obj) -> decltype(std::declval< lightweight_tuple< Types... > >().get_labeled())
 

Variables

char ** argv
 
char const std::string & _prefix
 
char const std::string const std::string & _suffix
 
std::string exe_name = (argc > 0) ? argv[0] : ""
 
size_t pos = std::string::npos
 
char argparse::argument_parserparser
 
char argparse::argument_parser tim::settings_settings
 
if argc return
 
auto help_action
 
auto err_action
 
bool _cleanup_parser = parser == nullptr
 
bool _cleanup_settings = _settings == nullptr
 
hash_value_t _hash_id
 
const hash_alias_ptr_t_hash_alias
 
const hash_alias_ptr_t hash_value_t hash_value_t _alias_hash_id
 
auto _alias_itr = _hash_alias->find(_hash_id)
 
const hash_alias_ptr_t hash_value_t std::string *& _ret
 
auto _map_itr = _hash_map->find(_hash_id)
 
 true
 
return false
 
 suppress_parsing
 
 suppress_config
 
 enabled
 
 auto_output
 
 cout_output
 
 file_output
 
 text_output
 
 json_output
 
 tree_output
 
 dart_output
 
 time_output
 
 plot_output
 
 diff_output
 
 flamegraph_output
 
 ctest_notes
 
 verbose
 
 debug
 
 banner
 
 collapse_threads
 
 collapse_processes
 
 max_depth
 
 time_format
 
 precision
 
 width
 
 max_width
 
 scientific
 
 timing_precision
 
 timing_width
 
 timing_units
 
 timing_scientific
 
 memory_precision
 
 memory_width
 
 memory_units
 
 memory_scientific
 
 output_path
 
 output_prefix
 
 input_path
 
 input_prefix
 
 input_extensions
 
 dart_type
 
 dart_count
 
 dart_label
 
 max_thread_bookmarks
 
 cpu_affinity
 
 stack_clearing
 
 add_secondary
 
 throttle_count
 
 throttle_value
 
 global_components
 
 tuple_components
 
 list_components
 
 ompt_components
 
 mpip_components
 
 ncclp_components
 
 trace_components
 
 profiler_components
 
 kokkos_components
 
 components
 
 mpi_init
 
 mpi_finalize
 
 mpi_thread
 
 mpi_thread_type
 
 upcxx_init
 
 upcxx_finalize
 
 papi_threading
 
 papi_multiplexing
 
 papi_fail_on_error
 
 papi_quiet
 
 papi_events
 
 papi_attach
 
 papi_overflow
 
 cuda_event_batch_size
 
 nvtx_marker_device_sync
 
 cupti_activity_level
 
 cupti_activity_kinds
 
 cupti_events
 
 cupti_metrics
 
 cupti_device
 
 roofline_mode
 
 cpu_roofline_mode
 
 gpu_roofline_mode
 
 cpu_roofline_events
 
 gpu_roofline_events
 
 roofline_type_labels
 
 roofline_type_labels_cpu
 
 roofline_type_labels_gpu
 
 instruction_roofline
 
 ert_num_threads
 
 ert_num_threads_cpu
 
 ert_num_threads_gpu
 
 ert_num_streams
 
 ert_grid_size
 
 ert_block_size
 
 ert_alignment
 
 ert_min_working_size
 
 ert_min_working_size_cpu
 
 ert_min_working_size_gpu
 
 ert_max_data_size
 
 ert_max_data_size_cpu
 
 ert_max_data_size_gpu
 
 ert_skip_ops
 
 craypat_categories
 
 node_count
 
 destructor_report
 
 python_exe
 
 separator_frequency
 
 enable_signal_handler
 
 allow_signal_handler
 
 enable_all_signals
 
 disable_all_signals
 
 flat_profile
 
 timeline_profile
 
const std::string & extra
 
const std::string std::ostream * os
 
tim::popen::TIMEMORY_PIPEfp = nullptr
 
 else
 
std::array< char *, 4 > _args
 
char * _cshell = getenv("SHELL")
 
char * _ushell = getusershell()
 
std::string _shell = (_cshell) ? _cshell : (_ushell) ? getusershell() : "/bin/sh"
 
auto ec = tim::popen::pclose(fp)
 
return true
 

Detailed Description

Extern template declarations


Class Documentation

◆ tim::auto_base_bundle

class tim::auto_base_bundle
template<typename... Types>
class tim::auto_base_bundle< Types >

Static polymorphic base class for automatic start/stop bundlers.

Definition at line 72 of file types.hpp.

+ Collaboration diagram for tim::auto_base_bundle< Types >:

◆ tim::auto_bundle

class tim::auto_bundle
template<typename... Types>
class tim::auto_bundle< Types >

This is a variadic component wrapper which combines the features of tim::auto_tuple<T...> and tim::auto_list<U..>. The "T" types (compile-time fixed, allocated on stack) should be specified as usual, the "U" types (runtime-time optional, allocated on the heap) should be specified as a pointer. Initialization of the optional types is similar to tim::auto_list<U...> but no environment variable is built-in since, ideally, this environment variable should be customized based on the Tag template parameter.

Template Parameters
Tagunique identifying type for the bundle which when tim::trait::is_available<Tag> is false at compile-time or tim::trait::runtime_enabled<Tag>() is false at runtime, then none of the components will be collected
TypesSpecification of the component types to bundle together
// dummy type identifying the context
struct FooApi {};
void foo_init() // user initialization routine
{
bundle_t::get_initializer() = [](bundle_t& b)
{
static auto env_enum = tim::enumerate_components(
tim::delimit(tim::get_env<string_t>("FOO_COMPONENTS", "wall_clock")));
:im::initialize(b, env_enum);
};
}
void bar()
{
// will record whichever components are specified by "FOO_COMPONENT" in
// environment, which "wall_clock" as the default
auto bar = bundle_t("foo");
// ...
}
int main(int argc, char** argv)
{
foo_init();
bar();
}
void timemory_finalize()
finalization of the specified types
void initialize(CompList< CompTypes... > &obj, std::initializer_list< EnumT > components)
Definition: initialize.hpp:53
std::vector< TIMEMORY_COMPONENT > enumerate_components(const Container< StringT, ExtraArgs... > &component_names)
description: use this function to generate an array of enumerations from a list of string that can be...
Definition: enumerate.hpp:62
void timemory_init(Args &&... _args)
Definition: config.hpp:49
char ** argv
Definition: config.cpp:55
ContainerT delimit(const std::string &line, const std::string &delimiters="\"',;: ", PredicateT &&predicate=[](const std::string &s) -> std::string { return s;})
Definition: delimit.hpp:68
This is a variadic component wrapper which combines the features of tim::auto_tuple<T....
Definition: types.hpp:75

The above code will record wall-clock, cpu-clock, and peak-rss. The intermediate storage will happen on the stack and when the destructor is called, it will add itself to the call-graph

Definition at line 75 of file types.hpp.

+ Collaboration diagram for tim::auto_bundle< Types >:

◆ tim::auto_hybrid

class tim::auto_hybrid
template<typename CompTuple, typename CompList>
class tim::auto_hybrid< CompTuple, CompList >

Definition at line 34 of file auto_hybrid.hpp.

+ Collaboration diagram for tim::auto_hybrid< CompTuple, CompList >:

◆ tim::available_types

struct tim::available_types
template<typename Tp>
struct tim::available_types< Tp >

Definition at line 219 of file types.hpp.

+ Collaboration diagram for tim::available_types< Tp >:

◆ tim::bundle

class tim::bundle
template<typename... Tp>
class tim::bundle< Tp >

Static polymorphic base class for component bundlers.

Definition at line 51 of file bundle.hpp.

+ Collaboration diagram for tim::bundle< Tp >:

◆ tim::complete_types

struct tim::complete_types
template<typename Tp>
struct tim::complete_types< Tp >

Definition at line 206 of file types.hpp.

+ Collaboration diagram for tim::complete_types< Tp >:

◆ tim::component_bundle

class tim::component_bundle
template<typename... Types>
class tim::component_bundle< Types >

This is a variadic component wrapper which combines the features of tim::component_tuple<T...> and tim::component_list<U..>. The "T" types (compile-time fixed, allocated on stack) should be specified as usual, the "U" types (runtime-time optional, allocated on the heap) should be specified as a pointer. Initialization of the optional types is similar to tim::auto_list<U...> but no environment variable is built-in since, ideally, this environment variable should be customized based on the Tag template parameter.

Template Parameters
Tagunique identifying type for the bundle which when tim::trait::is_available<Tag> is false at compile-time or tim::trait::runtime_enabled<Tag>() is false at runtime, then none of the components will be collected
TypesSpecification of the component types to bundle together

See also: tim::auto_bundle. The primary difference b/t the "component_*" and "auto_*" is that the latter used the constructor/destructor to call start and stop and is thus easier to just copy-and-paste into different places. However, the former is better suited for special configuration, data-access, etc.

Definition at line 63 of file types.hpp.

+ Collaboration diagram for tim::component_bundle< Types >:

◆ tim::component_hybrid

class tim::component_hybrid
template<typename CompTuple, typename CompList>
class tim::component_hybrid< CompTuple, CompList >

Definition at line 34 of file component_hybrid.hpp.

+ Collaboration diagram for tim::component_hybrid< CompTuple, CompList >:

◆ tim::identity

struct tim::identity
template<typename T>
struct tim::identity< T >

Definition at line 211 of file types.hpp.

+ Collaboration diagram for tim::identity< T >:
Class Members
typedef T type

◆ tim::remove_pointers

struct tim::remove_pointers
template<typename Tp>
struct tim::remove_pointers< Tp >

Definition at line 69 of file types.hpp.

+ Collaboration diagram for tim::remove_pointers< Tp >:

◆ tim::remove_pointers< Tuple< Tp... > >

struct tim::remove_pointers< Tuple< Tp... > >
template<template< typename... > class Tuple, typename... Tp>
struct tim::remove_pointers< Tuple< Tp... > >

Definition at line 72 of file types.hpp.

+ Collaboration diagram for tim::remove_pointers< Tuple< Tp... > >:
Class Members
typedef Tuple< remove_pointer_t< Tp >... > type

◆ tim::type_list

struct tim::type_list
template<typename... Tp>
struct tim::type_list< Tp >

lightweight tuple-alternative for meta-programming logic

Definition at line 232 of file types.hpp.

+ Collaboration diagram for tim::type_list< Tp >:

Typedef Documentation

◆ add_pointer_t

template<typename U >
using tim::add_pointer_t = typedef conditional_t<(std::is_pointer<U>::value), U, U*>

Definition at line 572 of file types.hpp.

◆ apply_transform_t

template<template< typename > class CheckT, bool CheckV, template< typename > class TransformT, typename T , typename U >
using tim::apply_transform_t = typedef typename impl::apply_transform<CheckT, CheckV, TransformT, T, U>::type

Definition at line 865 of file types.hpp.

◆ auto_bundle_t

template<typename Tag , typename... T>
using tim::auto_bundle_t = typedef convert_t<mpl::available_t<type_list<T...> >, auto_bundle<Tag> >

Definition at line 352 of file available.hpp.

◆ auto_list_t

template<typename... T>
using tim::auto_list_t = typedef convert_t<mpl::available_t<concat<T...> >, auto_list<> >

Definition at line 349 of file available.hpp.

◆ auto_lock_t

std::unique_lock< std::recursive_mutex > tim::auto_lock_t

Unique lock type around mutex_t.

Definition at line 42 of file locking.hpp.

◆ auto_timer

Definition at line 65 of file auto_timer.hpp.

◆ auto_timer_list_t

Definition at line 64 of file auto_timer.hpp.

◆ auto_timer_t

using tim::auto_timer_t = typedef auto_timer

Definition at line 71 of file auto_timer.hpp.

◆ auto_timer_tuple_t

Definition at line 63 of file auto_timer.hpp.

◆ auto_tuple_t

template<typename... T>
using tim::auto_tuple_t = typedef convert_t<mpl::available_t<concat<T...> >, auto_tuple<> >

Definition at line 346 of file available.hpp.

◆ auto_user_bundle_t

using tim::auto_user_bundle_t = typedef auto_bundle<TIMEMORY_API, component::user_global_bundle>

Definition at line 36 of file auto_user_bundle.hpp.

◆ available_auto_list_t

Definition at line 251 of file types.hpp.

◆ available_auto_tuple_t

Definition at line 252 of file types.hpp.

◆ available_component_list_t

Definition at line 249 of file types.hpp.

◆ available_component_tuple_t

◆ available_list_t

Definition at line 259 of file types.hpp.

◆ available_tuple_t

using tim::available_tuple_t = typedef convert_t<available_types_t, std::tuple<> >

Definition at line 248 of file types.hpp.

◆ available_types_t

using tim::available_types_t = typedef typename available_types<std::make_index_sequence<TIMEMORY_COMPONENTS_END> >::type

Definition at line 235 of file types.hpp.

◆ common_singleton

using tim::common_singleton = typedef singleton<void, void, void>

Definition at line 103 of file singleton.hpp.

◆ complete_auto_list_t

Definition at line 243 of file types.hpp.

◆ complete_auto_tuple_t

Definition at line 244 of file types.hpp.

◆ complete_component_list_t

Definition at line 241 of file types.hpp.

◆ complete_component_tuple_t

Definition at line 242 of file types.hpp.

◆ complete_list_t

Definition at line 258 of file types.hpp.

◆ complete_tuple_t

using tim::complete_tuple_t = typedef convert_t<complete_types_t, std::tuple<> >

Definition at line 240 of file types.hpp.

◆ complete_types_t

using tim::complete_types_t = typedef typename complete_types<std::make_index_sequence<TIMEMORY_COMPONENTS_END> >::type

Definition at line 232 of file types.hpp.

◆ component_bundle_t

template<typename Tag , typename... T>
using tim::component_bundle_t = typedef convert_t<mpl::available_t<type_list<T...> >, component_bundle<Tag> >

Definition at line 336 of file available.hpp.

◆ component_hybrid_t

template<typename... T>
using tim::component_hybrid_t = typedef typename component_hybrid<T...>::type

Definition at line 99 of file component_hybrid.hpp.

◆ component_list_t

template<typename... T>
using tim::component_list_t = typedef convert_t<mpl::available_t<concat<T...> >, component_list<> >

Definition at line 343 of file available.hpp.

◆ component_tuple_t

template<typename... T>
using tim::component_tuple_t = typedef convert_t<mpl::available_t<concat<T...> >, component_tuple<> >

Definition at line 340 of file available.hpp.

◆ concat

template<typename... Types>
using tim::concat = typedef typename impl::concat<Types...>::type

Definition at line 707 of file types.hpp.

◆ conditional_t

template<bool B, typename Lhs , typename Rhs >
using tim::conditional_t = typedef typename std::conditional<B, Lhs, Rhs>::type

Definition at line 197 of file types.hpp.

◆ contains_one_of

template<template< typename > class Predicate, typename Types >
using tim::contains_one_of = typedef typename impl::contains_one_of<Predicate, Types>

check if type is in expansion

Definition at line 783 of file types.hpp.

◆ contains_one_of_t

template<template< typename > class Predicate, typename Types >
using tim::contains_one_of_t = typedef typename contains_one_of<Predicate, Types>::type

Definition at line 786 of file types.hpp.

◆ convert_each_t

template<template< typename... > class T, typename... U>
using tim::convert_each_t = typedef typename impl::convert_each<T, U...>::type

Definition at line 858 of file types.hpp.

◆ convert_t

template<typename T , typename U >
using tim::convert_t = typedef typename impl::convert<T, U>::type

Definition at line 855 of file types.hpp.

◆ decay_t

template<typename T >
using tim::decay_t = typedef typename std::decay<T>::type

Alias template for decay.

Definition at line 194 of file types.hpp.

◆ enable_if_t

template<bool B, typename T = int>
using tim::enable_if_t = typedef typename std::enable_if<B, T>::type

Alias template for enable_if.

Definition at line 190 of file types.hpp.

◆ full_auto_list_t

◆ full_auto_timer_t

◆ full_auto_tuple_t

◆ get_index_sequence_t

template<typename Tp >
using tim::get_index_sequence_t = typedef typename get_index_sequence<decay_t<Tp> >::type

Definition at line 850 of file types.hpp.

◆ global_bundle_t

using tim::global_bundle_t = typedef component_tuple<component::user_global_bundle>

Definition at line 263 of file types.hpp.

◆ identity_t

template<typename T >
using tim::identity_t = typedef typename identity<T>::type

Definition at line 217 of file types.hpp.

◆ index_of

template<typename Tp , typename Type >
using tim::index_of = typedef impl::index_of<Tp, Type>

Definition at line 575 of file types.hpp.

◆ index_sequence

template<size_t... Idx>
using tim::index_sequence = typedef std::integer_sequence<size_t, Idx...>

Alias template index_sequence.

Definition at line 178 of file types.hpp.

◆ index_sequence_for

template<typename... Types>
using tim::index_sequence_for = typedef std::make_index_sequence<sizeof...(Types)>

Alias template index_sequence_for.

Definition at line 186 of file types.hpp.

◆ is_empty_t

template<typename T >
using tim::is_empty_t = typedef typename concepts::is_empty<T>::type

Definition at line 540 of file concepts.hpp.

◆ is_heap_wrapper_t

template<typename T >
using tim::is_heap_wrapper_t = typedef typename concepts::is_heap_wrapper<T>::type

Definition at line 552 of file concepts.hpp.

◆ is_one_of

template<typename Tp , typename Types >
using tim::is_one_of = typedef typename impl::is_one_of<Tp, Types>

check if type is in expansion

Definition at line 777 of file types.hpp.

◆ is_stack_wrapper_t

Definition at line 549 of file concepts.hpp.

◆ is_variadic_t

template<typename T >
using tim::is_variadic_t = typedef typename concepts::is_variadic<T>::type

Definition at line 543 of file concepts.hpp.

◆ is_wrapper_t

template<typename T >
using tim::is_wrapper_t = typedef typename concepts::is_wrapper<T>::type

Definition at line 546 of file concepts.hpp.

◆ lightweight_tuple_t

template<typename... T>
using tim::lightweight_tuple_t = typedef convert_t<mpl::available_t<concat<T...> >, lightweight_tuple<> >

Definition at line 355 of file available.hpp.

◆ make_index_sequence

template<size_t Num>
using tim::make_index_sequence = typedef std::make_integer_sequence<size_t, Num>

Alias template make_index_sequence.

Definition at line 182 of file types.hpp.

◆ make_integer_sequence

template<typename Tp , Tp Num>
using tim::make_integer_sequence = typedef std::make_integer_sequence<Tp, Num>

Alias template make_integer_sequence.

Definition at line 174 of file types.hpp.

◆ minimal_auto_list_t

◆ minimal_auto_timer_t

◆ minimal_auto_tuple_t

◆ mpip_bundle_t

using tim::mpip_bundle_t = typedef component_tuple<component::user_mpip_bundle>

Definition at line 265 of file types.hpp.

◆ mutex_t

std::recursive_mutex tim::mutex_t

Recursive mutex is used for convenience since the performance penalty vs. a regular mutex is not really an issue since there are not many locks in general.

Definition at line 38 of file locking.hpp.

◆ ncclp_bundle_t

using tim::ncclp_bundle_t = typedef component_tuple<component::user_ncclp_bundle>

Definition at line 266 of file types.hpp.

◆ ompt_bundle_t

using tim::ompt_bundle_t = typedef component_tuple<component::user_ompt_bundle>

Definition at line 264 of file types.hpp.

◆ parser_err_t

Definition at line 265 of file config.cpp.

◆ parser_t

Definition at line 264 of file config.cpp.

◆ priority_constant

template<int N>
using tim::priority_constant = typedef std::integral_constant<int, N>

Definition at line 206 of file types.hpp.

◆ push_back_t

template<typename Tuple , typename T >
using tim::push_back_t = typedef typename mpl::push_back<Tuple, T>::type

Definition at line 1087 of file types.hpp.

◆ remove_const_t

template<typename T >
using tim::remove_const_t = typedef typename std::remove_const<T>::type

Definition at line 203 of file types.hpp.

◆ remove_cv_t

template<typename T >
using tim::remove_cv_t = typedef typename std::remove_cv<T>::type

Definition at line 200 of file types.hpp.

◆ remove_pointer_t

template<typename U >
using tim::remove_pointer_t = typedef typename std::remove_pointer<U>::type

Definition at line 569 of file types.hpp.

◆ remove_pointers_t

template<typename Tp >
using tim::remove_pointers_t = typedef typename remove_pointers<Tp>::type

Definition at line 78 of file types.hpp.

◆ stl_tuple_t

template<typename... T>
using tim::stl_tuple_t = typedef convert_t<mpl::available_t<concat<T...> >, std::tuple<> >

Definition at line 330 of file available.hpp.

◆ storage_singleton

template<typename Tp >
using tim::storage_singleton = typedef singleton<Tp, std::unique_ptr<Tp, impl::storage_deleter<Tp> >, TIMEMORY_API>

Definition at line 176 of file types.hpp.

◆ string

using tim::string = typedef tim::mpl::apply<std::string>

Definition at line 53 of file macros.hpp.

◆ string_t

using tim::string_t = typedef std::string

Definition at line 98 of file utility.hpp.

◆ string_view_cref_t

using tim::string_view_cref_t = typedef const std::string&

Definition at line 103 of file language.hpp.

◆ string_view_t

using tim::string_view_t = typedef std::string

Definition at line 102 of file language.hpp.

◆ tuple_concat_t

template<typename... Ts>
using tim::tuple_concat_t = typedef typename impl::tuple_concat<Ts...>::type

Definition at line 563 of file types.hpp.

◆ type_concat_t

template<typename... Ts>
using tim::type_concat_t = typedef typename impl::type_concat<Ts...>::type

Definition at line 566 of file types.hpp.

◆ type_list_element_t

template<size_t Idx, typename Tp >
using tim::type_list_element_t = typedef typename type_list_element<Idx, Tp>::type

Definition at line 273 of file types.hpp.

◆ type_list_t

template<typename... T>
using tim::type_list_t = typedef convert_t<mpl::available_t<concat<T...> >, type_list<> >

Definition at line 333 of file available.hpp.

◆ unwrap_t

template<typename T >
using tim::unwrap_t = typedef typename impl::unwrapper<T>::type

Definition at line 861 of file types.hpp.

Enumeration Type Documentation

◆ sys_signal

enum class tim::sys_signal : int
strong
Enumerator
Hangup 
Interrupt 
Quit 
Illegal 
Trap 
Abort 
Emulate 
FPE 
Kill 
Bus 
SegFault 
System 
Pipe 
Alarm 
Terminate 
Urgent 
Stop 
CPUtime 
FileSize 
VirtualAlarm 
ProfileAlarm 
User1 
User2 

Definition at line 68 of file declaration.hpp.

69{
70 Hangup = SIGHUP, // 1
71 Interrupt = SIGINT, // 2
72 Quit = SIGQUIT, // 3
73 Illegal = SIGILL,
74 Trap = SIGTRAP,
75 Abort = SIGABRT,
76 Emulate = SIGEMT,
77 FPE = SIGFPE,
78 Kill = SIGKILL,
79 Bus = SIGBUS,
80 SegFault = SIGSEGV,
81 System = SIGSYS,
82 Pipe = SIGPIPE,
83 Alarm = SIGALRM,
84 Terminate = SIGTERM,
85 Urgent = SIGURG,
86 Stop = SIGTSTP,
87 CPUtime = SIGXCPU,
88 FileSize = SIGXFSZ,
89 VirtualAlarm = SIGVTALRM,
90 ProfileAlarm = SIGPROF,
91 User1 = SIGUSR1,
92 User2 = SIGUSR2
93};

Function Documentation

◆ add_argument()

parser tim::add_argument ( )

Definition at line 310 of file config.cpp.

311 { "--timemory-args" })

◆ at() [1/3]

◆ at() [2/3]

_args tim::at ( )

◆ at() [3/3]

_args tim::at ( )

◆ configure() [1/8]

template<typename Bundle , template< typename, typename... > class Container, typename... ExtraArgs, typename... Args>
void tim::configure ( const Container< const char *, ExtraArgs... > &  components,
Args &&...  args 
)

Definition at line 108 of file configure.hpp.

109{
110 std::unordered_set<std::string> _components;
111 for(auto itr : components)
112 _components.insert(std::string(itr));
113 configure<Bundle>(_components, std::forward<Args>(args)...);
114}
tim::mpl::apply< std::string > string
Definition: macros.hpp:53
components
Definition: settings.cpp:1700

References components.

◆ configure() [2/8]

template<typename Bundle , template< typename, typename... > class Container, typename Intp , typename... ExtraArgs, typename... Args, typename std::enable_if< std::is_integral< Intp >::value||std::is_same< Intp, TIMEMORY_NATIVE_COMPONENT >::value, int >::type >
void tim::configure ( const Container< Intp, ExtraArgs... > &  components,
Args &&...  args 
)

Definition at line 97 of file configure.hpp.

98{
99 for(auto itr : components)
100 runtime::configure<Bundle>(itr, std::forward<Args>(args)...);
101}

References components.

◆ configure() [3/8]

template<typename Bundle_t , template< typename, typename... > class Container, typename Intp , typename... ExtraArgs, typename... Args, typename std::enable_if< std::is_integral< Intp >::value||std::is_same< Intp, TIMEMORY_NATIVE_COMPONENT >::value, int >::type = 0>
void tim::configure ( const Container< Intp, ExtraArgs... > &  components,
Args &&  ... 
)

description: use this function to insert tools into a bundle

usage: using namespace tim::component; using optional_t = tim::auto_tuple<user_global_bundle>;

tim::configure<user_global_bundle>({ CPU_CLOCK, CPU_UTIL });

auto obj = new optional_t(FUNCTION, LINE); typename... ExtraArgs required because of extra "hidden" template parameters in STL containers

◆ configure() [4/8]

template<typename Bundle , typename... ExtraArgs, template< typename, typename... > class Container, typename... Args>
void tim::configure ( const Container< std::string, ExtraArgs... > &  components,
Args &&...  args 
)

this is for initializing with a container of string

Definition at line 71 of file configure.hpp.

72{
73 configure<Bundle>(enumerate_components(components), std::forward<Args>(args)...);
74}

References components, and enumerate_components().

◆ configure() [5/8]

template<typename Bundle , typename... Args>
void tim::configure ( const int  ncomponents,
const int *  components,
Args &&...  args 
)

Definition at line 120 of file configure.hpp.

121{
122 for(int i = 0; i < ncomponents; ++i)
123 runtime::configure<Bundle>(components[i], std::forward<Args>(args)...);
124}

References components.

◆ configure() [6/8]

template<typename Bundle , typename... Args>
void tim::configure ( const std::initializer_list< std::string > &  components,
Args &&...  args 
)

Definition at line 59 of file configure.hpp.

60{
61 configure<Bundle>(enumerate_components(components), std::forward<Args>(args)...);
62}

References components, and enumerate_components().

◆ configure() [7/8]

template<typename Bundle , typename... Args>
void tim::configure ( const std::string &  components,
Args &&...  args 
)

this is for initializing with a string

Definition at line 82 of file configure.hpp.

83{
85 std::forward<Args>(args)...);
86}

References components, delimit(), and enumerate_components().

◆ configure() [8/8]

template<typename Bundle , typename EnumT , typename... Args>
void tim::configure ( std::initializer_list< EnumT >  components,
Args &&...  args 
)

Definition at line 50 of file configure.hpp.

51{
52 configure<Bundle>(std::vector<EnumT>(components), std::forward<Args>(args)...);
53}

References components.

Referenced by tim::sampling::sampler< CompT< Types... >, N, SigIds... >::configure(), and tim::sampling::sampler< CompT< Types... >, N, SigIds... >::start().

◆ consume_parameters()

◆ delimit()

template<typename ContainerT = std::vector<std::string>, typename PredicateT = std::function<std::string(const std::string&)>>
ContainerT tim::delimit ( const std::string &  line,
const std::string &  delimiters = "\"',;: ",
PredicateT &&  predicate = [](const std::string& s) -> std::string { return s; } 
)
inline

Definition at line 68 of file delimit.hpp.

69 : ",
70 PredicateT&& predicate = [](const std::string& s) -> std::string { return s; })
71{
72 ContainerT _result{};
73 size_t _beginp = 0; // position that is the beginning of the new string
74 size_t _delimp = 0; // position of the delimiter in the string
75 while(_beginp < line.length() && _delimp < line.length())
76 {
77 // find the first character (starting at _delimp) that is not a delimiter
78 _beginp = line.find_first_not_of(delimiters, _delimp);
79 // if no a character after or at _end that is not a delimiter is not found
80 // then we are done
81 if(_beginp == std::string::npos)
82 break;
83 // starting at the position of the new string, find the next delimiter
84 _delimp = line.find_first_of(delimiters, _beginp);
85 std::string _tmp{};
86 try
87 {
88 // starting at the position of the new string, get the characters
89 // between this position and the next delimiter
90 _tmp = line.substr(_beginp, _delimp - _beginp);
91 } catch(std::exception& e)
92 {
93 // print the exception but don't fail, unless maybe it should?
94 fprintf(stderr, "%s\n", e.what());
95 }
96 // don't add empty strings
97 if(!_tmp.empty())
98 {
99 _result.insert(_result.end(), predicate(_tmp));
100 }
101 }
102 return _result;
103}

Referenced by configure(), tim::env::configure(), description(), enumerate_components(), tim::env::get_bundle_components(), tim::component::cupti_counters::get_event_initializer(), tim::component::cupti_activity::get_initializer(), tim::component::papi_common::get_initializer(), tim::component::network_stats::get_interfaces(), tim::component::cupti_counters::get_metric_initializer(), tim::ert::configuration< DeviceT, Tp, CounterT >::get_skip_ops(), tim::settings::init_config(), initialize(), tim::env::initialize(), insert(), tim::env::insert(), tim::settings::read(), tim::popen::read_fork(), tim::operation::finalize::print< Tp, true >::setup(), and tim::data::stream::write_banner().

◆ demangle() [1/3]

template<typename Tp >
auto tim::demangle ( )
inline

Definition at line 152 of file demangle.hpp.

153{
154 // static because a type demangle will always be the same
155 static auto _val = demangle(typeid(Tp).name());
156 return _val;
157}
auto demangle()
Definition: demangle.hpp:152

References demangle().

Referenced by try_demangle().

◆ demangle() [2/3]

std::string tim::demangle ( const char *  _mangled_name,
int *  _status = nullptr 
)
inline

Definition at line 47 of file demangle.hpp.

48{
49#if defined(TIMEMORY_ENABLE_DEMANGLE)
50 // return the mangled since there is no buffer
51 if(!_mangled_name)
52 return std::string{};
53
54 int _ret = 0;
55 std::string _demangled_name{ _mangled_name };
56 if(!_status)
57 _status = &_ret;
58
59 // PARAMETERS to __cxa_demangle
60 // mangled_name:
61 // A NULL-terminated character string containing the name to be demangled.
62 // buffer:
63 // A region of memory, allocated with malloc, of *length bytes, into which the
64 // demangled name is stored. If output_buffer is not long enough, it is expanded
65 // using realloc. output_buffer may instead be NULL; in that case, the demangled
66 // name is placed in a region of memory allocated with malloc.
67 // _buflen:
68 // If length is non-NULL, the length of the buffer containing the demangled name
69 // is placed in *length.
70 // status:
71 // *status is set to one of the following values
72 char* _demang = abi::__cxa_demangle(_mangled_name, nullptr, nullptr, _status);
73 switch(*_status)
74 {
75 // 0 : The demangling operation succeeded.
76 // -1 : A memory allocation failiure occurred.
77 // -2 : mangled_name is not a valid name under the C++ ABI mangling rules.
78 // -3 : One of the arguments is invalid.
79 case 0:
80 {
81 if(_demang)
82 _demangled_name = std::string{ _demang };
83 break;
84 }
85 case -1:
86 {
87 char _msg[1024];
88 ::memset(_msg, '\0', 1024 * sizeof(char));
89 ::snprintf(_msg, 1024, "memory allocation failure occurred demangling %s",
90 _mangled_name);
91 ::perror(_msg);
92 break;
93 }
94 case -2: break;
95 case -3:
96 {
97 char _msg[1024];
98 ::memset(_msg, '\0', 1024 * sizeof(char));
99 ::snprintf(_msg, 1024, "Invalid argument in: (\"%s\", nullptr, nullptr, %p)",
100 _mangled_name, (void*) _status);
101 ::perror(_msg);
102 break;
103 }
104 default: break;
105 };
106
107 // free allocated buffer
108 ::free(_demang);
109 return _demangled_name;
110#else
111 (void) _status;
112 return _mangled_name;
113#endif
114}
const hash_alias_ptr_t hash_value_t std::string *& _ret
Definition: definition.hpp:300

Referenced by tim::operation::finalize::mpi_get< Type, true >::mpi_get(), tim::component::gotcha< Nt, BundleT, DiffT >::construct(), demangle(), tim::ert::configuration< DeviceT, Tp, CounterT >::get_executor(), tim::component::cpu_roofline< Types >::get_type_string(), tim::component::gpu_roofline< Types >::get_type_string(), tim::operation::finalize::mpi_get< Type, true >::operator()(), tim::operation::finalize::upc_get< Type, true >::operator()(), and tim::operation::finalize::get< Type, true >::operator()().

◆ demangle() [3/3]

std::string tim::demangle ( const std::string &  _str,
int *  _status = nullptr 
)
inline

Definition at line 119 of file demangle.hpp.

120{
121 return demangle(_str.c_str(), _status);
122}

References demangle().

◆ description()

tim::description ( "A generic option for any setting. Each argument MUST be passed in " "form: '  NAME = VALUE'. E.g. --timemory-args " "\"papi_events=PAPI_TOT_INS,PAPI_TOT_CYC\" text_output=off") &

Definition at line 312 of file config.cpp.

313 : 'NAME=VALUE'. E.g. --timemory-args "
314 "\"papi_events=PAPI_TOT_INS,PAPI_TOT_CYC\" text_output=off")
315 .action([&](parser_t& p) {
316 // get the options
317 auto vopt = p.get<std::vector<std::string>>("timemory-args");
318 for(auto& str : vopt)
319 {
320 // get the args
321 auto vec = tim::delimit(str, " \t;:");
322 for(const auto& itr : vec)
323 {
324 DEBUG_PRINT_HERE("Processing: %s", itr.c_str());
325 auto _pos = itr.find('=');
326 auto _key = itr.substr(0, _pos);
327 auto _val = (_pos == std::string::npos) ? "" : itr.substr(_pos + 1);
328 if(!_settings->update(_key, _val, false))
329 {
330 std::cerr << "[timemory_argparse]> Warning! For "
331 "--timemory-args, key \""
332 << _key << "\" is not a recognized setting. \"" << _val
333 << "\" was not applied." << std::endl;
334 }
335 }
336 }
337 });
char argparse::argument_parser tim::settings * _settings
Definition: config.cpp:255
arg_result get(size_t _idx, Tp &_value)
Definition: argparse.hpp:674
#define DEBUG_PRINT_HERE(...)
Definition: macros.hpp:168

References _settings, DEBUG_PRINT_HERE, delimit(), and tim::argparse::argument_parser::get().

Referenced by tim::operation::finalize::print< Tp, true >::print(), tim::argparse::argument_parser::enable_help(), tim::operation::finalize::print< Tp, true >::setup(), and tim::operation::finalize::print< Tp, true >::update_data().

◆ dirname()

TIMEMORY_UTILITY_INLINE std::string tim::dirname ( std::string  _fname)

Definition at line 40 of file utility.cpp.

41{
42#if defined(TIMEMORY_UNIX)
43 char* _cfname = realpath(_fname.c_str(), nullptr);
44 _fname = std::string(_cfname);
45 free(_cfname);
46
47 while(_fname.find("\\\\") != std::string::npos)
48 _fname.replace(_fname.find("\\\\"), 2, "/");
49 while(_fname.find('\\') != std::string::npos)
50 _fname.replace(_fname.find('\\'), 1, "/");
51
52 return _fname.substr(0, _fname.find_last_of('/'));
53#elif defined(TIMEMORY_WINDOWS)
54 while(_fname.find('/') != std::string::npos)
55 _fname.replace(_fname.find('/'), 1, "\\");
56
57 _fname = _fname.substr(0, _fname.find_last_of('\\'));
58 return (_fname.at(_fname.length() - 1) == '\\')
59 ? _fname.substr(0, _fname.length() - 1)
60 : _fname;
61#endif
62}

◆ disable_signal_detection()

void tim::disable_signal_detection ( )
inline

Definition at line 379 of file signals.hpp.

380{}

Referenced by update_signal_detection().

◆ enable_help()

parser tim::enable_help ( )

◆ enable_signal_detection() [1/2]

bool tim::enable_signal_detection ( signal_settings::signal_set_t  = signal_settings::get_default())
inline

Definition at line 368 of file signals.hpp.

368{ return false; }

Referenced by if(), and update_signal_detection().

◆ enable_signal_detection() [2/2]

template<typename Tp , enable_if_t<!std::is_enum< Tp >::value &&std::is_integral< Tp >::value > = 0>
bool tim::enable_signal_detection ( std::initializer_list< Tp > &&  )
inline

Definition at line 373 of file signals.hpp.

374{
375 return false;
376}

◆ enumerate_components() [1/4]

template<typename StringT , typename... ExtraArgs, template< typename, typename... > class Container>
std::vector< TIMEMORY_COMPONENT > tim::enumerate_components ( const Container< StringT, ExtraArgs... > &  component_names)

description: use this function to generate an array of enumerations from a list of string that can be subsequently used to initialize an auto_list or a component_list

usage: using namespace tim::component; using optional_t = tim::auto_list<wall_clock, cpu_clock, cpu_util, cuda_event>;

auto obj = new optional_t(FUNCTION, LINE); tim::initialize(*obj, tim::enumerate_components({ "cpu_clock", "cpu_util"}));

Definition at line 62 of file enumerate.hpp.

63{
64 std::set<TIMEMORY_COMPONENT> _set;
65 for(const auto& itr : component_names)
66 _set.insert(runtime::enumerate(std::string(itr)));
67 std::vector<TIMEMORY_COMPONENT> _vec;
68 _vec.reserve(_set.size());
69 for(auto&& itr : _set)
70 _vec.emplace_back(itr);
71 return _vec;
72}
int enumerate(const std::string &key)
Definition: properties.hpp:258

References tim::runtime::enumerate().

Referenced by configure(), tim::env::configure(), enumerate_components(), tim::env::get_bundle_components(), tim::env::initialize(), initialize(), insert(), tim::env::insert(), timemory_add_components(), timemory_begin_record_types(), timemory_get_begin_record_types(), and timemory_remove_components().

◆ enumerate_components() [2/4]

std::set< TIMEMORY_COMPONENT > tim::enumerate_components ( const std::initializer_list< std::string > &  component_names)
inline

Definition at line 77 of file enumerate.hpp.

78{
79 return enumerate_components(std::set<std::string>(component_names));
80}
std::set< TIMEMORY_COMPONENT > enumerate_components(const std::set< std::string, ExtraArgs... > &component_names)
Definition: enumerate.hpp:101

References enumerate_components().

◆ enumerate_components() [3/4]

template<typename... ExtraArgs>
std::set< TIMEMORY_COMPONENT > tim::enumerate_components ( const std::set< std::string, ExtraArgs... > &  component_names)

Definition at line 101 of file enumerate.hpp.

102{
103 std::set<TIMEMORY_COMPONENT> vec;
104 for(const auto& itr : component_names)
105 vec.insert(runtime::enumerate(itr));
106 return vec;
107}

References tim::runtime::enumerate().

◆ enumerate_components() [4/4]

template<typename StringT = std::string>
std::vector< TIMEMORY_COMPONENT > tim::enumerate_components ( const std::string &  names,
const StringT &  env_id = "" 
)

Definition at line 86 of file enumerate.hpp.

87{
88 if(std::string(env_id).length() > 0)
89 {
90 return enumerate_components(tim::delimit(get_env<std::string>(env_id, names)));
91 }
92 {
94 }
95}

References delimit(), and enumerate_components().

◆ err_action()

tim::err_action ( parser->  parse_known_argsargc, argv, "--", settings::verbose())

◆ fill()

_args tim::fill ( nullptr  )

◆ finalize()

void tim::finalize ( )
inline

Definition at line 119 of file types.hpp.

120{
122}

References timemory_finalize().

◆ for() [1/5]

tim::for ( auto &itr :exe_name  )

Definition at line 96 of file config.cpp.

96 : exe_name)
97 {
98 if(itr == '_')
99 itr = '-';
100 }
std::string exe_name
Definition: config.cpp:77

◆ for() [2/5]

tim::for ( const auto &ext :_exe_suffixes  )

Definition at line 86 of file config.cpp.

86 : _exe_suffixes)
87 {
88 if(exe_name.find(ext) != std::string::npos)
89 exe_name.erase(exe_name.find(ext), ext.length() + 1);
90 }

References exe_name.

◆ for() [3/5]

tim::for ( const auto &itr :_settings->  ordering())

Definition at line 301 of file config.cpp.

301 : _settings->ordering())
302 {
303 auto sitr = _settings->find(itr);
304 if(sitr != _settings->end() && sitr->second)
305 {
306 sitr->second->add_argument(*parser);
307 }
308 }
char argparse::argument_parser & parser
Definition: config.cpp:187

References _settings, tim::argparse::argument_parser::add_argument(), and parser.

◆ from_string() [1/2]

template<typename T >
T tim::from_string ( const char *  cstr)
inline

Definition at line 53 of file delimit.hpp.

54{
55 std::stringstream ss{};
56 ss << cstr;
57 T val{};
58 ss >> val;
59 return val;
60}

◆ from_string() [2/2]

template<typename T >
T tim::from_string ( const std::string &  str)
inline

Definition at line 40 of file delimit.hpp.

41{
42 std::stringstream ss{};
43 ss << str;
44 T val{};
45 ss >> val;
46 return val;
47}

◆ generic_serialization() [1/3]

template<typename Tp , typename FuncT >
void tim::generic_serialization ( const std::string &  fname,
const Tp &  obj,
const std::string &  _main_name = "timemory",
const std::string &  _data_name = "data",
FuncT &&  _func = [](typename policy::output_archive_t<decay_t<Tp>>::type&) {} 
)

Definition at line 66 of file serialization.hpp.

69 {})
70{
71 std::ofstream ofs{};
72 if(filepath::open(ofs, fname))
73 {
74 // ensure json write final block during destruction before the file is closed
75 using policy_type = policy::output_archive_t<decay_t<Tp>>;
76 auto oa = policy_type::get(ofs);
77 oa->setNextName(_main_name.c_str());
78 oa->startNode();
79 _func(*oa);
80 (*oa)(cereal::make_nvp(_data_name.c_str(), obj));
81 oa->finishNode();
82 }
83 if(ofs)
84 ofs << std::endl;
85 ofs.close();
86}
bool open(std::ofstream &_ofs, std::string _fpath, Args &&... _args)
Definition: filepath.hpp:207
auto get(const auto_bundle< Tag, Types... > &_obj)

◆ generic_serialization() [2/3]

template<typename ArchiveT , typename ApiT = TIMEMORY_API, typename Tp , typename FuncT >
void tim::generic_serialization ( const std::string &  fname,
const Tp &  obj,
const std::string &  _main_name = "timemory",
const std::string &  _data_name = "data",
FuncT &&  _func = [](typename policy::output_archive_t<decay_t<Tp>>::type&) {} 
)

Definition at line 103 of file serialization.hpp.

106 {})
107{
108 static_assert(concepts::is_output_archive<ArchiveT>::value,
109 "Error! Not an output archive type");
110 std::ofstream ofs{};
111 if(filepath::open(ofs, fname))
112 {
113 // ensure json write final block during destruction before the file is closed
114 using policy_type = policy::output_archive<ArchiveT, ApiT>;
115 auto oa = policy_type::get(ofs);
116 oa->setNextName(_main_name.c_str());
117 oa->startNode();
118 _func(*oa);
119 (*oa)(cereal::make_nvp(_data_name.c_str(), obj));
120 oa->finishNode();
121 }
122 if(ofs)
123 ofs << std::endl;
124 ofs.close();
125}

◆ generic_serialization() [3/3]

template<typename ArchiveT , typename ApiT = TIMEMORY_API, typename Tp , typename FuncT >
void tim::generic_serialization ( std::ostream &  ofs,
const Tp &  obj,
const std::string &  _main_name = "timemory",
const std::string &  _data_name = "data",
FuncT &&  _func = [](typename policy::output_archive_t<decay_t<Tp>>::type&) {} 
)

Definition at line 142 of file serialization.hpp.

145 {})
146{
147 // ensure json write final block during destruction before the file is closed
148 using policy_type = policy::output_archive<ArchiveT, ApiT>;
149 auto oa = policy_type::get(ofs);
150
151 if(!_main_name.empty())
152 {
153 oa->setNextName(_main_name.c_str());
154 oa->startNode();
155 }
156
157 // execute the function with extra data
158 _func(*oa);
159
160 (*oa)(cereal::make_nvp(_data_name, obj));
161
162 if(!_main_name.empty())
163 {
164 oa->finishNode();
165 }
166}

◆ get() [1/7]

◆ get() [2/7]

template<typename... Types>
auto tim::get ( const auto_list< Types... > &  _obj)

Definition at line 143 of file auto_list.hpp.

144{
145 return get(_obj.get_component());
146}
auto get(tim::auto_list< Types... > &&obj) -> decltype(get< N >(std::forward< tim::auto_list< Types... > >(obj).data()))
Definition: auto_list.hpp:206

References get().

◆ get() [3/7]

template<typename... Types>
auto tim::get ( const auto_tuple< Types... > &  _obj)

Definition at line 117 of file auto_tuple.hpp.

118{
119 return get(_obj.get_component());
120}
auto get(tim::auto_tuple< Types... > &&obj) -> decltype(get< N >(std::forward< tim::auto_tuple< Types... > >(obj).data()))
Definition: auto_tuple.hpp:184

References get().

◆ get() [4/7]

template<typename... Types>
auto tim::get ( const component_bundle< Types... > &  _obj) -> decltype(std::declval<component_bundle<Types...>>().get())

Definition at line 111 of file component_bundle.hpp.

113{
114 return _obj.get();
115}

◆ get() [5/7]

template<typename... Types>
auto tim::get ( const component_list< Types... > &  _obj) -> decltype(std::declval<component_list<Types...>>().get())

Definition at line 130 of file component_list.hpp.

132{
133 return _obj.get();
134}

◆ get() [6/7]

template<typename... Types>
auto tim::get ( const component_tuple< Types... > &  _obj) -> decltype(std::declval<component_tuple<Types...>>().get())

Definition at line 112 of file component_tuple.hpp.

114{
115 return _obj.get();
116}

◆ get() [7/7]

template<typename... Types>
auto tim::get ( const lightweight_tuple< Types... > &  _obj) -> decltype(std::declval<lightweight_tuple<Types...>>().get())

Definition at line 767 of file lightweight_tuple.hpp.

769{
770 return _obj.get();
771}
auto get(Args &&...) const
generic

◆ get_bool()

TIMEMORY_UTILITY_INLINE bool tim::get_bool ( const std::string &  strbool,
bool  _default 
)
noexcept

Definition at line 75 of file utility.cpp.

76{
77 // empty string returns default
78 if(strbool.empty())
79 return _default;
80
81 // check if numeric
82 if(strbool.find_first_not_of("0123456789") == std::string::npos)
83 {
84 if(strbool.length() > 1 || strbool[0] != '0')
85 return true;
86 return false;
87 }
88
89 // convert to lowercase
90 auto _val = std::string{ strbool };
91 for(auto& itr : _val)
92 itr = tolower(itr);
93
94 // check for matches to acceptable forms of false
95 for(const auto& itr : { "off", "false", "no", "n", "f" })
96 {
97 if(_val == itr)
98 return false;
99 }
100
101 // check for matches to acceptable forms of true
102 for(const auto& itr : { "on", "true", "yes", "y", "t" })
103 {
104 if(_val == itr)
105 return true;
106 }
107
108 return _default;
109}

Referenced by tim::argparse::argument_parser::argument::get().

◆ get_env() [1/3]

template<>
bool tim::get_env ( const std::string &  env_id,
bool  _default,
bool  _store 
)

◆ get_env() [2/3]

template<>
std::string tim::get_env ( const std::string &  env_id,
std::string  _default,
bool  _store 
)

◆ get_env() [3/3]

template<typename Tp >
Tp tim::get_env ( const std::string &  env_id,
Tp  _default,
bool  _store 
)

Definition at line 176 of file declaration.hpp.

177{
178 if(env_id.empty())
179 return _default;
180
181 auto* _env_settings = env_settings::instance();
182 char* env_var = std::getenv(env_id.c_str());
183 if(env_var)
184 {
185 std::string str_var = std::string(env_var);
186 std::stringstream iss{ str_var };
187 auto var = Tp{};
188 iss >> var;
189 if(_env_settings && _store)
190 _env_settings->insert<Tp>(env_id, var);
191 return var;
192 }
193 // record default value
194 if(_env_settings && _store)
195 _env_settings->insert<Tp>(env_id, _default);
196
197 // return default if not specified in environment
198 return _default;
199}

References tim::env_settings::instance().

Referenced by tim::signal_settings::check_environment(), tim::env::configure(), tim::vsettings::get_debug(), tim::base::ring_buffer::init(), tim::env::initialize(), tim::env::insert(), and timemory_enable_pthread_gotcha_wrapper().

◆ get_env_choice()

template<typename Tp >
Tp tim::get_env_choice ( const std::string &  env_id,
Tp  _default,
std::set< Tp >  _choices,
bool  _store 
)

Definition at line 205 of file declaration.hpp.

206{
207 assert(!_choices.empty());
208 auto _choice = get_env<Tp>(env_id, _default, _store);
209
210 // check that the choice is valid
211 if(_choices.find(_choice) == _choices.end())
212 {
213 std::ostringstream _msg{};
214 _msg << "Error! Invalid value \"" << _choice << "\" for " << env_id
215 << ". Valid choices are: ";
216 std::ostringstream _opts{};
217 for(const auto& itr : _choices)
218 _opts << ", \"" << itr << "\"";
219 _msg << _opts.str().substr(2);
220 throw std::runtime_error(_msg.str());
221 }
222
223 return _choice;
224}

◆ get_labeled() [1/7]

template<typename Tag , typename... Types>
auto tim::get_labeled ( const auto_bundle< Tag, Types... > &  _obj)

Definition at line 161 of file auto_bundle.hpp.

162{
163 return get_labeled(_obj.get_component());
164}
auto get_labeled(const auto_bundle< Tag, Types... > &_obj)

References get_labeled().

Referenced by get_labeled().

◆ get_labeled() [2/7]

template<typename... Types>
auto tim::get_labeled ( const auto_list< Types... > &  _obj)

Definition at line 150 of file auto_list.hpp.

151{
152 return get_labeled(_obj.get_component());
153}
auto get_labeled(const auto_list< Types... > &_obj)
Definition: auto_list.hpp:150

References get_labeled().

◆ get_labeled() [3/7]

template<typename... Types>
auto tim::get_labeled ( const auto_tuple< Types... > &  _obj)

Definition at line 124 of file auto_tuple.hpp.

125{
126 return get_labeled(_obj.get_component());
127}
auto get_labeled(const auto_tuple< Types... > &_obj)
Definition: auto_tuple.hpp:124

References get_labeled().

◆ get_labeled() [4/7]

template<typename... Types>
auto tim::get_labeled ( const component_bundle< Types... > &  _obj) -> decltype(std::declval<component_bundle<Types...>>().get_labeled())

Definition at line 121 of file component_bundle.hpp.

123{
124 return _obj.get_labeled();
125}

◆ get_labeled() [5/7]

template<typename... Types>
auto tim::get_labeled ( const component_list< Types... > &  _obj) -> decltype(std::declval<component_list<Types...>>().get_labeled())

Definition at line 140 of file component_list.hpp.

142{
143 return _obj.get_labeled();
144}

◆ get_labeled() [6/7]

template<typename... Types>
auto tim::get_labeled ( const component_tuple< Types... > &  _obj) -> decltype(std::declval<component_tuple<Types...>>().get_labeled())

Definition at line 122 of file component_tuple.hpp.

124{
125 return _obj.get_labeled();
126}

◆ get_labeled() [7/7]

template<typename... Types>
auto tim::get_labeled ( const lightweight_tuple< Types... > &  _obj) -> decltype(std::declval<lightweight_tuple<Types...>>().get_labeled())

Definition at line 777 of file lightweight_tuple.hpp.

779{
780 return _obj.get_labeled();
781}
auto get_labeled(Args &&...) const
generic

◆ get_local_datetime()

std::string tim::get_local_datetime ( const char *  dt_format,
std::time_t *  dt_curr 
)

Definition at line 120 of file settings.cpp.

121{
122 char mbstr[512];
123 if(!dt_curr)
124 dt_curr = settings::get_launch_time(TIMEMORY_API{});
125
126 if(std::strftime(mbstr, sizeof(mbstr), dt_format, std::localtime(dt_curr)) != 0)
127 return std::string{ mbstr };
128 return std::string{};
129}

References tim::settings::get_launch_time(), and TIMEMORY_API.

Referenced by tim::settings::get_global_output_prefix().

◆ get_shared_ptr_lone_instance()

template<typename Tp , typename Tag , typename PtrT >
PtrT tim::get_shared_ptr_lone_instance ( )

Definition at line 77 of file declaration.hpp.

78{
79 static auto _instance = std::make_shared<Tp>();
80 return _instance;
81}

◆ get_shared_ptr_pair()

template<typename Tp , typename Tag , typename PtrT , typename PairT >
PairT & tim::get_shared_ptr_pair ( )

Definition at line 42 of file declaration.hpp.

43{
44 static auto _master = std::make_shared<Tp>();
45 static std::atomic<int64_t> _count{ 0 };
46 static thread_local auto _inst =
47 PairT{ _master, PtrT{ (_count++ == 0) ? nullptr : new Tp{} } };
48 return _inst;
49}

◆ get_shared_ptr_pair_instance()

template<typename Tp , typename Tag , typename PtrT , typename PairT >
PtrT tim::get_shared_ptr_pair_instance ( )

Definition at line 55 of file declaration.hpp.

56{
57 static thread_local auto& _pinst = get_shared_ptr_pair<Tp, Tag>();
58 static thread_local auto& _inst = _pinst.second ? _pinst.second : _pinst.first;
59 return _inst;
60}

◆ get_shared_ptr_pair_main_instance()

template<typename Tp , typename Tag , typename PtrT , typename PairT >
PtrT tim::get_shared_ptr_pair_main_instance ( )

Definition at line 66 of file declaration.hpp.

67{
68 static auto& _pinst = get_shared_ptr_pair<Tp, Tag>();
69 static auto _inst = _pinst.first;
70 return _inst;
71}

◆ get_storage_singleton()

template<typename Tp >
storage_singleton< Tp > * tim::get_storage_singleton ( )

Definition at line 75 of file declaration.hpp.

76{
77 using singleton_type = tim::storage_singleton<Tp>;
78 using component_type = typename Tp::component_type;
79 static auto _instance = (trait::runtime_enabled<component_type>::get())
80 ? std::make_unique<singleton_type>()
81 : std::unique_ptr<singleton_type>{};
82 static auto _dtor = scope::destructor{ []() { _instance.reset(); } };
83 return _instance.get();
84 consume_parameters(_dtor);
85}
Thread-safe singleton management.
Definition: singleton.hpp:112
void reset(pointer ptr)
Definition: singleton.hpp:388
void consume_parameters(ArgsT &&...)
Definition: types.hpp:285

References consume_parameters(), and tim::trait::runtime_enabled< T >::get().

◆ if() [1/19]

tim::if ( _cleanup_parser  )

◆ if() [2/19]

tim::if ( _cleanup_settings &&!  _shared_settings)

◆ if() [3/19]

tim::if ( _cleanup_settings  )

◆ if() [4/19]

tim::if ( _manager  )

Definition at line 139 of file config.cpp.

140 {
141 _manager->update_metadata_prefix();
142 _manager->initialize();
143 }

◆ if() [5/19]

tim::if ( _settings  )

Definition at line 59 of file config.cpp.

60 {
61 if(_settings->get_debug() || _settings->get_verbose() > 3)
62 PRINT_HERE("%s", "");
63
64 if(_settings->get_enable_signal_handler())
65 {
66 auto default_signals = signal_settings::get_default();
67 for(const auto& itr : default_signals)
68 signal_settings::enable(itr);
69 // should return default and any modifications from environment
70 auto enabled_signals = signal_settings::get_enabled();
71 enable_signal_detection(enabled_signals);
72 }
73
74 _settings->init_config();
75 }
bool enable_signal_detection(signal_settings::signal_set_t=signal_settings::get_default())
Definition: signals.hpp:368
#define PRINT_HERE(...)
Definition: macros.hpp:152

References _settings, tim::signal_settings::enable(), enable_signal_detection(), tim::signal_settings::get_default(), tim::signal_settings::get_enabled(), and PRINT_HERE.

◆ if() [6/19]

tim::if ( )

Definition at line 43 of file launch_process.cpp.

44 {
45 fp = tim::popen::popen(cmd, nullptr, nullptr);
46 }
TIMEMORY_PIPE * popen(const char *path, char **argv, char **envp)
Definition: popen.cpp:229
tim::popen::TIMEMORY_PIPE * fp

References tim::plotting::cmd, fp, and tim::popen::popen().

◆ if() [7/19]

tim::if ( ec = 0)

Definition at line 74 of file launch_process.cpp.

75 {
76 std::stringstream ss;
77 ss << "[timemory]> Command: '" << cmd << "' returned a non-zero exit code: " << ec
78 << "... " << extra;
79 perror(ss.str().c_str());
80 return false;
81 }
const std::string & extra
auto ec

References tim::plotting::cmd, ec, and extra.

◆ if() [8/19]

◆ if() [9/19]

tim::if ( fp  = = nullptr)

Definition at line 61 of file launch_process.cpp.

62 {
63 std::stringstream ss;
64 ss << "[timemory]> Error launching command: '" << cmd << "'... " << extra;
65 perror(ss.str().c_str());
66 return false;
67 }

References tim::plotting::cmd, and extra.

◆ if() [10/19]

tim::if ( os  )

Definition at line 68 of file launch_process.cpp.

69 {
71 }
std::ostream & flush_output(std::ostream &os, TIMEMORY_PIPE *proc, int max_counter)
Definition: popen.cpp:426
const std::string std::ostream * os

References tim::popen::flush_output(), fp, and os.

◆ if() [11/19]

tim::if ( parser->  exists"help")

◆ init()

template<typename... Args>
void tim::init ( Args &&...  args)

Definition at line 111 of file types.hpp.

112{
113 timemory_init(std::forward<Args>(args)...);
114}
void timemory_init(std::vector< std::string > &, argparse::argument_parser &parser, const std::string &_prefix="timemory-", const std::string &_suffix="-output")

References timemory_init().

Referenced by tim::bundle< Tag, BundleT, TupleT >::bundle(), tim::lightweight_tuple< Types >::lightweight_tuple(), and tim::component::papi_common::initialize_papi().

◆ initialize() [1/8]

template<template< typename... > class CompList, typename... CompTypes, template< typename, typename... > class Container, typename... ExtraArgs>
void tim::initialize ( CompList< CompTypes... > &  obj,
const Container< const char *, ExtraArgs... > &  components 
)

Definition at line 110 of file initialize.hpp.

112{
113 std::vector<std::string> _components;
114 _components.reserve(components.size());
115 for(auto itr : components)
116 _components.emplace_back(std::string(itr));
117 initialize(obj, _components);
118}
void initialize(CompList< CompTypes... > &obj, const int ncomponents, const int *components)
Definition: initialize.hpp:124

References components, and initialize().

◆ initialize() [2/8]

template<template< typename... > class CompList, typename... CompTypes, template< typename, typename... > class Container, typename Intp , typename... ExtraArgs, typename std::enable_if< std::is_integral< Intp >::value||std::is_same< Intp, TIMEMORY_NATIVE_COMPONENT >::value, int >::type >
void tim::initialize ( CompList< CompTypes... > &  obj,
const Container< Intp, ExtraArgs... > &  components 
)

description: use this function to initialize a auto_list or component_list from a list of enumerations

usage: using namespace tim::component; using optional_t = tim::auto_list<wall_clock, cpu_clock, cpu_util, cuda_event>; auto obj = new optional_t(FUNCTION, LINE); tim::initialize(*obj, { CPU_CLOCK, CPU_UTIL }); typename... ExtraArgs required because of extra "hidden" template parameters in STL containers

Definition at line 99 of file initialize.hpp.

100{
101 for(auto itr : components)
102 runtime::initialize(obj, itr);
103}

References components, and tim::runtime::initialize().

◆ initialize() [3/8]

template<template< typename... > class CompList, typename... CompTypes, typename... ExtraArgs, template< typename, typename... > class Container>
void tim::initialize ( CompList< CompTypes... > &  obj,
const Container< std::string, ExtraArgs... > &  components 
)
inline

Definition at line 72 of file initialize.hpp.

References components, enumerate_components(), and initialize().

◆ initialize() [4/8]

template<template< typename... > class CompList, typename... CompTypes>
void tim::initialize ( CompList< CompTypes... > &  obj,
const int  ncomponents,
const int *  components 
)

Definition at line 124 of file initialize.hpp.

125{
126 for(int i = 0; i < ncomponents; ++i)
128}

References components, and tim::runtime::initialize().

◆ initialize() [5/8]

template<template< typename... > class CompList, typename... CompTypes>
void tim::initialize ( CompList< CompTypes... > &  obj,
const std::string &  components 
)
inline

this is for initializing with a string

Definition at line 84 of file initialize.hpp.

References components, delimit(), enumerate_components(), and initialize().

◆ initialize() [6/8]

template<template< typename... > class CompList, typename... CompTypes, typename EnumT = int>
void tim::initialize ( CompList< CompTypes... > &  obj,
std::initializer_list< EnumT >  components 
)
inline

◆ initialize() [7/8]

template<template< typename... > class CompList, typename... CompTypes>
void tim::initialize ( CompList< CompTypes... > &  obj,
std::initializer_list< std::string >  components 
)
inline

Definition at line 62 of file initialize.hpp.

References components, enumerate_components(), and initialize().

◆ initialize() [8/8]

template<typename T , typename... Args>
void tim::initialize ( T *  obj,
Args &&...  args 
)

Definition at line 96 of file types.hpp.

97{
98 if(obj)
99 initialize(*obj, std::forward<Args>(args)...);
100}
void initialize(T *obj, Args &&... args)
Definition: types.hpp:271

References initialize().

◆ insert() [1/9]

template<size_t Idx, typename Type , template< size_t, typename > class Bundle, template< typename, typename... > class Container, typename... ExtraArgs>
void tim::insert ( Bundle< Idx, Type > &  obj,
const Container< const char *, ExtraArgs... > &  components 
)

Definition at line 105 of file insert.hpp.

106{
107 std::vector<std::string> _components;
108 _components.reserve(components.size());
109 for(auto itr : components)
110 _components.emplace_back(std::string(itr));
111 insert(obj, _components);
112}
void insert(Bundle< Idx, Type > &obj, const int ncomponents, const int *components)
Definition: insert.hpp:118

References components.

◆ insert() [2/9]

template<size_t Idx, typename Type , template< size_t, typename > class Bundle, template< typename, typename... > class Container, typename Intp , typename... ExtraArgs, typename std::enable_if< std::is_integral< Intp >::value||std::is_same< Intp, TIMEMORY_NATIVE_COMPONENT >::value, int >::type >
void tim::insert ( Bundle< Idx, Type > &  obj,
const Container< Intp, ExtraArgs... > &  components 
)

description: use this function to insert tools into a bundle

usage: using namespace tim::component; using optional_t = tim::auto_tuple<user_global_bundle>; auto obj = new optional_t(FUNCTION, LINE); tim::insert(obj.get<user_global_bundle>(), { CPU_CLOCK, CPU_UTIL }); typename... ExtraArgs required because of extra "hidden" template parameters in STL containers

Definition at line 94 of file insert.hpp.

95{
96 for(auto itr : components)
97 runtime::insert(obj, itr);
98}

References components, and tim::runtime::insert().

◆ insert() [3/9]

template<size_t Idx, typename Type , template< size_t, typename > class Bundle, typename... ExtraArgs, template< typename, typename... > class Container>
void tim::insert ( Bundle< Idx, Type > &  obj,
const Container< std::string, ExtraArgs... > &  components 
)
inline

this is for initializing with a container of string

Definition at line 68 of file insert.hpp.

References components, and enumerate_components().

◆ insert() [4/9]

template<size_t Idx, typename Type , template< size_t, typename > class Bundle>
void tim::insert ( Bundle< Idx, Type > &  obj,
const int  ncomponents,
const int *  components 
)

Definition at line 118 of file insert.hpp.

119{
120 for(int i = 0; i < ncomponents; ++i)
122}

References components, and tim::runtime::insert().

◆ insert() [5/9]

template<size_t Idx, typename Type , template< size_t, typename > class Bundle>
void tim::insert ( Bundle< Idx, Type > &  obj,
const std::initializer_list< std::string > &  components 
)
inline

Definition at line 56 of file insert.hpp.

References components, and enumerate_components().

◆ insert() [6/9]

template<size_t Idx, typename Type , template< size_t, typename > class Bundle>
void tim::insert ( Bundle< Idx, Type > &  obj,
const std::string &  components 
)
inline

this is for initializing with a string

Definition at line 79 of file insert.hpp.

References components, delimit(), and enumerate_components().

◆ insert() [7/9]

template<size_t Idx, typename Type , template< size_t, typename > class Bundle, typename EnumT = int>
void tim::insert ( Bundle< Idx, Type > &  obj,
std::initializer_list< EnumT >  components 
)
inline

Definition at line 47 of file insert.hpp.

48{
49 insert(obj, std::vector<EnumT>(components));
50}

References components.

◆ insert() [8/9]

template<typename T , typename... Args>
void tim::insert ( T *  obj,
Args &&...  args 
)

Definition at line 129 of file types.hpp.

130{
131 if(obj)
132 insert(*obj, std::forward<Args>(args)...);
133}
void insert(T *obj, Args &&... args)
Definition: types.hpp:291

◆ insert_and_remove()

void tim::insert_and_remove ( const sys_signal _type,
signal_settings::signal_set_t _ins,
signal_settings::signal_set_t _rem 
)
inline

Definition at line 58 of file signals.hpp.

62{
63 if(!_ins || !_rem)
64 return;
65 _ins->insert(_type);
66 auto itr = _rem->find(_type);
67 if(itr != _rem->end())
68 _rem->erase(itr);
69}

Referenced by tim::signal_settings::disable(), and tim::signal_settings::enable().

◆ invoke_preinit() [1/2]

template<typename T >
auto tim::invoke_preinit ( int  ) -> decltype(std::declval<T>().preinit(), void())

Definition at line 51 of file storage_initializer.hpp.

52{
53 T::preinit();
54}

◆ invoke_preinit() [2/2]

template<typename T >
auto tim::invoke_preinit ( long  )

Definition at line 60 of file storage_initializer.hpp.

61{}

◆ invoke_preinit< kokkosp::memory_tracker >()

template<>
auto tim::invoke_preinit< kokkosp::memory_tracker > ( long  )
inline

Definition at line 41 of file kokkosp.cpp.

43{
44 kokkosp::memory_tracker::label() = "kokkos_memory";
45 kokkosp::memory_tracker::description() = "Kokkos Memory tracker";
46}
static std::string & label()
a reference is returned here so that it can be easily updated
Definition: components.hpp:466
static std::string & description()
a reference is returned here so that it can be easily updated
Definition: components.hpp:478

References tim::component::data_tracker< InpT, Tag >::description(), and tim::component::data_tracker< InpT, Tag >::label().

◆ isfinite()

template<typename Tp >
bool tim::isfinite ( const Tp &  arg)
inline

Definition at line 104 of file utility.hpp.

105{
106#if defined(TIMEMORY_WINDOWS)
107 // Windows seems to be missing std::isfinite
108 return (arg == arg && arg != std::numeric_limits<Tp>::infinity() &&
109 arg != -std::numeric_limits<Tp>::infinity())
110 ? true
111 : false;
112#else
113 return std::isfinite(arg);
114#endif
115}
bool isfinite(const Tp &arg)
Definition: utility.hpp:104

References isfinite().

Referenced by tim::component::read_char::get(), tim::component::written_char::get(), tim::component::read_bytes::get(), tim::component::written_bytes::get(), tim::math::is_finite(), and isfinite().

◆ launch_process()

bool tim::launch_process ( const char *  cmd,
const std::string &  extra = "",
std::ostream *  os = nullptr 
)

Referenced by tim::filepath::makedir().

◆ load_env() [1/3]

template<>
bool tim::load_env ( const std::string &  env_id,
bool  _default 
)

◆ load_env() [2/3]

template<>
std::string tim::load_env ( const std::string &  env_id,
std::string  _default 
)

◆ load_env() [3/3]

template<typename Tp >
Tp tim::load_env ( const std::string &  env_id,
Tp  _default 
)

Definition at line 230 of file declaration.hpp.

231{
232 if(env_id.empty())
233 return _default;
234
235 auto* _env_settings = env_settings::instance();
236 if(!_env_settings)
237 return _default;
238
239 auto itr = _env_settings->get(env_id);
240 if(itr != _env_settings->end())
241 {
242 std::stringstream iss{ itr->second };
243 auto var = Tp{};
244 iss >> var;
245 return var;
246 }
247
248 // return default if not specified in environment
249 return _default;
250}

References tim::env_settings::instance().

◆ makedir()

TIMEMORY_UTILITY_INLINE int tim::makedir ( std::string  _dir,
int  umask 
)

Definition at line 67 of file utility.cpp.

68{
69 return filepath::makedir(std::move(_dir), umask);
70}
const string_t const string_t & _dir
Definition: definition.hpp:52
int makedir(std::string _dir, int umask)
Definition: utility.cpp:67

References tim::plotting::_dir, and tim::filepath::makedir().

Referenced by tim::settings::compose_output_filename(), and tim::settings::get_global_output_prefix().

◆ mangle()

template<typename FuncT , typename TraitsT = mpl::function_traits<FuncT>>
std::string tim::mangle ( const std::string &  func)

Definition at line 106 of file mangler.hpp.

107{
108 using _Tuple = typename TraitsT::args_type;
109 constexpr bool is_memfun = TraitsT::is_memfun;
110 constexpr bool is_const = TraitsT::is_const;
111 return impl::mangler<_Tuple>::mangle(func, is_memfun, is_const);
112}
std::string mangle(const std::string &func)
Definition: mangler.hpp:106

References mangle().

Referenced by mangle().

◆ on_error()

parser tim::on_error ( [=] (parser_t &p, const parser_err_t &_err) { err_action(_err);if(dmp::rank()==0 &&_settings->get_verbose() > 0) p.print_help("-- <NON_TIMEMORY_ARGS>");}  )

◆ print_env() [1/2]

template<typename FuncT >
void tim::print_env ( std::ostream &  os,
FuncT &&  _filter 
)

Print all environment queries and their values which satisfy the filter conditions.

Template Parameters
FuncTFilter function accepting string as argument and returning bool

Definition at line 275 of file declaration.hpp.

276{
277 static_assert(
278 std::is_same<bool, decltype(_filter(std::declval<std::string>()))>::value,
279 "Error! filter must accept string and return bool");
280 if(env_settings::instance())
281 env_settings::instance()->print(os, std::forward<FuncT>(_filter));
282}

References tim::env_settings::instance(), os, and tim::env_settings::print().

◆ print_env() [2/2]

void tim::print_env ( std::ostream &  os = std::cout)

◆ print_graph() [1/2]

template<typename T , typename Formatter = std::function<std::string(const T&)>>
void tim::print_graph ( const tim::graph< T > &  t,
Formatter  format,
std::ostream &  str = std::cout 
)

Definition at line 2981 of file graph.hpp.

2982{
2983 int head_count = t.number_of_siblings(t.begin());
2984 int nhead = 0;
2985 for(typename tim::graph<T>::sibling_iterator ritr = t.begin(); ritr != t.end();
2986 ++ritr, ++nhead)
2987 {
2988 print_subgraph(t, format, ritr, str);
2989 if(nhead != head_count)
2990 {
2991 str << std::endl;
2992 }
2993 }
2994}
Iterator which traverses only the nodes which are siblings of each other.
Definition: graph.hpp:225
pre_order_iterator end() const
Return iterator to the end of the graph.
Definition: graph.hpp:717
unsigned int number_of_siblings(const iterator_base &) const
Count the number of siblings (left and right) of node at iterator. Total nodes at this level is +1.
Definition: graph.hpp:2188
pre_order_iterator begin() const
Return iterator to the beginning of the graph.
Definition: graph.hpp:708
void print_subgraph(const tim::graph< T > &t, Formatter format, typename tim::graph< T >::iterator root, std::ostream &str=std::cout)
Definition: graph.hpp:3024

References tim::graph< T, AllocatorT >::begin(), tim::graph< T, AllocatorT >::end(), tim::graph< T, AllocatorT >::number_of_siblings(), and print_subgraph().

◆ print_graph() [2/2]

template<typename T >
void tim::print_graph ( const tim::graph< T > &  t,
std::ostream &  str 
)

Definition at line 3000 of file graph.hpp.

3001{
3002 auto _formatter = [](const T& obj) {
3003 std::stringstream ss;
3004 ss << obj;
3005 return ss.str();
3006 };
3007 int head_count = t.number_of_siblings(t.begin());
3008 int nhead = 0;
3009 for(typename tim::graph<T>::sibling_iterator ritr = t.begin(); ritr != t.end();
3010 ++ritr, ++nhead)
3011 {
3012 print_subgraph(t, _formatter, ritr, str);
3013 if(nhead != head_count)
3014 {
3015 str << std::endl;
3016 }
3017 }
3018}

References tim::graph< T, AllocatorT >::begin(), tim::graph< T, AllocatorT >::end(), tim::graph< T, AllocatorT >::number_of_siblings(), and print_subgraph().

◆ print_graph_bracketed()

template<typename T >
void tim::print_graph_bracketed ( const graph< T > &  t,
std::ostream &  os = std::cout 
)

Definition at line 2902 of file graph.hpp.

2903{
2904 int head_count = t.number_of_siblings(t.begin());
2905 int nhead = 0;
2906 for(typename graph<T>::sibling_iterator ritr = t.begin(); ritr != t.end();
2907 ++ritr, ++nhead)
2908 {
2909 print_subgraph_bracketed(t, ritr, os);
2910 if(nhead != head_count)
2911 {
2912 os << std::endl;
2913 }
2914 }
2915}
void print_subgraph_bracketed(const graph< T > &t, typename graph< T >::iterator root, std::ostream &os=std::cout)
Definition: graph.hpp:2923

References tim::graph< T, AllocatorT >::begin(), tim::graph< T, AllocatorT >::end(), tim::graph< T, AllocatorT >::number_of_siblings(), os, and print_subgraph_bracketed().

◆ print_graph_hierarchy()

template<typename T , typename Formatter = std::function<std::string(const T&)>>
void tim::print_graph_hierarchy ( const tim::graph< T > &  t,
Formatter  format,
std::ostream &  str = std::cout 
)

Definition at line 3076 of file graph.hpp.

3077{
3078 int head_count = t.number_of_siblings(t.begin());
3079 int nhead = 0;
3080 for(typename tim::graph<T>::sibling_iterator ritr = t.begin(); ritr != t.end();
3081 ++ritr, ++nhead)
3082 {
3083 print_subgraph_hierarchy(t, format, ritr, str);
3084 if(nhead != head_count)
3085 {
3086 str << std::endl;
3087 }
3088 }
3089}
void print_subgraph_hierarchy(const tim::graph< T > &t, Formatter format, typename tim::graph< T >::iterator root, std::ostream &str=std::cout)
Definition: graph.hpp:3095

References tim::graph< T, AllocatorT >::begin(), tim::graph< T, AllocatorT >::end(), tim::graph< T, AllocatorT >::number_of_siblings(), and print_subgraph_hierarchy().

◆ print_subgraph()

template<typename T , typename Formatter = std::function<std::string(const T&)>>
void tim::print_subgraph ( const tim::graph< T > &  t,
Formatter  format,
typename tim::graph< T >::iterator  root,
std::ostream &  str = std::cout 
)

Definition at line 3024 of file graph.hpp.

3026{
3027 if(t.empty())
3028 return;
3029 if(t.number_of_children(root) == 0)
3030 {
3031 os << format(*root);
3032 }
3033 else
3034 {
3035 // parent
3036 std::string str = format(*root);
3037 if(str.length() > 0)
3038 os << str << "\n";
3039 // child1, ..., childn
3040 int sibling_count = t.number_of_siblings(t.begin(root));
3041 int nsiblings;
3042 typename tim::graph<T>::sibling_iterator children;
3043 for(children = t.begin(root), nsiblings = 0; children != t.end(root);
3044 ++children, ++nsiblings)
3045 {
3046 // recursively print child
3047 print_subgraph(t, format, children, os);
3048 // comma after every child except the last one
3049 if(nsiblings != sibling_count)
3050 {
3051 os << "\n";
3052 }
3053 }
3054 }
3055}
bool empty() const
Check if graph is empty.
Definition: graph.hpp:2074
static unsigned int number_of_children(const iterator_base &)
Count the number of children of node at position.
Definition: graph.hpp:2172

References tim::graph< T, AllocatorT >::begin(), tim::graph< T, AllocatorT >::empty(), tim::graph< T, AllocatorT >::end(), tim::graph< T, AllocatorT >::number_of_children(), tim::graph< T, AllocatorT >::number_of_siblings(), os, and print_subgraph().

Referenced by print_graph(), and print_subgraph().

◆ print_subgraph_bracketed()

template<typename T >
void tim::print_subgraph_bracketed ( const graph< T > &  t,
typename graph< T >::iterator  root,
std::ostream &  os = std::cout 
)

Definition at line 2923 of file graph.hpp.

2925{
2926 static int _depth = 0;
2927 if(t.empty())
2928 return;
2929
2930 auto m_depth = _depth++;
2931 std::string indent = {};
2932 for(int i = 0; i < m_depth; ++i)
2933 indent += " ";
2934
2935 if(t.number_of_children(root) == 0)
2936 {
2937 os << "\n" << indent << *root;
2938 }
2939 else
2940 {
2941 // parent
2942 os << "\n" << indent << *root;
2943 os << "(";
2944 // child1, ..., childn
2945 int sibling_count = t.number_of_siblings(t.begin(root));
2946 int nsiblings;
2947 typename graph<T>::sibling_iterator children;
2948 for(children = t.begin(root), nsiblings = 0; children != t.end(root);
2949 ++children, ++nsiblings)
2950 {
2951 // recursively print child
2952 print_subgraph_bracketed(t, children, os);
2953 // comma after every child except the last one
2954 if(nsiblings != sibling_count)
2955 {
2956 os << ", ";
2957 }
2958 }
2959 os << ")";
2960 }
2961 --_depth;
2962}

References tim::graph< T, AllocatorT >::begin(), tim::graph< T, AllocatorT >::empty(), tim::graph< T, AllocatorT >::end(), tim::graph< T, AllocatorT >::number_of_children(), tim::graph< T, AllocatorT >::number_of_siblings(), os, and print_subgraph_bracketed().

Referenced by print_graph_bracketed(), and print_subgraph_bracketed().

◆ print_subgraph_hierarchy()

template<typename T , typename Formatter = std::function<std::string(const T&)>>
void tim::print_subgraph_hierarchy ( const tim::graph< T > &  t,
Formatter  format,
typename tim::graph< T >::iterator  root,
std::ostream &  str = std::cout 
)

Definition at line 3095 of file graph.hpp.

3097{
3098 if(t.empty())
3099 return;
3100 if(t.number_of_children(root) == 0)
3101 {
3102 os << format(*root);
3103 }
3104 else
3105 {
3106 // parent
3107 std::string str = format(*root);
3108 if(str.length() > 0)
3109 os << str << "\n" << std::setw(2 * (t.depth(root) + 1)) << "|_";
3110 // child1, ..., childn
3111 int sibling_count = t.number_of_siblings(t.begin(root));
3112 int nsiblings;
3113 typename tim::graph<T>::sibling_iterator children;
3114 for(children = t.begin(root), nsiblings = 0; children != t.end(root);
3115 ++children, ++nsiblings)
3116 {
3117 // recursively print child
3118 print_subgraph_hierarchy(t, format, children, os);
3119 // comma after every child except the last one
3120 if(nsiblings != sibling_count)
3121 {
3122 os << "\n" << std::setw(2 * (t.depth(root) + 1)) << "|_";
3123 }
3124 }
3125 }
3126}
static int depth(const iterator_base &)
Compute the depth to the root or to a fixed other iterator.
Definition: graph.hpp:2085

References tim::graph< T, AllocatorT >::begin(), tim::graph< T, AllocatorT >::depth(), tim::graph< T, AllocatorT >::empty(), tim::graph< T, AllocatorT >::end(), tim::graph< T, AllocatorT >::number_of_children(), tim::graph< T, AllocatorT >::number_of_siblings(), os, and print_subgraph_hierarchy().

Referenced by print_graph_hierarchy(), and print_subgraph_hierarchy().

◆ read_command_line()

TIMEMORY_UTILITY_INLINE std::vector< std::string > tim::read_command_line ( pid_t  _pid)

Definition at line 114 of file utility.cpp.

115{
116 std::vector<std::string> _cmdline;
117#if defined(TIMEMORY_LINUX)
118 std::stringstream fcmdline;
119 fcmdline << "/proc/" << _pid << "/cmdline";
120 std::ifstream ifs(fcmdline.str().c_str());
121 if(ifs)
122 {
123 char cstr;
124 std::string sarg;
125 while(!ifs.eof())
126 {
127 ifs >> cstr;
128 if(!ifs.eof())
129 {
130 if(cstr != '\0')
131 {
132 sarg += cstr;
133 }
134 else
135 {
136 _cmdline.push_back(sarg);
137 sarg = "";
138 }
139 }
140 }
141 ifs.close();
142 }
143
144#else
145 consume_parameters(_pid);
146#endif
147 return _cmdline;
148}

References consume_parameters().

Referenced by tim::settings::get_fallback_tag(), and tim::config::read_command_line().

◆ set_env()

template<typename Tp >
void tim::set_env ( const std::string &  env_var,
const Tp &  _val,
int  override 
)

Definition at line 256 of file declaration.hpp.

257{
258 std::stringstream ss_val;
259 ss_val << _val;
260#if defined(TIMEMORY_MACOS) || (defined(TIMEMORY_LINUX) && (_POSIX_C_SOURCE >= 200112L))
261 setenv(env_var.c_str(), ss_val.str().c_str(), override);
262#elif defined(TIMEMORY_WINDOWS)
263 auto _curr = get_env<std::string>(env_var, "");
264 if(_curr.empty() || override > 0)
265 _putenv_s(env_var.c_str(), ss_val.str().c_str());
266#else
267 consume_parameters(env_var, _val, override, ss_val);
268#endif
269}

References consume_parameters().

Referenced by tim::settings::insert(), kokkosp_init_library(), tim::settings::read(), and timemory_set_environ().

◆ str_transform()

template<typename PredicateT = std::function<std::string(const std::string&)>>
std::string tim::str_transform ( const std::string &  input,
const std::string &  _begin,
const std::string &  _end,
PredicateT &&  predicate 
)
inline

apply a string transformation to substring inbetween a common delimiter. e.g.

Definition at line 111 of file delimit.hpp.

113{
114 size_t _beg_pos = 0; // position that is the beginning of the new string
115 size_t _end_pos = 0; // position of the delimiter in the string
116 std::string _result = input;
117 while(_beg_pos < _result.length() && _end_pos < _result.length())
118 {
119 // find the first sequence of characters after the end-position
120 _beg_pos = _result.find(_begin, _end_pos);
121
122 // if sequence wasn't found, we are done
123 if(_beg_pos == std::string::npos)
124 break;
125
126 // starting after the position of the first delimiter, find the end sequence
127 if(!_end.empty())
128 _end_pos = _result.find(_end, _beg_pos + 1);
129 else
130 _end_pos = _beg_pos + _begin.length();
131
132 // break if not found
133 if(_end_pos == std::string::npos)
134 break;
135
136 // length of the substr being operated on
137 auto _len = _end_pos - _beg_pos;
138
139 // get the substring between the two delimiters (including first delimiter)
140 auto _sub = _result.substr(_beg_pos, _len);
141
142 // apply the transform
143 auto _transformed = predicate(_sub);
144
145 // only replace if necessary
146 if(_sub != _transformed)
147 {
148 _result = _result.replace(_beg_pos, _len, _transformed);
149 // move end to the end of transformed string
150 _end_pos = _beg_pos + _transformed.length();
151 }
152 }
153 return _result;
154}

Referenced by tim::operation::decode< ApiT >::tokenized_demangle().

◆ timemory_argparse() [1/4]

tim::timemory_argparse ( argc  ,
argv   
)

◆ timemory_argparse() [2/4]

tim::timemory_argparse ( argc  ,
argv  ,
parser 
)

◆ timemory_argparse() [3/4]

void tim::timemory_argparse ( int *  argc,
char ***  argv,
argparse::argument_parser parser = nullptr,
settings _settings = nullptr 
)

◆ timemory_argparse() [4/4]

void tim::timemory_argparse ( std::vector< std::string > &  ,
argparse::argument_parser parser = nullptr,
settings _settings = nullptr 
)

◆ TIMEMORY_CONFIG_LINKAGE()

tim::TIMEMORY_CONFIG_LINKAGE ( void  )

Definition at line 148 of file config.cpp.

151{
152 auto* cstr = const_cast<char*>(exe_name.c_str());
153 auto _argc = 1;
154 auto* _argv = &cstr;
155 timemory_init(_argc, _argv, _prefix, _suffix);
156}
char const std::string & _prefix
Definition: config.cpp:55
char const std::string const std::string & _suffix
Definition: config.cpp:57

References _prefix, _suffix, exe_name, and timemory_init().

◆ TIMEMORY_ENVIRONMENT_LINKAGE() [1/6]

template<>
tim::TIMEMORY_ENVIRONMENT_LINKAGE ( bool  ) const

Definition at line 244 of file definition.hpp.

246{
247 if(env_id.empty())
248 return _default;
249
250 auto* _env_settings = env_settings::instance();
251 char* env_var = std::getenv(env_id.c_str());
252 if(env_var)
253 {
254 std::string var = std::string(env_var);
255 bool val = true;
256 if(var.find_first_not_of("0123456789") == std::string::npos)
257 {
258 val = (bool) atoi(var.c_str());
259 }
260 else
261 {
262 for(auto& itr : var)
263 itr = tolower(itr);
264 for(const auto& itr : { "off", "false", "no", "n", "f", "0" })
265 {
266 if(var == itr)
267 {
268 if(_env_settings && _store)
269 _env_settings->insert<bool>(env_id, false);
270 return false;
271 }
272 }
273 }
274 if(_env_settings && _store)
275 _env_settings->insert<bool>(env_id, val);
276 return val;
277 }
278 // record default value
279 if(_env_settings && _store)
280 _env_settings->insert<bool>(env_id, _default);
281
282 // return default if not specified in environment
283 return _default;
284}

References tim::env_settings::instance().

◆ TIMEMORY_ENVIRONMENT_LINKAGE() [2/6]

tim::TIMEMORY_ENVIRONMENT_LINKAGE ( env_settings::env_map_t  )

Definition at line 92 of file definition.hpp.

94{
95 auto_lock_t lk(type_mutex<env_settings>(), std::defer_lock);
96 lock_flag().store(true);
97 if(!lk.owns_lock())
98 lk.lock();
99
100 auto _tmp = *m_env;
101 env_map_t _ret;
102 for(const auto& itr : _tmp)
103 _ret[itr.first] = itr.second;
104
105 lock_flag().store(false);
106 return _ret;
107}
108//
109//--------------------------------------------------------------------------------------//
110//
112env_settings::print(std::ostream& os, filter_func_t&& _filter) const
113{
114 if(m_id == 0)
115 const_cast<env_settings&>(*this).collapse();
116
117 auto _data = get();
118
119 size_t _wl = 35;
120 size_t _wr = 0;
121 size_t _count = 0;
122 for(const auto& itr : _data)
123 {
124 if(_filter(itr.first))
125 {
126 _wl = std::max<size_t>(itr.first.length(), _wl);
127 _wr = std::max<size_t>(itr.second.length(), _wr);
128 ++_count;
129 }
130 }
131
132 if(_count == 0)
133 return;
134
135 std::stringstream filler{};
136 filler.fill('-');
137 filler << '#';
138 {
139 std::stringstream _tmp{};
140 _tmp << " " << std::setw(_wl) << std::right << " "
141 << " = " << std::setw(_wr) << std::left << " "
142 << "\n";
143 filler << std::setw(_tmp.str().length() + 1) << "";
144 }
145 filler << '#';
146
147 std::stringstream ss;
148 ss << filler.str() << '\n';
149 ss << "# Environment settings:\n";
150 for(const auto& itr : _data)
151 {
152 if(_filter(itr.first))
153 {
154 ss << "# " << std::setw(_wl) << std::right << itr.first << " = "
155 << std::setw(_wr) << std::left << itr.second << '\n';
156 }
157 }
158 ss << filler.str();
159 os << ss.str() << '\n';
160}
161//
162//--------------------------------------------------------------------------------------//
163//
164// NOLINTNEXTLINE
166env_settings::collapse()
167{
168 if(m_id != 0)
169 return;
170
171 auto_lock_t lk(type_mutex<env_settings>(), std::defer_lock);
172 if(!lk.owns_lock())
173 lk.lock();
174
175 lock_flag().store(true);
176
177 // insert all the other maps into this map
178 for(size_t i = 0; i < m_env_other.size(); ++i)
179 {
180 // get the map instance
181 auto* itr = m_env_other[i];
182 if(itr)
183 {
184 // loop over entries
185 for(const auto& mitr : *m_env_other[i])
186 {
187 auto key = mitr.first;
188 if(m_env->find(key) != m_env->end())
189 {
190 // if the key already exists and if the entries differ,
191 // create a new unique entry for the index
192 if(m_env->find(key)->second != mitr.second)
193 {
194 key += string_t("[@") + std::to_string(i + 1) + string_t("]");
195 (*m_env)[key] = mitr.second;
196 }
197 }
198 else
199 {
200 // if a new entry, insert without unique tag to avoid duplication
201 // when thread count is very high
202 (*m_env)[key] = mitr.second;
203 }
204 }
205 }
206 }
207 lock_flag().store(false);
208}
#define TIMEMORY_ENVIRONMENT_LINKAGE(...)
Definition: macros.hpp:44
std::string string_t
Definition: library.cpp:57
void print(std::ostream &os, Args &&... args)
Definition: functional.cpp:159
std::unique_lock< mutex_t > auto_lock_t
Unique lock type around mutex_t.
Definition: locking.hpp:42

◆ TIMEMORY_ENVIRONMENT_LINKAGE() [3/6]

tim::TIMEMORY_ENVIRONMENT_LINKAGE ( env_settings::~  env_settings())

Definition at line 80 of file definition.hpp.

81{
82 if(m_id == 0)
83 {
84 delete m_env;
85 for(auto& itr : m_env_other)
86 delete itr;
87 }
88}

◆ TIMEMORY_ENVIRONMENT_LINKAGE() [4/6]

template<>
tim::TIMEMORY_ENVIRONMENT_LINKAGE ( std::string  ) const

Definition at line 215 of file definition.hpp.

217{
218 if(env_id.empty())
219 return _default;
220
221 auto* _env_settings = env_settings::instance();
222 char* env_var = std::getenv(env_id.c_str());
223 if(env_var)
224 {
225 std::stringstream ss;
226 ss << env_var;
227 if(_env_settings && _store)
228 _env_settings->insert(env_id, ss.str());
229 return ss.str();
230 }
231 // record default value
232 if(_env_settings && _store)
233 _env_settings->insert(env_id, _default);
234
235 // return default if not specified in environment
236 return _default;
237}

References tim::env_settings::instance().

◆ TIMEMORY_ENVIRONMENT_LINKAGE() [5/6]

tim::TIMEMORY_ENVIRONMENT_LINKAGE ( tim::env_settings )

Definition at line 357 of file definition.hpp.

359{
360 static std::atomic<int> _count{ 0 };
361 static env_settings _instance{};
362 static thread_local int _id = _count++;
363 static thread_local env_settings* _local =
364 (_id == 0) ? (&_instance) : new env_settings{ &_instance, _id };
365 static thread_local auto _ldtor = scope::destructor{ []() {
366 if(_local == &_instance || _id == 0)
367 return;
368 delete _local;
369 _local = nullptr;
370 } };
371 return _local;
372 (void) _ldtor;
373}

◆ TIMEMORY_ENVIRONMENT_LINKAGE() [6/6]

tim::TIMEMORY_ENVIRONMENT_LINKAGE ( void  )

Definition at line 352 of file definition.hpp.

353 { os << (*env_settings::instance()); }

References tim::env_settings::instance(), and os.

◆ timemory_finalize()

void tim::timemory_finalize ( )

finalization of the specified types

Referenced by finalize(), and kokkosp_finalize_library().

◆ timemory_init() [1/6]

template<typename... Types, typename... Args, enable_if_t<(sizeof...(Types) > 0 &&sizeof...(Args) >=2), int > >
void tim::timemory_init ( Args &&...  _args)
inline

Definition at line 49 of file config.hpp.

50{
51 using types_type = tim::convert_t<tuple_concat_t<Types...>, tim::type_list<>>;
53 timemory_init(std::forward<Args>(_args)...);
54}
std::array< char *, 4 > _args
typename impl::tuple_concat< Ts... >::type tuple_concat_t
Definition: types.hpp:563
typename impl::convert< T, U >::type convert_t
Definition: types.hpp:855
lightweight tuple-alternative for meta-programming logic
Definition: types.hpp:233

References _args, and timemory_init().

Referenced by init(), kokkosp_init_library(), kokkosp_parse_args(), TIMEMORY_CONFIG_LINKAGE(), and timemory_init().

◆ timemory_init() [2/6]

void tim::timemory_init ( const std::string &  exe_name,
const std::string &  _prefix = "timemory-",
const std::string &  _suffix = "-output" 
)

initialization (creates manager and configures output path)

◆ timemory_init() [3/6]

void tim::timemory_init ( int *  argc,
char ***  argv,
argparse::argument_parser parser,
const std::string &  _prefix = "timemory-",
const std::string &  _suffix = "-output" 
)

◆ timemory_init() [4/6]

void tim::timemory_init ( int *  argc,
char ***  argv,
const std::string &  _prefix = "timemory-",
const std::string &  _suffix = "-output" 
)

initialization (creates manager, configures output path, mpi_init)

◆ timemory_init() [5/6]

void tim::timemory_init ( int  argc,
char **  argv,
const std::string &  _prefix = "timemory-",
const std::string &  _suffix = "-output" 
)

initialization (creates manager and configures output path)

◆ timemory_init() [6/6]

void tim::timemory_init ( std::vector< std::string > &  ,
argparse::argument_parser parser,
const std::string &  _prefix = "timemory-",
const std::string &  _suffix = "-output" 
)

◆ timemory_library_constructor()

void tim::timemory_library_constructor ( )

◆ timemory_manager_master_instance()

manager * tim::timemory_manager_master_instance ( )

◆ TIMEMORY_SETTINGS_KEY() [1/111]

tim::TIMEMORY_SETTINGS_KEY ( "ADD_SECONDARY"  )

◆ TIMEMORY_SETTINGS_KEY() [2/111]

tim::TIMEMORY_SETTINGS_KEY ( "ALLOW_SIGNAL_HANDLER"  )

◆ TIMEMORY_SETTINGS_KEY() [3/111]

tim::TIMEMORY_SETTINGS_KEY ( "AUTO_OUTPUT"  )

◆ TIMEMORY_SETTINGS_KEY() [4/111]

tim::TIMEMORY_SETTINGS_KEY ( "BANNER"  )

◆ TIMEMORY_SETTINGS_KEY() [5/111]

tim::TIMEMORY_SETTINGS_KEY ( "COLLAPSE_PROCESSES"  )

◆ TIMEMORY_SETTINGS_KEY() [6/111]

tim::TIMEMORY_SETTINGS_KEY ( "COLLAPSE_THREADS"  )

◆ TIMEMORY_SETTINGS_KEY() [7/111]

tim::TIMEMORY_SETTINGS_KEY ( "COMPONENTS"  )

◆ TIMEMORY_SETTINGS_KEY() [8/111]

tim::TIMEMORY_SETTINGS_KEY ( "COUT_OUTPUT"  )

◆ TIMEMORY_SETTINGS_KEY() [9/111]

tim::TIMEMORY_SETTINGS_KEY ( "CPU_AFFINITY"  )

◆ TIMEMORY_SETTINGS_KEY() [10/111]

tim::TIMEMORY_SETTINGS_KEY ( "CRAYPAT"  )

◆ TIMEMORY_SETTINGS_KEY() [11/111]

tim::TIMEMORY_SETTINGS_KEY ( "CTEST_NOTES"  )

◆ TIMEMORY_SETTINGS_KEY() [12/111]

tim::TIMEMORY_SETTINGS_KEY ( "CUDA_EVENT_BATCH_SIZE"  )

◆ TIMEMORY_SETTINGS_KEY() [13/111]

tim::TIMEMORY_SETTINGS_KEY ( "CUPTI_ACTIVITY_KINDS"  )

◆ TIMEMORY_SETTINGS_KEY() [14/111]

tim::TIMEMORY_SETTINGS_KEY ( "CUPTI_ACTIVITY_LEVEL"  )

◆ TIMEMORY_SETTINGS_KEY() [15/111]

tim::TIMEMORY_SETTINGS_KEY ( "CUPTI_DEVICE"  )

◆ TIMEMORY_SETTINGS_KEY() [16/111]

tim::TIMEMORY_SETTINGS_KEY ( "CUPTI_EVENTS"  )

◆ TIMEMORY_SETTINGS_KEY() [17/111]

tim::TIMEMORY_SETTINGS_KEY ( "CUPTI_METRICS"  )

◆ TIMEMORY_SETTINGS_KEY() [18/111]

tim::TIMEMORY_SETTINGS_KEY ( "DART_COUNT"  )

◆ TIMEMORY_SETTINGS_KEY() [19/111]

tim::TIMEMORY_SETTINGS_KEY ( "DART_LABEL"  )

◆ TIMEMORY_SETTINGS_KEY() [20/111]

tim::TIMEMORY_SETTINGS_KEY ( "DART_OUTPUT"  )

◆ TIMEMORY_SETTINGS_KEY() [21/111]

tim::TIMEMORY_SETTINGS_KEY ( "DART_TYPE"  )

◆ TIMEMORY_SETTINGS_KEY() [22/111]

tim::TIMEMORY_SETTINGS_KEY ( "DEBUG"  )

◆ TIMEMORY_SETTINGS_KEY() [23/111]

tim::TIMEMORY_SETTINGS_KEY ( "DESTRUCTOR_REPORT"  )

◆ TIMEMORY_SETTINGS_KEY() [24/111]

tim::TIMEMORY_SETTINGS_KEY ( "DIFF_OUTPUT"  )

◆ TIMEMORY_SETTINGS_KEY() [25/111]

tim::TIMEMORY_SETTINGS_KEY ( "DISABLE_ALL_SIGNALS"  )

◆ TIMEMORY_SETTINGS_KEY() [26/111]

tim::TIMEMORY_SETTINGS_KEY ( "ENABLE_ALL_SIGNALS"  )

◆ TIMEMORY_SETTINGS_KEY() [27/111]

tim::TIMEMORY_SETTINGS_KEY ( "ENABLE_SIGNAL_HANDLER"  )

◆ TIMEMORY_SETTINGS_KEY() [28/111]

tim::TIMEMORY_SETTINGS_KEY ( "ENABLED"  )

◆ TIMEMORY_SETTINGS_KEY() [29/111]

tim::TIMEMORY_SETTINGS_KEY ( "ERT_ALIGNMENT"  )

◆ TIMEMORY_SETTINGS_KEY() [30/111]

tim::TIMEMORY_SETTINGS_KEY ( "ERT_BLOCK_SIZE"  )

◆ TIMEMORY_SETTINGS_KEY() [31/111]

tim::TIMEMORY_SETTINGS_KEY ( "ERT_GRID_SIZE"  )

◆ TIMEMORY_SETTINGS_KEY() [32/111]

tim::TIMEMORY_SETTINGS_KEY ( "ERT_MAX_DATA_SIZE"  )

◆ TIMEMORY_SETTINGS_KEY() [33/111]

tim::TIMEMORY_SETTINGS_KEY ( "ERT_MAX_DATA_SIZE_CPU"  )

◆ TIMEMORY_SETTINGS_KEY() [34/111]

tim::TIMEMORY_SETTINGS_KEY ( "ERT_MAX_DATA_SIZE_GPU"  )

◆ TIMEMORY_SETTINGS_KEY() [35/111]

tim::TIMEMORY_SETTINGS_KEY ( "ERT_MIN_WORKING_SIZE"  )

◆ TIMEMORY_SETTINGS_KEY() [36/111]

tim::TIMEMORY_SETTINGS_KEY ( "ERT_MIN_WORKING_SIZE_CPU"  )

◆ TIMEMORY_SETTINGS_KEY() [37/111]

tim::TIMEMORY_SETTINGS_KEY ( "ERT_MIN_WORKING_SIZE_GPU"  )

◆ TIMEMORY_SETTINGS_KEY() [38/111]

tim::TIMEMORY_SETTINGS_KEY ( "ERT_NUM_STREAMS"  )

◆ TIMEMORY_SETTINGS_KEY() [39/111]

tim::TIMEMORY_SETTINGS_KEY ( "ERT_NUM_THREADS"  )

◆ TIMEMORY_SETTINGS_KEY() [40/111]

tim::TIMEMORY_SETTINGS_KEY ( "ERT_NUM_THREADS_CPU"  )

◆ TIMEMORY_SETTINGS_KEY() [41/111]

tim::TIMEMORY_SETTINGS_KEY ( "ERT_NUM_THREADS_GPU"  )

◆ TIMEMORY_SETTINGS_KEY() [42/111]

tim::TIMEMORY_SETTINGS_KEY ( "ERT_SKIP_OPS"  )

◆ TIMEMORY_SETTINGS_KEY() [43/111]

tim::TIMEMORY_SETTINGS_KEY ( "FILE_OUTPUT"  )

◆ TIMEMORY_SETTINGS_KEY() [44/111]

tim::TIMEMORY_SETTINGS_KEY ( "FLAMEGRAPH_OUTPUT"  )

◆ TIMEMORY_SETTINGS_KEY() [45/111]

tim::TIMEMORY_SETTINGS_KEY ( "FLAT_PROFILE"  )

◆ TIMEMORY_SETTINGS_KEY() [46/111]

tim::TIMEMORY_SETTINGS_KEY ( "GLOBAL_COMPONENTS"  )

◆ TIMEMORY_SETTINGS_KEY() [47/111]

tim::TIMEMORY_SETTINGS_KEY ( "INPUT_EXTENSIONS"  )

◆ TIMEMORY_SETTINGS_KEY() [48/111]

tim::TIMEMORY_SETTINGS_KEY ( "INPUT_PATH"  )

◆ TIMEMORY_SETTINGS_KEY() [49/111]

tim::TIMEMORY_SETTINGS_KEY ( "INPUT_PREFIX"  )

◆ TIMEMORY_SETTINGS_KEY() [50/111]

tim::TIMEMORY_SETTINGS_KEY ( "INSTRUCTION_ROOFLINE"  )

◆ TIMEMORY_SETTINGS_KEY() [51/111]

tim::TIMEMORY_SETTINGS_KEY ( "JSON_OUTPUT"  )

◆ TIMEMORY_SETTINGS_KEY() [52/111]

tim::TIMEMORY_SETTINGS_KEY ( "KOKKOS_COMPONENTS"  )

◆ TIMEMORY_SETTINGS_KEY() [53/111]

tim::TIMEMORY_SETTINGS_KEY ( "LIST_COMPONENTS"  )

◆ TIMEMORY_SETTINGS_KEY() [54/111]

tim::TIMEMORY_SETTINGS_KEY ( "MAX_DEPTH"  )

◆ TIMEMORY_SETTINGS_KEY() [55/111]

tim::TIMEMORY_SETTINGS_KEY ( "MAX_THREAD_BOOKMARKS"  )

◆ TIMEMORY_SETTINGS_KEY() [56/111]

tim::TIMEMORY_SETTINGS_KEY ( "MAX_WIDTH"  )

◆ TIMEMORY_SETTINGS_KEY() [57/111]

tim::TIMEMORY_SETTINGS_KEY ( "MEMORY_PRECISION"  )

◆ TIMEMORY_SETTINGS_KEY() [58/111]

tim::TIMEMORY_SETTINGS_KEY ( "MEMORY_SCIENTIFIC"  )

◆ TIMEMORY_SETTINGS_KEY() [59/111]

tim::TIMEMORY_SETTINGS_KEY ( "MEMORY_UNITS"  )

◆ TIMEMORY_SETTINGS_KEY() [60/111]

tim::TIMEMORY_SETTINGS_KEY ( "MEMORY_WIDTH"  )

◆ TIMEMORY_SETTINGS_KEY() [61/111]

tim::TIMEMORY_SETTINGS_KEY ( "MPI_FINALIZE"  )

◆ TIMEMORY_SETTINGS_KEY() [62/111]

tim::TIMEMORY_SETTINGS_KEY ( "MPI_INIT"  )

◆ TIMEMORY_SETTINGS_KEY() [63/111]

tim::TIMEMORY_SETTINGS_KEY ( "MPI_THREAD"  )

◆ TIMEMORY_SETTINGS_KEY() [64/111]

tim::TIMEMORY_SETTINGS_KEY ( "MPI_THREAD_TYPE"  )

◆ TIMEMORY_SETTINGS_KEY() [65/111]

tim::TIMEMORY_SETTINGS_KEY ( "MPIP_COMPONENTS"  )

◆ TIMEMORY_SETTINGS_KEY() [66/111]

tim::TIMEMORY_SETTINGS_KEY ( "NCCLP_COMPONENTS"  )

◆ TIMEMORY_SETTINGS_KEY() [67/111]

tim::TIMEMORY_SETTINGS_KEY ( "NODE_COUNT"  )

◆ TIMEMORY_SETTINGS_KEY() [68/111]

tim::TIMEMORY_SETTINGS_KEY ( "NVTX_MARKER_DEVICE_SYNC"  )

◆ TIMEMORY_SETTINGS_KEY() [69/111]

tim::TIMEMORY_SETTINGS_KEY ( "OMPT_COMPONENTS"  )

◆ TIMEMORY_SETTINGS_KEY() [70/111]

tim::TIMEMORY_SETTINGS_KEY ( "OUTPUT_PATH"  )

◆ TIMEMORY_SETTINGS_KEY() [71/111]

tim::TIMEMORY_SETTINGS_KEY ( "OUTPUT_PREFIX"  )

◆ TIMEMORY_SETTINGS_KEY() [72/111]

tim::TIMEMORY_SETTINGS_KEY ( "PAPI_ATTACH"  )

◆ TIMEMORY_SETTINGS_KEY() [73/111]

tim::TIMEMORY_SETTINGS_KEY ( "PAPI_EVENTS"  )

◆ TIMEMORY_SETTINGS_KEY() [74/111]

tim::TIMEMORY_SETTINGS_KEY ( "PAPI_FAIL_ON_ERROR"  )

◆ TIMEMORY_SETTINGS_KEY() [75/111]

tim::TIMEMORY_SETTINGS_KEY ( "PAPI_MULTIPLEXING"  )

◆ TIMEMORY_SETTINGS_KEY() [76/111]

tim::TIMEMORY_SETTINGS_KEY ( "PAPI_OVERFLOW"  )

◆ TIMEMORY_SETTINGS_KEY() [77/111]

tim::TIMEMORY_SETTINGS_KEY ( "PAPI_QUIET"  )

◆ TIMEMORY_SETTINGS_KEY() [78/111]

tim::TIMEMORY_SETTINGS_KEY ( "PAPI_THREADING"  )

◆ TIMEMORY_SETTINGS_KEY() [79/111]

tim::TIMEMORY_SETTINGS_KEY ( "PLOT_OUTPUT"  )

◆ TIMEMORY_SETTINGS_KEY() [80/111]

tim::TIMEMORY_SETTINGS_KEY ( "PRECISION"  )

◆ TIMEMORY_SETTINGS_KEY() [81/111]

tim::TIMEMORY_SETTINGS_KEY ( "PROFILER_COMPONENTS"  )

◆ TIMEMORY_SETTINGS_KEY() [82/111]

tim::TIMEMORY_SETTINGS_KEY ( "PYTHON_EXE"  )

◆ TIMEMORY_SETTINGS_KEY() [83/111]

tim::TIMEMORY_SETTINGS_KEY ( "ROOFLINE_EVENTS_CPU"  )

◆ TIMEMORY_SETTINGS_KEY() [84/111]

tim::TIMEMORY_SETTINGS_KEY ( "ROOFLINE_EVENTS_GPU"  )

◆ TIMEMORY_SETTINGS_KEY() [85/111]

tim::TIMEMORY_SETTINGS_KEY ( "ROOFLINE_MODE"  )

◆ TIMEMORY_SETTINGS_KEY() [86/111]

tim::TIMEMORY_SETTINGS_KEY ( "ROOFLINE_MODE_CPU"  )

◆ TIMEMORY_SETTINGS_KEY() [87/111]

tim::TIMEMORY_SETTINGS_KEY ( "ROOFLINE_MODE_GPU"  )

◆ TIMEMORY_SETTINGS_KEY() [88/111]

tim::TIMEMORY_SETTINGS_KEY ( "ROOFLINE_TYPE_LABELS"  )

◆ TIMEMORY_SETTINGS_KEY() [89/111]

tim::TIMEMORY_SETTINGS_KEY ( "ROOFLINE_TYPE_LABELS_CPU"  )

◆ TIMEMORY_SETTINGS_KEY() [90/111]

tim::TIMEMORY_SETTINGS_KEY ( "ROOFLINE_TYPE_LABELS_GPU"  )

◆ TIMEMORY_SETTINGS_KEY() [91/111]

tim::TIMEMORY_SETTINGS_KEY ( "SCIENTIFIC"  )

◆ TIMEMORY_SETTINGS_KEY() [92/111]

tim::TIMEMORY_SETTINGS_KEY ( "SEPARATOR_FREQ"  )

◆ TIMEMORY_SETTINGS_KEY() [93/111]

tim::TIMEMORY_SETTINGS_KEY ( "STACK_CLEARING"  )

◆ TIMEMORY_SETTINGS_KEY() [94/111]

tim::TIMEMORY_SETTINGS_KEY ( "SUPPRESS_CONFIG"  )

◆ TIMEMORY_SETTINGS_KEY() [95/111]

tim::TIMEMORY_SETTINGS_KEY ( "SUPPRESS_PARSING"  )

◆ TIMEMORY_SETTINGS_KEY() [96/111]

tim::TIMEMORY_SETTINGS_KEY ( "TEXT_OUTPUT"  )

◆ TIMEMORY_SETTINGS_KEY() [97/111]

tim::TIMEMORY_SETTINGS_KEY ( "THROTTLE_COUNT"  )

◆ TIMEMORY_SETTINGS_KEY() [98/111]

tim::TIMEMORY_SETTINGS_KEY ( "THROTTLE_VALUE"  )

◆ TIMEMORY_SETTINGS_KEY() [99/111]

tim::TIMEMORY_SETTINGS_KEY ( "TIME_FORMAT"  )

◆ TIMEMORY_SETTINGS_KEY() [100/111]

tim::TIMEMORY_SETTINGS_KEY ( "TIME_OUTPUT"  )

◆ TIMEMORY_SETTINGS_KEY() [101/111]

tim::TIMEMORY_SETTINGS_KEY ( "TIMING_PRECISION"  )

◆ TIMEMORY_SETTINGS_KEY() [102/111]

tim::TIMEMORY_SETTINGS_KEY ( "TIMING_SCIENTIFIC"  )

◆ TIMEMORY_SETTINGS_KEY() [103/111]

tim::TIMEMORY_SETTINGS_KEY ( "TIMING_UNITS"  )

◆ TIMEMORY_SETTINGS_KEY() [104/111]

tim::TIMEMORY_SETTINGS_KEY ( "TIMING_WIDTH"  )

◆ TIMEMORY_SETTINGS_KEY() [105/111]

tim::TIMEMORY_SETTINGS_KEY ( "TRACE_COMPONENTS"  )

◆ TIMEMORY_SETTINGS_KEY() [106/111]

tim::TIMEMORY_SETTINGS_KEY ( "TREE_OUTPUT"  )

◆ TIMEMORY_SETTINGS_KEY() [107/111]

tim::TIMEMORY_SETTINGS_KEY ( "TUPLE_COMPONENTS"  )

◆ TIMEMORY_SETTINGS_KEY() [108/111]

tim::TIMEMORY_SETTINGS_KEY ( "UPCXX_FINALIZE"  )

◆ TIMEMORY_SETTINGS_KEY() [109/111]

tim::TIMEMORY_SETTINGS_KEY ( "UPCXX_INIT"  )

◆ TIMEMORY_SETTINGS_KEY() [110/111]

tim::TIMEMORY_SETTINGS_KEY ( "VERBOSE"  )

◆ TIMEMORY_SETTINGS_KEY() [111/111]

tim::TIMEMORY_SETTINGS_KEY ( "WIDTH"  )

◆ TIMEMORY_SETTINGS_LINKAGE() [1/2]

tim::TIMEMORY_SETTINGS_LINKAGE ( bool  )

Definition at line 90 of file vsettings.cpp.

92{
93 // an exact match to name or env-name should always be checked
94 if(inp == m_env_name || inp == m_name)
95 return true;
96
97 if(exact)
98 {
99 // match the command-line option w/ or w/o leading dashes
100 auto _cmd_line_exact = [&](const std::string& itr) {
101 // don't match short-options
102 if(itr.length() == 2)
103 return false;
104 auto _with_dash = (itr == inp);
105 auto _pos = itr.find_first_not_of('-');
106 if(_with_dash || _pos == std::string::npos)
107 return _with_dash;
108 return (itr.substr(_pos) == inp);
109 };
110
111 return std::any_of(m_cmdline.begin(), m_cmdline.end(), _cmd_line_exact);
112 }
113 else
114 {
115 const auto cre = std::regex_constants::icase;
116 const std::regex re(inp, cre);
117
118 if(std::regex_search(m_env_name, re) || std::regex_search(m_name, re))
119 return true;
120
121 auto _cmd_line_regex = [&](const std::string& itr) {
122 // don't match short-options
123 if(itr.length() == 2)
124 return false;
125 return std::regex_search(itr, re);
126 };
127
128 return std::any_of(m_cmdline.begin(), m_cmdline.end(), _cmd_line_regex);
129 }
130}
131//
132//--------------------------------------------------------------------------------------//
133//
135vsettings::clone(std::shared_ptr<vsettings> rhs)
136{
137 m_name = rhs->m_name;
138 m_env_name = rhs->m_env_name;
139 m_description = rhs->m_description;
140 m_cmdline = rhs->m_cmdline;
141 m_count = rhs->m_count;
142 m_max_count = rhs->m_max_count;
143}
#define TIMEMORY_SETTINGS_LINKAGE(...)
Definition: macros.hpp:52

References tim::vsettings::m_cmdline, tim::vsettings::m_env_name, and tim::vsettings::m_name.

◆ TIMEMORY_SETTINGS_LINKAGE() [2/2]

tim::TIMEMORY_SETTINGS_LINKAGE ( vsettings::display_map_t  )

Definition at line 56 of file vsettings.cpp.

58{
59 display_map_t _data;
60 auto _as_str = [&](auto _val) {
61 std::stringstream _ss;
62 _ss.setf(fmt);
63 if(_w > -1)
64 _ss << std::setw(_w);
65 if(_p > -1)
66 _ss << std::setprecision(_p);
67 _ss << std::boolalpha << _val;
68 return _ss.str();
69 };
70
71 auto _arr_as_str = [&](auto _val) -> std::string {
72 if(_val.empty())
73 return "";
74 std::stringstream _ss;
75 for(size_t i = 0; i < _val.size(); ++i)
76 _ss << ", " << _as_str(_val.at(i));
77 return _ss.str().substr(2);
78 };
79
80 _data["name"] = _as_str(m_name);
81 _data["count"] = _as_str(m_count);
82 _data["max_count"] = _as_str(m_max_count);
83 _data["env_name"] = _as_str(m_env_name);
84 _data["description"] = _as_str(m_description);
85 _data["command_line"] = _arr_as_str(m_cmdline);
86 _data["choices"] = _arr_as_str(m_choices);
87 return _data;
88}

References tim::vsettings::m_choices, tim::vsettings::m_cmdline, tim::vsettings::m_count, tim::vsettings::m_description, tim::vsettings::m_env_name, tim::vsettings::m_max_count, and tim::vsettings::m_name.

◆ TIMEMORY_SETTINGS_MEMBER_DEF()

tim::TIMEMORY_SETTINGS_MEMBER_DEF ( string_t  ,
config_file  ,
TIMEMORY_SETTINGS_KEY("CONFIG_FILE")   
)

◆ TIMEMORY_UTILITY_LINKAGE()

tim::TIMEMORY_UTILITY_LINKAGE ( bool  ) const

◆ try_demangle()

template<typename Tp >
auto tim::try_demangle ( )
inline

Definition at line 128 of file demangle.hpp.

129{
130 // static because a type demangle will always be the same
131 static auto _val = []() {
132 // wrap the type in type_list and then extract ... from tim::type_list<...>
133 auto _tmp = ::tim::demangle(typeid(type_list<Tp>).name());
134 auto _key = std::string{ "type_list" };
135 auto _idx = _tmp.find(_key);
136 _idx = _tmp.find('<', _idx);
137 _tmp = _tmp.substr(_idx + 1);
138 _idx = _tmp.find_last_of('>');
139 _tmp = _tmp.substr(0, _idx);
140 // strip trailing whitespaces
141 while((_idx = _tmp.find_last_of(' ')) == _tmp.length() - 1)
142 _tmp = _tmp.substr(0, _idx);
143 return _tmp;
144 }();
145 return _val;
146}

References demangle().

◆ type_mutex()

template<typename Tp , typename ApiT = TIMEMORY_API, size_t N = 4, typename MutexT = mutex_t>
mutex_t & tim::type_mutex ( uint64_t  _n = 0)

A simple way to get a mutex for a class or common behavior, e.g. type_mutex<decltype(std::cout)>() provides a mutex for synchronizing output streams. Recommend using in conjunction with auto-lock: tim::auto_lock_t _lk{ type_mutex<Foo>() }.

Template Parameters
Tpdata type for lock
ApiTAPI for lock
Nmax size
MutexTmutex data type

Definition at line 57 of file locking.hpp.

58{
59 static std::array<MutexT, N> _mutexes{};
60 return _mutexes.at(_n % N);
61}

Referenced by tim::operation::finalize::print< Tp, true >::write_stream().

◆ typeid_hash()

template<typename Tp >
auto tim::typeid_hash ( )
inline

Definition at line 142 of file utility.hpp.

143{
144 return internal::typeid_hash<Tp>(0);
145}

◆ update_signal_detection()

void tim::update_signal_detection ( const signal_settings::signal_set_t _signals)
inline

Definition at line 75 of file signals.hpp.

76{
77 if(signal_settings::allow())
78 {
81 }
82}
bool enable_signal_detection(std::initializer_list< Tp > &&)
Definition: signals.hpp:373
void disable_signal_detection()
Definition: signals.hpp:379

References tim::signal_settings::allow(), disable_signal_detection(), and enable_signal_detection().

◆ while() [1/3]

tim::while ( (pos=exe_name.find("--")) !  = std::string::npos)

◆ while() [2/3]

tim::while ( exe_name.find('/') !  = std::string::npos)

◆ while() [3/3]

tim::while ( exe_name.find('\\') !  = std::string::npos)

Variable Documentation

◆ _args

std::array<char*, 4> tim::_args

Definition at line 50 of file launch_process.cpp.

Referenced by tim::source_location::source_location(), tim::mpl::apply< void >::access_fold(), tim::bundle< Tag, BundleT, TupleT >::add_secondary(), tim::lightweight_tuple< Types >::add_secondary(), tim::ert::counter< DeviceT, Tp, Counter >::add_skip_ops(), tim::bundle< Tag, BundleT, TupleT >::assemble(), tim::lightweight_tuple< Types >::assemble(), tim::bundle< Tag, BundleT, TupleT >::audit(), tim::lightweight_tuple< Types >::audit(), tim::lightweight_tuple< Types >::construct(), tim::data::ring_buffer_allocator< Tp, MMapV, BuffCntV >::construct(), tim::bundle< Tag, BundleT, TupleT >::derive(), tim::lightweight_tuple< Types >::derive(), tim::mpl::execute(), tim::operation::echo_measurement< Tp, true >::generate_name(), tim::source_location::get_captured(), tim::source_location::get_captured_inline(), tim::mpl::apply< void >::get_fold(), tim::bundle< Tag, BundleT, TupleT >::init(), tim::settings::insert(), tim::auto_base_bundle< Tag, CompT, BundleT >::internal_init(), tim::auto_base_bundle< Tag, CompT, BundleT >::invoke(), tim::bundle< Tag, BundleT, TupleT >::invoke(), tim::mpl::execution_handler< BundleT, DataT >::invoke(), tim::mpl::execution_handler< BundleT, void >::invoke(), tim::lightweight_tuple< Types >::invoke(), tim::operation::common_utils::join(), kokkosp_parse_args(), kokkosp_print_help(), tim::bundle< Tag, BundleT, TupleT >::mark(), tim::kokkosp::kernel_logger::mark(), tim::bundle< Tag, BundleT, TupleT >::mark_begin(), tim::lightweight_tuple< Types >::mark_begin(), tim::bundle< Tag, BundleT, TupleT >::mark_end(), tim::lightweight_tuple< Types >::mark_end(), tim::filepath::open(), tim::argparse::argument_parser::parse(), tim::argparse::argument_parser::parse_known_args(), tim::bundle< Tag, BundleT, TupleT >::store(), tim::lightweight_tuple< Types >::store(), timemory_init(), tim::bundle< Tag, BundleT, TupleT >::type_apply(), tim::lightweight_tuple< Types >::type_apply(), tim::bundle< Tag, BundleT, TupleT >::update_statistics(), and tim::lightweight_tuple< Types >::update_statistics().

◆ _cleanup_parser

bool tim::_cleanup_parser = parser == nullptr

Definition at line 280 of file config.cpp.

◆ _cleanup_settings

bool tim::_cleanup_settings = _settings == nullptr

Definition at line 285 of file config.cpp.

◆ _cshell

char* tim::_cshell = getenv("SHELL")

Definition at line 52 of file launch_process.cpp.

◆ _prefix

◆ _settings

◆ _shell

std::string tim::_shell = (_cshell) ? _cshell : (_ushell) ? getusershell() : "/bin/sh"

Definition at line 54 of file launch_process.cpp.

◆ _suffix

char argparse::argument_parser const std::string const std::string & tim::_suffix

◆ _ushell

char* tim::_ushell = getusershell()

Definition at line 53 of file launch_process.cpp.

◆ add_secondary

tim::add_secondary

Definition at line 1677 of file settings.cpp.

◆ allow_signal_handler

tim::allow_signal_handler

Definition at line 1790 of file settings.cpp.

◆ argv

◆ auto_output

tim::auto_output

Definition at line 1621 of file settings.cpp.

◆ banner

tim::banner

Definition at line 1636 of file settings.cpp.

◆ collapse_processes

◆ collapse_threads

tim::collapse_threads

◆ components

◆ cout_output

◆ cpu_affinity

tim::cpu_affinity

Definition at line 1674 of file settings.cpp.

◆ cpu_roofline_events

tim::cpu_roofline_events

Definition at line 1738 of file settings.cpp.

◆ cpu_roofline_mode

tim::cpu_roofline_mode

Definition at line 1734 of file settings.cpp.

Referenced by tim::component::cpu_roofline< Types >::event_mode().

◆ craypat_categories

tim::craypat_categories

Definition at line 1778 of file settings.cpp.

◆ ctest_notes

tim::ctest_notes

Definition at line 1633 of file settings.cpp.

◆ cuda_event_batch_size

◆ cupti_activity_kinds

tim::cupti_activity_kinds

Definition at line 1725 of file settings.cpp.

Referenced by tim::component::cupti_activity::get_initializer().

◆ cupti_activity_level

tim::cupti_activity_level

Definition at line 1723 of file settings.cpp.

Referenced by tim::component::cupti_activity::get_initializer().

◆ cupti_device

tim::cupti_device

◆ cupti_events

tim::cupti_events

◆ cupti_metrics

tim::cupti_metrics

◆ dart_count

tim::dart_count

Definition at line 1670 of file settings.cpp.

◆ dart_label

◆ dart_output

tim::dart_output

Definition at line 1627 of file settings.cpp.

Referenced by tim::operation::finalize::print< Tp, true >::execute().

◆ dart_type

tim::dart_type

Definition at line 1669 of file settings.cpp.

◆ debug

tim::debug

Definition at line 1635 of file settings.cpp.

Referenced by tim::operation::finalize::mpi_get< Type, true >::mpi_get(), tim::bundle< Tag, BundleT, TupleT >::~bundle(), tim::component::caliper_common::_init(), tim::component::malloc_gotcha::audit(), tim::component::cpu_roofline< Types >::configure(), tim::component::gotcha< Nt, BundleT, DiffT >::construct(), tim::component::data_tracker< InpT, Tag >::description(), tim::base::ring_buffer::destroy(), tim::component::cpu_roofline< Types >::event_mode(), tim::sampling::sampler< CompT< Types... >, N, SigIds... >::execute(), tim::ert::counter< DeviceT, Tp, Counter >::get_buffer(), tim::ert::configuration< DeviceT, Tp, CounterT >::get_executor(), tim::component::papi_common::get_initializer(), tim::component::cpu_roofline< Types >::global_finalize(), tim::component::gpu_roofline< Types >::global_finalize(), tim::component::cpu_roofline< Types >::global_init(), tim::component::user_bundle< Idx, Tag >::global_init(), tim::bundle< Tag, BundleT, TupleT >::init(), tim::component::papi_common::initialize(), tim::component::papi_common::initialize_papi(), tim::data::stream::insert(), tim::operation::finalize::mpi_get< Type, true >::operator()(), tim::operation::finalize::upc_get< Type, true >::operator()(), tim::operation::finalize::get< Type, true >::operator()(), tim::policy::record_statistics< CompT, Tp >::operator()(), tim::operation::finalize::ctest_notes_deleter::operator()(), tim::ert::ops_main(), tim::plotting::operation::plot(), tim::config::read_command_line(), tim::component::user_bundle< Idx, Tag >::reset(), tim::sampling::sampler< CompT< Types... >, N, SigIds... >::set_delay(), tim::sampling::sampler< CompT< Types... >, N, SigIds... >::set_frequency(), tim::component::caliper_config::start(), tim::component::gotcha< Nt, BundleT, DiffT >::start(), tim::component::caliper_config::stop(), tim::component::gotcha< Nt, BundleT, DiffT >::stop(), tim::component::cpu_roofline< Types >::thread_init(), timemory_add_hash_id(), timemory_add_hash_ids(), timemory_copy_hash_ids(), timemory_push_trace(), and timemory_push_trace_hash().

◆ destructor_report

tim::destructor_report

Definition at line 1781 of file settings.cpp.

◆ diff_output

tim::diff_output

Definition at line 1630 of file settings.cpp.

Referenced by tim::operation::finalize::print< Tp, true >::execute().

◆ disable_all_signals

tim::disable_all_signals

Definition at line 1794 of file settings.cpp.

◆ ec

auto tim::ec = tim::popen::pclose(fp)

Definition at line 73 of file launch_process.cpp.

Referenced by if().

◆ else

tim::else
Initial value:
{
static std::string _c = "-c"

Definition at line 47 of file launch_process.cpp.

◆ enable_all_signals

tim::enable_all_signals

Definition at line 1792 of file settings.cpp.

◆ enable_signal_handler

tim::enable_signal_handler

Definition at line 1788 of file settings.cpp.

◆ enabled

◆ err_action

auto tim::err_action
Initial value:
= [=](const parser_err_t& _err) {
if(dmp::rank() == 0 && _err)
std::cerr << "[timemory_argparse]> Error! " << _err << std::endl;
}
typename parser_t::result_type parser_err_t
Definition: config.cpp:265

Definition at line 274 of file config.cpp.

Referenced by on_error().

◆ ert_alignment

tim::ert_alignment

◆ ert_block_size

tim::ert_block_size

◆ ert_grid_size

tim::ert_grid_size

◆ ert_max_data_size

tim::ert_max_data_size

◆ ert_max_data_size_cpu

tim::ert_max_data_size_cpu

Definition at line 1772 of file settings.cpp.

◆ ert_max_data_size_gpu

tim::ert_max_data_size_gpu

◆ ert_min_working_size

tim::ert_min_working_size

◆ ert_min_working_size_cpu

tim::ert_min_working_size_cpu

◆ ert_min_working_size_gpu

tim::ert_min_working_size_gpu

◆ ert_num_streams

tim::ert_num_streams

◆ ert_num_threads

tim::ert_num_threads

◆ ert_num_threads_cpu

tim::ert_num_threads_cpu

◆ ert_num_threads_gpu

tim::ert_num_threads_gpu

◆ ert_skip_ops

tim::ert_skip_ops

◆ exe_name

tim::exe_name = (argc > 0) ? argv[0] : ""

Definition at line 77 of file config.cpp.

Referenced by for(), if(), TIMEMORY_CONFIG_LINKAGE(), and timemory_trace_init().

◆ extra

const std::string& tim::extra

Definition at line 38 of file launch_process.cpp.

Referenced by if().

◆ file_output

◆ flamegraph_output

tim::flamegraph_output

Definition at line 1631 of file settings.cpp.

◆ flat_profile

tim::flat_profile

Definition at line 1797 of file settings.cpp.

Referenced by tim::component::caliper_common::get_nested().

◆ fp

tim::fp = nullptr

Definition at line 42 of file launch_process.cpp.

Referenced by if().

◆ global_components

tim::global_components

Definition at line 1682 of file settings.cpp.

Referenced by tim::env::get_user_bundle_variables().

◆ gpu_roofline_events

tim::gpu_roofline_events

Definition at line 1740 of file settings.cpp.

◆ gpu_roofline_mode

tim::gpu_roofline_mode

Definition at line 1736 of file settings.cpp.

Referenced by tim::component::gpu_roofline< Types >::event_mode().

◆ help_action

auto tim::help_action
Initial value:
= [](parser_t& p) {
if(dmp::rank() == 0)
p.print_help("-- <NON_TIMEMORY_ARGS>");
exit(EXIT_SUCCESS);
}

Definition at line 268 of file config.cpp.

◆ input_extensions

tim::input_extensions

Definition at line 1667 of file settings.cpp.

◆ input_path

tim::input_path

◆ input_prefix

tim::input_prefix

◆ instruction_roofline

tim::instruction_roofline

Definition at line 1748 of file settings.cpp.

Referenced by tim::component::gpu_roofline< Types >::configure().

◆ json_output

tim::json_output

◆ kokkos_components

tim::kokkos_components

Definition at line 1698 of file settings.cpp.

Referenced by tim::env::get_user_bundle_variables().

◆ list_components

tim::list_components

Definition at line 1686 of file settings.cpp.

◆ max_depth

◆ max_thread_bookmarks

tim::max_thread_bookmarks

Definition at line 1672 of file settings.cpp.

◆ max_width

tim::max_width

Definition at line 1645 of file settings.cpp.

Referenced by tim::data::base::stream_entry::construct().

◆ memory_precision

tim::memory_precision

Definition at line 1654 of file settings.cpp.

◆ memory_scientific

tim::memory_scientific

Definition at line 1659 of file settings.cpp.

◆ memory_units

◆ memory_width

tim::memory_width

Definition at line 1656 of file settings.cpp.

◆ mpi_finalize

tim::mpi_finalize

Definition at line 1702 of file settings.cpp.

◆ mpi_init

tim::mpi_init

Definition at line 1701 of file settings.cpp.

◆ mpi_thread

tim::mpi_thread

Definition at line 1703 of file settings.cpp.

◆ mpi_thread_type

tim::mpi_thread_type

Definition at line 1704 of file settings.cpp.

◆ mpip_components

tim::mpip_components

Definition at line 1690 of file settings.cpp.

Referenced by tim::env::get_user_bundle_variables().

◆ ncclp_components

tim::ncclp_components

Definition at line 1692 of file settings.cpp.

Referenced by tim::env::get_user_bundle_variables().

◆ node_count

◆ nvtx_marker_device_sync

tim::nvtx_marker_device_sync

◆ ompt_components

tim::ompt_components

Definition at line 1688 of file settings.cpp.

Referenced by tim::env::get_user_bundle_variables().

◆ os

◆ output_path

tim::output_path

◆ output_prefix

◆ papi_attach

tim::papi_attach

Definition at line 1717 of file settings.cpp.

Referenced by tim::component::papi_common::initialize().

◆ papi_events

tim::papi_events

Definition at line 1716 of file settings.cpp.

Referenced by tim::component::papi_common::get_initializer().

◆ papi_fail_on_error

tim::papi_fail_on_error

Definition at line 1713 of file settings.cpp.

Referenced by tim::component::papi_common::get_initializer().

◆ papi_multiplexing

tim::papi_multiplexing

Definition at line 1711 of file settings.cpp.

Referenced by tim::component::papi_common::initialize().

◆ papi_overflow

tim::papi_overflow

Definition at line 1718 of file settings.cpp.

Referenced by tim::component::papi_common::initialize().

◆ papi_quiet

tim::papi_quiet

Definition at line 1715 of file settings.cpp.

◆ papi_threading

tim::papi_threading

Definition at line 1709 of file settings.cpp.

◆ parser

char argparse::argument_parser * tim::parser

Definition at line 187 of file config.cpp.

Referenced by for().

◆ plot_output

tim::plot_output

Definition at line 1629 of file settings.cpp.

Referenced by tim::operation::finalize::print< Tp, true >::execute().

◆ pos

◆ precision

◆ profiler_components

tim::profiler_components

Definition at line 1696 of file settings.cpp.

Referenced by tim::env::get_user_bundle_variables().

◆ python_exe

tim::python_exe

Definition at line 1783 of file settings.cpp.

◆ return

if argc tim::return

Definition at line 262 of file config.cpp.

◆ roofline_mode

◆ roofline_type_labels

tim::roofline_type_labels

◆ roofline_type_labels_cpu

tim::roofline_type_labels_cpu

Definition at line 1744 of file settings.cpp.

Referenced by tim::component::cpu_roofline< Types >::label().

◆ roofline_type_labels_gpu

tim::roofline_type_labels_gpu

Definition at line 1746 of file settings.cpp.

Referenced by tim::component::gpu_roofline< Types >::label().

◆ scientific

tim::scientific

Definition at line 1646 of file settings.cpp.

◆ separator_frequency

tim::separator_frequency

Definition at line 1785 of file settings.cpp.

Referenced by tim::data::stream::separator_frequency().

◆ stack_clearing

tim::stack_clearing

Definition at line 1675 of file settings.cpp.

◆ suppress_config

tim::suppress_config

Definition at line 1618 of file settings.cpp.

◆ suppress_parsing

tim::suppress_parsing

Definition at line 1616 of file settings.cpp.

◆ text_output

◆ throttle_count

tim::throttle_count

Definition at line 1678 of file settings.cpp.

◆ throttle_value

tim::throttle_value

Definition at line 1680 of file settings.cpp.

◆ time_format

tim::time_format

Definition at line 1642 of file settings.cpp.

◆ time_output

tim::time_output

Definition at line 1628 of file settings.cpp.

◆ timeline_profile

tim::timeline_profile

Definition at line 1798 of file settings.cpp.

◆ timing_precision

tim::timing_precision

Definition at line 1647 of file settings.cpp.

◆ timing_scientific

tim::timing_scientific

Definition at line 1652 of file settings.cpp.

◆ timing_units

◆ timing_width

tim::timing_width

Definition at line 1649 of file settings.cpp.

◆ trace_components

tim::trace_components

Definition at line 1694 of file settings.cpp.

Referenced by tim::env::get_user_bundle_variables().

◆ tree_output

◆ true [1/2]

return tim::true

Definition at line 104 of file launch_process.cpp.

◆ tuple_components

tim::tuple_components

Definition at line 1684 of file settings.cpp.

◆ upcxx_finalize

tim::upcxx_finalize

Definition at line 1707 of file settings.cpp.

◆ upcxx_init

tim::upcxx_init

Definition at line 1706 of file settings.cpp.

◆ verbose

tim::verbose

Definition at line 1634 of file settings.cpp.

Referenced by tim::operation::finalize::mpi_get< Type, true >::mpi_get(), tim::bundle< Tag, BundleT, TupleT >::~bundle(), tim::component::caliper_common::_init(), tim::component::malloc_gotcha::audit(), tim::component::cpu_roofline< Types >::configure(), tim::component::data_tracker< InpT, Tag >::description(), tim::base::ring_buffer::destroy(), tim::component::cpu_roofline< Types >::event_mode(), tim::ert::configuration< DeviceT, Tp, CounterT >::get_executor(), tim::component::papi_common::get_initializer(), tim::component::cpu_roofline< Types >::global_finalize(), tim::component::gpu_roofline< Types >::global_finalize(), tim::component::cpu_roofline< Types >::global_init(), tim::component::user_bundle< Idx, Tag >::global_init(), tim::bundle< Tag, BundleT, TupleT >::init(), tim::component::papi_common::initialize(), tim::component::papi_common::initialize_papi(), tim::operation::finalize::mpi_get< Type, true >::operator()(), tim::operation::finalize::upc_get< Type, true >::operator()(), tim::operation::finalize::ctest_notes_deleter::operator()(), tim::ert::ops_main(), tim::plotting::operation::plot(), tim::config::read_command_line(), tim::component::user_bundle< Idx, Tag >::reset(), tim::sampling::sampler< CompT< Types... >, N, SigIds... >::set_delay(), tim::sampling::sampler< CompT< Types... >, N, SigIds... >::set_frequency(), tim::component::cpu_roofline< Types >::thread_init(), timemory_begin_record(), timemory_begin_record_enum(), timemory_begin_record_types(), timemory_end_record(), timemory_get_begin_record(), timemory_get_begin_record_enum(), timemory_get_begin_record_types(), and timemory_init_library().

◆ width

tim::width