timemory  3.2.1
Modular C++ Toolkit for Performance Analysis and Logging. Profiling API and Tools for C, C++, CUDA, Fortran, and Python. The C++ template API is essentially a framework to creating tools: it is designed to provide a unifying interface for recording various performance measurements alongside data logging and interfaces to other tools.
tim Namespace Reference

Namespaces

 alias
 
 api
 
 argparse
 
 audit
 
 base
 
 cereal
 
 component
 
 concepts
 
 config
 
 crtp
 
 cupti
 
 data
 
 data_storage
 
 device
 
 env
 
 ert
 
 filepath
 
 func
 
 invoke
 
 kokkosp
 
 lifetime
 
 math
 
 mpl
 
 node
 
 ompt
 
 openmp
 
 operation
 
 plotting
 
 policy
 
 popen
 
 quirk
 
 runtime
 
 sampling
 
 scope
 
 socket
 
 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;"
 
 trace
 
 trait
 
 units
 
 utility
 
 variadic
 

Classes

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  env_settings
 
class  source_location
 Provides source location information and variadic joining of source location tags. More...
 
class  manager
 
class  lightweight_tuple
 This is a variadic component wrapper which provides the least amount of runtime and compilation overhead. More...
 
struct  get_index_sequence
 
struct  get_index_sequence< Tuple< Types... > >
 
struct  storage_initializer
 This provides an object that can initialize the storage opaquely, e.g. More...
 
struct  remove_pointers
 
struct  remove_pointers< Tuple< Tp... > >
 
struct  basic_tree
 Basic hierarchical tree implementation. Expects population from tim::graph. More...
 
struct  settings
 
struct  tsettings
 Implements a specific setting. More...
 
struct  vsettings
 Virtual base class for storing settings. More...
 
class  storage
 
class  storage< Tp, type_list<> >
 
class  tgraph_node
 A node in the graph, combining links to other nodes as well as the actual data. More...
 
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...
 
class  graph_allocator
 
struct  complete_types
 
struct  available_types
 
class  signal_settings
 
class  singleton
 Thread-safe singleton management. More...
 
class  singleton< void, void, void >
 
struct  identity
 
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  type_list
 lightweight tuple-alternative for meta-programming logic More...
 
struct  hasher
 
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< Tag, Types... >
 
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  stack_bundle
 
struct  stack_bundle< type_list< Types... > >
 
struct  api_bundle
 
struct  api_bundle< ApiT, type_list< Types... > >
 
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...
 
class  component_bundle< Tag, Types... >
 
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  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  auto_base_bundle
 Static polymorphic base class for automatic start/stop bundlers. 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  component_hybrid
 
class  auto_hybrid
 

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
 
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 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
 
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...
 
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)
 
template<typename... Types, typename... Args, enable_if_t<(sizeof...(Types) > 0 &&sizeof...(Args) >=2), int > >
void timemory_init (Args &&... _args)
 
 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)
 
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)
 
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)
 
 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)
 
template<>
bool get_env (const std::string &env_id, bool _default)
 
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 &_hash_map
 
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, const string_view_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 (const string_view_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 (hash_value_t _hash_id, hash_value_t _alias_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...
 
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 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 >
TIMEMORY_NOCLONE storage_singleton< Tp > * get_storage_singleton ()
 
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 FuncT , typename TraitsT = mpl::function_traits<FuncT>>
std::string mangle (const std::string &func)
 
bool launch_process (const char *cmd, const std::string &extra, std::ostream *os)
 
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 &&...) TIMEMORY_HIDDEN
 
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 , typename ApiT = TIMEMORY_API, size_t N = 4>
mutex_ttype_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...
 
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 ()
 
template<typename Tp >
auto typeid_hash ()
 
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...
 
template<typename T >
size_t get_hash (T &&obj)
 
size_t get_hash (const string_view_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
 
 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
 

Detailed Description

Extern template declarations


Class Documentation

◆ 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
type

◆ tim::graph_allocator

class tim::graph_allocator

template<typename Tp>
class tim::graph_allocator< Tp >

Definition at line 187 of file types.hpp.

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

◆ tim::complete_types

struct tim::complete_types

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

Definition at line 201 of file types.hpp.

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

◆ tim::available_types

struct tim::available_types

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

Definition at line 214 of file types.hpp.

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

◆ 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::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 >:

◆ tim::bundle

class tim::bundle

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

Static polymorphic base class for component bundlers.

Definition at line 51 of file bundle.hpp.

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

◆ 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::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: declaration.hpp:49
char ** argv
Definition: definition.hpp:59
ContainerT delimit(const std::string &line, const std::string &delimiters="\"',;: ", PredicateT &&predicate=[](const std::string &s) -> std::string { return s;})
Definition: utility.hpp:666
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::component_hybrid

class tim::component_hybrid

template<typename TupleT, typename ListT>
class tim::component_hybrid< TupleT, ListT >

Definition at line 84 of file types.hpp.

+ Collaboration diagram for tim::component_hybrid< TupleT, ListT >:

◆ tim::auto_hybrid

class tim::auto_hybrid

template<typename TupleT, typename ListT>
class tim::auto_hybrid< TupleT, ListT >

Definition at line 87 of file types.hpp.

+ Collaboration diagram for tim::auto_hybrid< TupleT, ListT >:

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 533 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 826 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 115 of file utility.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 246 of file types.hpp.

◆ available_auto_tuple_t

Definition at line 247 of file types.hpp.

◆ available_component_list_t

Definition at line 244 of file types.hpp.

◆ available_component_tuple_t

◆ available_list_t

Definition at line 254 of file types.hpp.

◆ available_tuple_t

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

Definition at line 243 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 230 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 238 of file types.hpp.

◆ complete_auto_tuple_t

Definition at line 239 of file types.hpp.

◆ complete_component_list_t

Definition at line 236 of file types.hpp.

◆ complete_component_tuple_t

Definition at line 237 of file types.hpp.

◆ complete_list_t

Definition at line 253 of file types.hpp.

◆ complete_tuple_t

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

Definition at line 235 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 227 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 744 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 747 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 819 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 816 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 811 of file types.hpp.

◆ global_bundle_t

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

Definition at line 258 of file types.hpp.

◆ hash_alias_map_t

using tim::hash_alias_map_t = typedef std::unordered_map<hash_value_t, hash_value_t>

Definition at line 83 of file types.hpp.

◆ hash_alias_ptr_t

using tim::hash_alias_ptr_t = typedef std::shared_ptr<hash_alias_map_t>

Definition at line 86 of file types.hpp.

◆ hash_map_ptr_pair_t

Definition at line 85 of file types.hpp.

◆ hash_map_ptr_t

using tim::hash_map_ptr_t = typedef std::shared_ptr<hash_map_t>

Definition at line 84 of file types.hpp.

◆ hash_map_t

using tim::hash_map_t = typedef std::unordered_map<hash_value_t, std::string>

Definition at line 82 of file types.hpp.

◆ hash_resolver_t

using tim::hash_resolver_t = typedef std::function<bool(hash_value_t, std::string&)>

Definition at line 87 of file types.hpp.

◆ hash_resolver_vec_t

using tim::hash_resolver_vec_t = typedef std::vector<hash_resolver_t>

Definition at line 88 of file types.hpp.

◆ hash_value_t

using tim::hash_value_t = typedef size_t

Definition at line 81 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 536 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 521 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 533 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 738 of file types.hpp.

◆ is_stack_wrapper_t

template<typename T >
using tim::is_stack_wrapper_t = typedef typename concepts::is_stack_wrapper<T>::type

Definition at line 530 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 524 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 527 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 260 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 111 of file utility.hpp.

◆ ncclp_bundle_t

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

Definition at line 261 of file types.hpp.

◆ ompt_bundle_t

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

Definition at line 259 of file types.hpp.

◆ parser_err_t

Definition at line 287 of file definition.hpp.

◆ parser_t

Definition at line 286 of file definition.hpp.

◆ 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 1048 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 530 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 177 of file types.hpp.

◆ string

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

Definition at line 52 of file macros.hpp.

◆ string_t

using tim::string_t = typedef std::string

Definition at line 105 of file utility.hpp.

◆ string_view_t

using tim::string_view_t = typedef std::string

Definition at line 100 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 524 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 527 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 822 of file types.hpp.

Enumeration Type Documentation

◆ sys_signal

enum 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 69 of file declaration.hpp.

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

Function Documentation

◆ add_argument()

parser tim::add_argument ( )

Definition at line 332 of file definition.hpp.

333  { "--timemory-args" })

◆ add_hash_id() [1/4]

void tim::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 
)

◆ add_hash_id() [2/4]

hash_value_t tim::add_hash_id ( const string_view_t _prefix)
inline

add an string to the default hash-map (if it doesn't already exist) and return the hash

Definition at line 207 of file types.hpp.

208 {
209  return add_hash_id(get_hash_ids(), _prefix);
210 }
void add_hash_id(hash_value_t _hash_id, hash_value_t _alias_hash_id)
char const std::string & _prefix
Definition: definition.hpp:59
hash_map_ptr_t & get_hash_ids()

References _prefix, add_hash_id(), and get_hash_ids().

◆ add_hash_id() [3/4]

hash_value_t tim::add_hash_id ( hash_map_ptr_t _hash_map,
const string_view_t _prefix 
)
inline

add an string to the given hash-map (if it doesn't already exist) and return the hash

Definition at line 187 of file types.hpp.

188 {
190  if(_hash_map && _hash_map->find(_hash_id) == _hash_map->end())
191  {
192  (*_hash_map)[_hash_id] = std::string{ _prefix };
193  }
194  return _hash_id;
195 }
size_t hash_value_t
Definition: types.hpp:81
hash_value_t get_hash_id(const hash_alias_ptr_t &_hash_alias, hash_value_t _hash_id)
tim::mpl::apply< std::string > string
Definition: macros.hpp:52
hash_value_t _hash_id
Definition: definition.hpp:83

References _hash_id, _prefix, and get_hash_id().

Referenced by tim::source_location::source_location(), add_hash_id(), tim::base::storage::add_hash_id(), tim::cereal::load(), tim::bundle< Tag, BundleT, TupleT >::rekey(), tim::lightweight_tuple< Types >::rekey(), tim::bundle< Tag, BundleT, TupleT >::serialize(), tim::lightweight_tuple< Types >::serialize(), timemory_add_hash_id(), and timemory_push_trace().

◆ add_hash_id() [4/4]

void tim::add_hash_id ( hash_value_t  _hash_id,
hash_value_t  _alias_hash_id 
)

◆ add_hash_resolver()

template<typename FuncT >
size_t tim::add_hash_resolver ( FuncT &&  _func)

Definition at line 261 of file types.hpp.

262 {
263  auto _resolvers = get_hash_resolvers();
264  if(!_resolvers)
265  return 0;
266  _resolvers->emplace_back(std::forward<FuncT>(_func));
267  return _resolvers->size();
268 }
std::shared_ptr< hash_resolver_vec_t > & get_hash_resolvers()

References get_hash_resolvers().

◆ 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 }
components
Definition: settings.cpp:1394

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 {
84  configure<Bundle>(enumerate_components(tim::delimit(components)),
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 666 of file utility.hpp.

666  : ",
667  PredicateT&& predicate = [](const std::string& s) -> std::string { return s; })
668 {
669  ContainerT _result{};
670  size_t _beginp = 0; // position that is the beginning of the new string
671  size_t _delimp = 0; // position of the delimiter in the string
672  while(_beginp < line.length() && _delimp < line.length())
673  {
674  // find the first character (starting at _delimp) that is not a delimiter
675  _beginp = line.find_first_not_of(delimiters, _delimp);
676  // if no a character after or at _end that is not a delimiter is not found
677  // then we are done
678  if(_beginp == std::string::npos)
679  break;
680  // starting at the position of the new string, find the next delimiter
681  _delimp = line.find_first_of(delimiters, _beginp);
682  std::string _tmp{};
683  try
684  {
685  // starting at the position of the new string, get the characters
686  // between this position and the next delimiter
687  _tmp = line.substr(_beginp, _delimp - _beginp);
688  } catch(std::exception& e)
689  {
690  // print the exception but don't fail, unless maybe it should?
691  fprintf(stderr, "%s\n", e.what());
692  }
693  // don't add empty strings
694  if(!_tmp.empty())
695  {
696  _result.insert(_result.end(), predicate(_tmp));
697  }
698  }
699  return _result;
700 }

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(), if(), initialize(), tim::env::initialize(), insert(), tim::env::insert(), launch_process(), 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 271 of file utility.hpp.

272 {
273  // static because a type demangle will always be the same
274  static auto _val = demangle(typeid(Tp).name());
275  return _val;
276 }
auto demangle()
Definition: utility.hpp:271

References demangle().

Referenced by try_demangle().

◆ demangle() [2/3]

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

Definition at line 166 of file utility.hpp.

167 {
168 #if defined(TIMEMORY_ENABLE_DEMANGLE)
169  // return the mangled since there is no buffer
170  if(!_mangled_name)
171  return std::string{};
172 
173  int _ret = 0;
174  std::string _demangled_name{ _mangled_name };
175  if(!_status)
176  _status = &_ret;
177 
178  // PARAMETERS to __cxa_demangle
179  // mangled_name:
180  // A NULL-terminated character string containing the name to be demangled.
181  // buffer:
182  // A region of memory, allocated with malloc, of *length bytes, into which the
183  // demangled name is stored. If output_buffer is not long enough, it is expanded
184  // using realloc. output_buffer may instead be NULL; in that case, the demangled
185  // name is placed in a region of memory allocated with malloc.
186  // _buflen:
187  // If length is non-NULL, the length of the buffer containing the demangled name
188  // is placed in *length.
189  // status:
190  // *status is set to one of the following values
191  char* _demang = abi::__cxa_demangle(_mangled_name, nullptr, nullptr, _status);
192  switch(*_status)
193  {
194  // 0 : The demangling operation succeeded.
195  // -1 : A memory allocation failiure occurred.
196  // -2 : mangled_name is not a valid name under the C++ ABI mangling rules.
197  // -3 : One of the arguments is invalid.
198  case 0:
199  {
200  if(_demang)
201  _demangled_name = std::string{ _demang };
202  break;
203  }
204  case -1:
205  {
206  char _msg[1024];
207  ::memset(_msg, '\0', 1024 * sizeof(char));
208  ::snprintf(_msg, 1024, "memory allocation failure occurred demangling %s",
209  _mangled_name);
210  ::perror(_msg);
211  break;
212  }
213  case -2: break;
214  case -3:
215  {
216  char _msg[1024];
217  ::memset(_msg, '\0', 1024 * sizeof(char));
218  ::snprintf(_msg, 1024, "Invalid argument in: (\"%s\", nullptr, nullptr, %p)",
219  _mangled_name, (void*) _status);
220  ::perror(_msg);
221  break;
222  }
223  default: break;
224  };
225 
226  // free allocated buffer
227  ::free(_demang);
228  return _demangled_name;
229 #else
230  (void) _status;
231  return _mangled_name;
232 #endif
233 }

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 238 of file utility.hpp.

239 {
240  return demangle(_str.c_str(), _status);
241 }

References demangle().

◆ demangle_hash_identifier()

std::string tim::demangle_hash_identifier ( std::string  ,
char  bdelim = '[',
char  edelim = ']' 
)

◆ 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 334 of file definition.hpp.

335  : 'NAME=VALUE'. E.g. --timemory-args "
336  "\"papi_events=PAPI_TOT_INS,PAPI_TOT_CYC\" text_output=off")
337  .action([&](parser_t& p) {
338  // get the options
339  auto vopt = p.get<std::vector<std::string>>("timemory-args");
340  for(auto& str : vopt)
341  {
342  // get the args
343  auto vec = tim::delimit(str, " \t;:");
344  for(const auto& itr : vec)
345  {
346  DEBUG_PRINT_HERE("Processing: %s", itr.c_str());
347  auto _pos = itr.find('=');
348  auto _key = itr.substr(0, _pos);
349  auto _val = (_pos == std::string::npos) ? "" : itr.substr(_pos + 1);
350  if(!_settings->update(_key, _val, false))
351  {
352  std::cerr << "[timemory_argparse]> Warning! For "
353  "--timemory-args, key \""
354  << _key << "\" is not a recognized setting. \"" << _val
355  << "\" was not applied." << std::endl;
356  }
357  }
358  }
359  });
argparse::argument_parser parser_t
Definition: definition.hpp:286
char argparse::argument_parser tim::settings * _settings
Definition: definition.hpp:277
#define DEBUG_PRINT_HERE(...)
Definition: macros.hpp:163

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 39 of file utility.cpp.

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

◆ 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:263

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  {
93  return enumerate_components(tim::delimit(names));
94  }
95 }

References delimit(), and enumerate_components().

◆ err_action()

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

◆ finalize()

void tim::finalize ( )
inline

Definition at line 119 of file types.hpp.

120 {
122 }

References timemory_finalize().

◆ for() [1/3]

tim::for ( auto &itr :exe_name  )

Definition at line 123 of file definition.hpp.

123  : exe_name)
124  {
125  if(itr == '_')
126  itr = '-';
127  }
std::string exe_name
Definition: definition.hpp:107

◆ for() [2/3]

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

Definition at line 116 of file definition.hpp.

116  : _exe_suffixes)
117  {
118  if(exe_name.find(ext) != std::string::npos)
119  exe_name.erase(exe_name.find(ext), ext.length() + 1);
120  }

References exe_name.

◆ for() [3/3]

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

Definition at line 323 of file definition.hpp.

323  : _settings->ordering())
324  {
325  auto sitr = _settings->find(itr);
326  if(sitr != _settings->end() && sitr->second)
327  {
328  sitr->second->add_argument(*parser);
329  }
330  }
char argparse::argument_parser & parser
Definition: definition.hpp:209

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 321 of file utility.hpp.

322 {
323  std::stringstream ss;
324  ss << cstr;
325  T val{};
326  ss >> val;
327  return val;
328 }

◆ from_string() [2/2]

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

Definition at line 308 of file utility.hpp.

309 {
310  std::stringstream ss;
311  ss << str;
312  T val{};
313  ss >> val;
314  return val;
315 }

◆ 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 65 of file serialization.hpp.

69  {})
70 {
71  std::ofstream ofs(fname.c_str());
72  if(ofs)
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 }
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.

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

◆ 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 143 of file serialization.hpp.

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

◆ 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 }

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 }

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 622 of file lightweight_tuple.hpp.

624 {
625  return _obj.get();
626 }

◆ get_bool()

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

Definition at line 117 of file utility.cpp.

118 {
119  // empty string returns default
120  if(strbool.empty())
121  return _default;
122 
123  // check if numeric
124  if(strbool.find_first_not_of("0123456789") == std::string::npos)
125  {
126  if(strbool.length() > 1 || strbool[0] != '0')
127  return true;
128  return false;
129  }
130 
131  // convert to lowercase
132  auto _val = std::string{ strbool };
133  for(auto& itr : _val)
134  itr = tolower(itr);
135 
136  // check for matches to acceptable forms of false
137  for(const auto& itr : { "off", "false", "no", "n", "f" })
138  {
139  if(_val == itr)
140  return false;
141  }
142 
143  // check for matches to acceptable forms of true
144  for(const auto& itr : { "on", "true", "yes", "y", "t" })
145  {
146  if(_val == itr)
147  return true;
148  }
149 
150  return _default;
151 }

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

◆ get_combined_hash_id() [1/2]

hash_value_t tim::get_combined_hash_id ( hash_value_t  _lhs,
hash_value_t  _rhs 
)

Definition at line 158 of file types.hpp.

159 {
160  return (_lhs ^= _rhs + 0x9e3779b9 + (_lhs << 6) + (_lhs >> 2));
161 }

Referenced by get_combined_hash_id().

◆ get_combined_hash_id() [2/2]

template<typename Tp , std::enable_if_t<!std::is_integral< std::decay_t< Tp >>::value, int > = 0>
hash_value_t tim::get_combined_hash_id ( hash_value_t  _lhs,
Tp &&  _rhs 
)

Definition at line 167 of file types.hpp.

168 {
169  return get_combined_hash_id(_lhs, get_hash_id(std::forward<Tp>(_rhs)));
170 }
hash_value_t get_combined_hash_id(hash_value_t _lhs, Tp &&_rhs)
Definition: types.hpp:167

References get_combined_hash_id(), and get_hash_id().

Referenced by tim::scope::config::compute_hash().

◆ get_demangled_hash_identifier()

template<typename... Args>
auto tim::get_demangled_hash_identifier ( Args &&...  _args)

Definition at line 283 of file types.hpp.

284 {
285  return demangle_hash_identifier(get_hash_identifier(std::forward<Args>(_args)...));
286 }
std::string demangle_hash_identifier(std::string, char bdelim='[', char edelim=']')
std::string get_hash_identifier(hash_value_t _hash_id)

References demangle_hash_identifier(), and get_hash_identifier().

◆ get_env() [1/3]

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

◆ get_env() [2/3]

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

◆ get_env() [3/3]

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

Definition at line 171 of file declaration.hpp.

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

References tim::env_settings::instance().

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

◆ get_hash() [1/3]

size_t tim::get_hash ( const char *  cstr)

Definition at line 809 of file utility.hpp.

810 {
811  return std::hash<string_view_t>{}(cstr);
812 }

◆ get_hash() [2/3]

size_t tim::get_hash ( const string_view_t str)

Definition at line 801 of file utility.hpp.

802 {
803  return std::hash<string_view_t>{}(str);
804 }

◆ get_hash() [3/3]

template<typename T >
size_t tim::get_hash ( T &&  obj)

Definition at line 793 of file utility.hpp.

794 {
795  return std::hash<decay_t<T>>()(std::forward<T>(obj));
796 }

Referenced by tim::hasher< T >::operator()().

◆ get_hash_aliases()

hash_alias_ptr_t& tim::get_hash_aliases ( )

◆ get_hash_id() [1/2]

hash_value_t tim::get_hash_id ( const hash_alias_ptr_t _hash_alias,
hash_value_t  _hash_id 
)

◆ get_hash_id() [2/2]

template<typename Tp , std::enable_if_t< concepts::is_string_type< std::decay_t< Tp >>::value, int > = 0>
hash_value_t tim::get_hash_id ( Tp &&  _prefix)

Definition at line 140 of file types.hpp.

141 {
142  return std::hash<string_view_t>{}(std::forward<Tp>(_prefix));
143 }

References _prefix.

Referenced by add_hash_id(), get_combined_hash_id(), tim::operation::push_node< Tp >::operator()(), timemory_is_throttled(), timemory_pop_trace(), and timemory_reset_throttle().

◆ get_hash_identifier() [1/2]

std::string tim::get_hash_identifier ( const hash_map_ptr_t _hash_map,
const hash_alias_ptr_t _hash_alias,
hash_value_t  _hash_id 
)

◆ get_hash_identifier() [2/2]

std::string tim::get_hash_identifier ( hash_value_t  _hash_id)

◆ get_hash_identifier_fast()

string_view_t tim::get_hash_identifier_fast ( hash_value_t  _hash)
inline

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

Definition at line 237 of file types.hpp.

238 {
239  auto& _hash_ids = get_hash_ids();
240  auto itr = _hash_ids->find(_hash);
241  if(itr != _hash_ids->end())
242  return itr->second;
243  return "";
244 }

References get_hash_ids().

Referenced by tim::bundle< Tag, BundleT, TupleT >::set_prefix().

◆ get_hash_ids()

◆ get_hash_resolvers()

std::shared_ptr<hash_resolver_vec_t>& tim::get_hash_resolvers ( )

◆ 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)

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 632 of file lightweight_tuple.hpp.

634 {
635  return _obj.get_labeled();
636 }

◆ get_local_datetime()

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

Definition at line 132 of file settings.cpp.

133 {
134  char mbstr[100];
135  if(!dt_curr)
136  dt_curr = settings::get_launch_time(TIMEMORY_API{});
137 
138  if(std::strftime(mbstr, sizeof(mbstr), dt_format, std::localtime(dt_curr)))
139  return std::string{ mbstr };
140  return std::string{};
141 }

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() [1/2]

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

Definition at line 74 of file declaration.hpp.

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

References consume_parameters().

◆ get_storage_singleton() [2/2]

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

Definition at line 74 of file declaration.hpp.

75 {
76  using singleton_type = tim::storage_singleton<Tp>;
77  using component_type = typename Tp::component_type;
78  static auto _instance = std::unique_ptr<singleton_type>(
79  (trait::runtime_enabled<component_type>::get()) ? new singleton_type{} : nullptr);
80  static auto _dtor = scope::destructor{ []() { _instance.reset(); } };
81  return _instance.get();
82  consume_parameters(_dtor);
83 }

References consume_parameters().

◆ if() [1/8]

tim::if ( _alias_itr !  = _hash_alias->end()) -> second

◆ if() [2/8]

tim::if ( _cleanup_parser  )

◆ if() [3/8]

tim::if ( _cleanup_settings &&!  _shared_settings)

◆ if() [4/8]

tim::if ( _cleanup_settings  )

◆ if() [5/8]

tim::if ( _manager  )

Definition at line 162 of file definition.hpp.

163  {
164  _manager->update_metadata_prefix();
165  }

◆ if() [6/8]

tim::if ( _settings  )

Definition at line 63 of file definition.hpp.

64  {
65  if(_settings->get_debug() || _settings->get_verbose() > 3)
66  PRINT_HERE("%s", "");
67 
68  if(_settings->get_enable_signal_handler())
69  {
70  auto default_signals = signal_settings::get_default();
71  for(const auto& itr : default_signals)
72  signal_settings::enable(itr);
73  // should return default and any modifications from environment
74  auto enabled_signals = signal_settings::get_enabled();
75  enable_signal_detection(enabled_signals);
76  }
77 
78  auto _ncfg = _settings->get_suppress_config();
79  if(!_ncfg)
80  {
81  // default configuration files
82  std::set<std::string> _dcfg = {
83  get_env<string_t>("HOME") + std::string("/.timemory.cfg"),
84  get_env<string_t>("HOME") + std::string("/.timemory.json"),
85  get_env<string_t>("HOME") + std::string("/.config/timemory.cfg"),
86  get_env<string_t>("HOME") + std::string("/.config/timemory.json")
87  };
88 
89  auto _cfg = _settings->get_config_file();
90  auto _files = tim::delimit(_cfg, ",;");
91  for(const auto& citr : _files)
92  {
93  std::ifstream ifs(citr);
94  if(ifs)
95  {
96  _settings->read(ifs, citr);
97  }
98  else if(_dcfg.find(citr) == _dcfg.end())
99  {
100  TIMEMORY_EXCEPTION(std::string("Error reading configuration file: ") +
101  citr);
102  }
103  }
104  }
105  }
bool enable_signal_detection(signal_settings::signal_set_t=signal_settings::get_default())
Definition: signals.hpp:368
#define PRINT_HERE(...)
Definition: macros.hpp:147
#define TIMEMORY_EXCEPTION(...)
Definition: types.hpp:137

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

◆ if() [7/8]

◆ if() [8/8]

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.

74 {
76 }

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.

63 {
65 }

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/8]

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, and insert().

◆ insert() [2/8]

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/8]

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.

69 {
71 }

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

◆ insert() [4/8]

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)
121  runtime::insert(obj, components[i]);
122 }

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

◆ insert() [5/8]

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.

57 {
59 }

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

◆ insert() [6/8]

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(), enumerate_components(), and insert().

◆ insert() [7/8]

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

◆ insert() [8/8]

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

References insert().

◆ 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 40 of file kokkosp.cpp.

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

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 127 of file utility.hpp.

128 {
129 #if defined(TIMEMORY_WINDOWS)
130  // Windows seems to be missing std::isfinite
131  return (arg == arg && arg != std::numeric_limits<Tp>::infinity() &&
132  arg != -std::numeric_limits<Tp>::infinity())
133  ? true
134  : false;
135 #else
136  return std::isfinite(arg);
137 #endif
138 }
bool isfinite(const Tp &arg)
Definition: utility.hpp:127

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

◆ launch_process()

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

Definition at line 172 of file popen.hpp.

173 {
174 #if !defined(TIMEMORY_WINDOWS)
175  auto delim = tim::delimit(cmd, " \t");
176  tim::popen::TIMEMORY_PIPE* fp = nullptr;
177  if(delim.size() < 2)
178  {
179  fp = tim::popen::popen(cmd, nullptr, nullptr);
180  }
181  else
182  {
183  static std::string _c = "-c";
184  std::array<char*, 4> _args;
185  _args.fill(nullptr);
186  char* _cshell = getenv("SHELL");
187  char* _ushell = getusershell();
188  std::string _shell = (_cshell) ? _cshell : (_ushell) ? getusershell() : "/bin/sh";
189  _args.at(0) = (char*) _shell.c_str();
190  _args.at(1) = (char*) _c.c_str();
191  _args.at(2) = (char*) cmd;
192  fp = tim::popen::popen(_args.at(0), _args.data());
193  }
194 
195  if(fp == nullptr)
196  {
197  std::stringstream ss;
198  ss << "[timemory]> Error launching command: '" << cmd << "'... " << extra;
199  perror(ss.str().c_str());
200  return false;
201  }
202  if(os)
203  {
204  popen::flush_output(*os, fp);
205  }
206 
207  auto ec = tim::popen::pclose(fp);
208  if(ec != 0)
209  {
210  std::stringstream ss;
211  ss << "[timemory]> Command: '" << cmd << "' returned a non-zero exit code: " << ec
212  << "... " << extra;
213  perror(ss.str().c_str());
214  return false;
215  }
216 #else
217  if(std::system(nullptr) != 0)
218  {
219  int ec = std::system(cmd);
220 
221  if(ec != 0)
222  {
223  fprintf(stderr,
224  "[timemory]> Command: '%s' returned a non-zero exit code: %i... %s\n",
225  cmd, ec, extra.c_str());
226  return false;
227  }
228  }
229  else
230  {
231  fprintf(stderr, "std::system unavailable for command: '%s'... %s\n", cmd,
232  extra.c_str());
233  return false;
234  }
235  (void) os;
236 #endif
237 
238  return true;
239 }
TIMEMORY_PIPE * popen(const char *path, char **argv, char **envp)
Definition: popen.cpp:225
std::ostream & flush_output(std::ostream &os, TIMEMORY_PIPE *proc, int max_counter=0)
Definition: popen.hpp:128
int pclose(TIMEMORY_PIPE *p)
Definition: popen.cpp:323

References tim::plotting::cmd, delimit(), tim::popen::flush_output(), tim::popen::pclose(), and tim::popen::popen().

Referenced by 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 200 of file declaration.hpp.

201 {
202  if(env_id.empty())
203  return _default;
204 
205  auto* _env_settings = env_settings::instance();
206  if(!_env_settings)
207  return _default;
208 
209  auto itr = _env_settings->get(env_id);
210  if(itr != _env_settings->end())
211  {
212  std::stringstream iss{ itr->second };
213  auto var = Tp{};
214  iss >> var;
215  return var;
216  }
217 
218  // return default if not specified in environment
219  return _default;
220 }

References tim::env_settings::instance().

◆ makedir()

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

Definition at line 66 of file utility.cpp.

67 {
68 #if defined(TIMEMORY_UNIX)
69  while(_dir.find("\\\\") != std::string::npos)
70  _dir.replace(_dir.find("\\\\"), 2, "/");
71  while(_dir.find('\\') != std::string::npos)
72  _dir.replace(_dir.find('\\'), 1, "/");
73 
74  if(_dir.length() == 0)
75  return 0;
76 
77  int ret = mkdir(_dir.c_str(), umask);
78  if(ret != 0)
79  {
80  int err = errno;
81  if(err != EEXIST)
82  {
83  std::cerr << "mkdir(" << _dir.c_str() << ", " << umask
84  << ") returned: " << ret << std::endl;
85  std::stringstream _sdir;
86  _sdir << "/bin/mkdir -p " << _dir;
87  return (launch_process(_sdir.str().c_str())) ? 0 : 1;
88  }
89  }
90 #elif defined(TIMEMORY_WINDOWS)
91  consume_parameters(umask);
92  while(_dir.find('/') != std::string::npos)
93  _dir.replace(_dir.find('/'), 1, "\\");
94 
95  if(_dir.length() == 0)
96  return 0;
97 
98  int ret = _mkdir(_dir.c_str());
99  if(ret != 0)
100  {
101  int err = errno;
102  if(err != EEXIST)
103  {
104  std::cerr << "_mkdir(" << _dir.c_str() << ") returned: " << ret << std::endl;
105  std::stringstream _sdir;
106  _sdir << "mkdir " << _dir;
107  return (launch_process(_sdir.str().c_str())) ? 0 : 1;
108  }
109  }
110 #endif
111  return 0;
112 }
const string_t const string_t & _dir
Definition: definition.hpp:52
bool launch_process(const char *cmd, const std::string &extra, std::ostream *os)
Definition: popen.hpp:172

References tim::plotting::_dir, consume_parameters(), and launch_process().

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

◆ 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()

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 3269 of file graph.hpp.

3270 {
3271  int head_count = t.number_of_siblings(t.begin());
3272  int nhead = 0;
3273  for(typename tim::graph<T>::sibling_iterator ritr = t.begin(); ritr != t.end();
3274  ++ritr, ++nhead)
3275  {
3276  print_subgraph(t, format, ritr, str);
3277  if(nhead != head_count)
3278  {
3279  str << std::endl;
3280  }
3281  }
3282 }
Iterator which traverses only the nodes which are siblings of each other.
Definition: graph.hpp:445
pre_order_iterator end() const
Return iterator to the end of the graph.
Definition: graph.hpp:1006
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:2477
pre_order_iterator begin() const
Return iterator to the beginning of the graph.
Definition: graph.hpp:997
void print_subgraph(const tim::graph< T > &t, Formatter format, typename tim::graph< T >::iterator root, std::ostream &str=std::cout)
Definition: graph.hpp:3312

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 3288 of file graph.hpp.

3289 {
3290  auto _formatter = [](const T& obj) {
3291  std::stringstream ss;
3292  ss << obj;
3293  return ss.str();
3294  };
3295  int head_count = t.number_of_siblings(t.begin());
3296  int nhead = 0;
3297  for(typename tim::graph<T>::sibling_iterator ritr = t.begin(); ritr != t.end();
3298  ++ritr, ++nhead)
3299  {
3300  print_subgraph(t, _formatter, ritr, str);
3301  if(nhead != head_count)
3302  {
3303  str << std::endl;
3304  }
3305  }
3306 }

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 3190 of file graph.hpp.

3191 {
3192  int head_count = t.number_of_siblings(t.begin());
3193  int nhead = 0;
3194  for(typename graph<T>::sibling_iterator ritr = t.begin(); ritr != t.end();
3195  ++ritr, ++nhead)
3196  {
3197  print_subgraph_bracketed(t, ritr, os);
3198  if(nhead != head_count)
3199  {
3200  os << std::endl;
3201  }
3202  }
3203 }
void print_subgraph_bracketed(const graph< T > &t, typename graph< T >::iterator root, std::ostream &os=std::cout)
Definition: graph.hpp:3211

References tim::graph< T, AllocatorT >::begin(), tim::graph< T, AllocatorT >::end(), tim::graph< T, AllocatorT >::number_of_siblings(), 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 3364 of file graph.hpp.

3365 {
3366  int head_count = t.number_of_siblings(t.begin());
3367  int nhead = 0;
3368  for(typename tim::graph<T>::sibling_iterator ritr = t.begin(); ritr != t.end();
3369  ++ritr, ++nhead)
3370  {
3371  print_subgraph_hierarchy(t, format, ritr, str);
3372  if(nhead != head_count)
3373  {
3374  str << std::endl;
3375  }
3376  }
3377 }
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:3383

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 3312 of file graph.hpp.

3314 {
3315  if(t.empty())
3316  return;
3317  if(t.number_of_children(root) == 0)
3318  {
3319  os << format(*root);
3320  }
3321  else
3322  {
3323  // parent
3324  std::string str = format(*root);
3325  if(str.length() > 0)
3326  os << str << "\n";
3327  // child1, ..., childn
3328  int sibling_count = t.number_of_siblings(t.begin(root));
3329  int nsiblings;
3330  typename tim::graph<T>::sibling_iterator children;
3331  for(children = t.begin(root), nsiblings = 0; children != t.end(root);
3332  ++children, ++nsiblings)
3333  {
3334  // recursively print child
3335  print_subgraph(t, format, children, os);
3336  // comma after every child except the last one
3337  if(nsiblings != sibling_count)
3338  {
3339  os << "\n";
3340  }
3341  }
3342  }
3343 }
bool empty() const
Check if graph is empty.
Definition: graph.hpp:2363
static unsigned int number_of_children(const iterator_base &)
Count the number of children of node at position.
Definition: graph.hpp:2461

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

Referenced by print_graph().

◆ 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 3211 of file graph.hpp.

3213 {
3214  static int _depth = 0;
3215  if(t.empty())
3216  return;
3217 
3218  auto m_depth = _depth++;
3219  std::string indent = {};
3220  for(int i = 0; i < m_depth; ++i)
3221  indent += " ";
3222 
3223  if(t.number_of_children(root) == 0)
3224  {
3225  os << "\n" << indent << *root;
3226  }
3227  else
3228  {
3229  // parent
3230  os << "\n" << indent << *root;
3231  os << "(";
3232  // child1, ..., childn
3233  int sibling_count = t.number_of_siblings(t.begin(root));
3234  int nsiblings;
3235  typename graph<T>::sibling_iterator children;
3236  for(children = t.begin(root), nsiblings = 0; children != t.end(root);
3237  ++children, ++nsiblings)
3238  {
3239  // recursively print child
3240  print_subgraph_bracketed(t, children, os);
3241  // comma after every child except the last one
3242  if(nsiblings != sibling_count)
3243  {
3244  os << ", ";
3245  }
3246  }
3247  os << ")";
3248  }
3249  --_depth;
3250 }

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

Referenced by print_graph_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 3383 of file graph.hpp.

3385 {
3386  if(t.empty())
3387  return;
3388  if(t.number_of_children(root) == 0)
3389  {
3390  os << format(*root);
3391  }
3392  else
3393  {
3394  // parent
3395  std::string str = format(*root);
3396  if(str.length() > 0)
3397  os << str << "\n" << std::setw(2 * (t.depth(root) + 1)) << "|_";
3398  // child1, ..., childn
3399  int sibling_count = t.number_of_siblings(t.begin(root));
3400  int nsiblings;
3401  typename tim::graph<T>::sibling_iterator children;
3402  for(children = t.begin(root), nsiblings = 0; children != t.end(root);
3403  ++children, ++nsiblings)
3404  {
3405  // recursively print child
3406  print_subgraph_hierarchy(t, format, children, os);
3407  // comma after every child except the last one
3408  if(nsiblings != sibling_count)
3409  {
3410  os << "\n" << std::setw(2 * (t.depth(root) + 1)) << "|_";
3411  }
3412  }
3413  }
3414 }
static int depth(const iterator_base &)
Compute the depth to the root or to a fixed other iterator.
Definition: graph.hpp:2374

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(), and tim::graph< T, AllocatorT >::number_of_siblings().

Referenced by print_graph_hierarchy().

◆ read_command_line()

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

Definition at line 285 of file utility.cpp.

286 {
287  std::vector<std::string> _cmdline;
288 #if defined(TIMEMORY_LINUX)
289  std::stringstream fcmdline;
290  fcmdline << "/proc/" << _pid << "/cmdline";
291  std::ifstream ifs(fcmdline.str().c_str());
292  if(ifs)
293  {
294  char cstr;
295  std::string sarg;
296  while(!ifs.eof())
297  {
298  ifs >> cstr;
299  if(!ifs.eof())
300  {
301  if(cstr != '\0')
302  {
303  sarg += cstr;
304  }
305  else
306  {
307  _cmdline.push_back(sarg);
308  sarg = "";
309  }
310  }
311  }
312  ifs.close();
313  }
314 
315 #else
316  consume_parameters(_pid);
317 #endif
318  return _cmdline;
319 }

References consume_parameters().

Referenced by tim::config::read_command_line(), and timemory_trace_init().

◆ set_env()

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

Definition at line 226 of file declaration.hpp.

227 {
228  std::stringstream ss_val;
229  ss_val << _val;
230 #if defined(TIMEMORY_MACOS) || (defined(TIMEMORY_LINUX) && (_POSIX_C_SOURCE >= 200112L))
231  setenv(env_var.c_str(), ss_val.str().c_str(), override);
232 #elif defined(TIMEMORY_WINDOWS)
233  auto _curr = get_env<std::string>(env_var, "");
234  if(_curr.empty() || override > 0)
235  _putenv_s(env_var.c_str(), ss_val.str().c_str());
236 #else
237  consume_parameters(env_var, _val, override, ss_val);
238 #endif
239 }

References consume_parameters().

Referenced by tim::settings::insert(), kokkosp_init_library(), 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 708 of file utility.hpp.

710 {
711  size_t _beg_pos = 0; // position that is the beginning of the new string
712  size_t _end_pos = 0; // position of the delimiter in the string
713  std::string _result = input;
714  while(_beg_pos < _result.length() && _end_pos < _result.length())
715  {
716  // find the first sequence of characters after the end-position
717  _beg_pos = _result.find(_begin, _end_pos);
718 
719  // if sequence wasn't found, we are done
720  if(_beg_pos == std::string::npos)
721  break;
722 
723  // starting after the position of the first delimiter, find the end sequence
724  if(!_end.empty())
725  _end_pos = _result.find(_end, _beg_pos + 1);
726  else
727  _end_pos = _beg_pos + _begin.length();
728 
729  // break if not found
730  if(_end_pos == std::string::npos)
731  break;
732 
733  // length of the substr being operated on
734  auto _len = _end_pos - _beg_pos;
735 
736  // get the substring between the two delimiters (including first delimiter)
737  auto _sub = _result.substr(_beg_pos, _len);
738 
739  // apply the transform
740  auto _transformed = predicate(_sub);
741 
742  // only replace if necessary
743  if(_sub != _transformed)
744  {
745  _result = _result.replace(_beg_pos, _len, _transformed);
746  // move end to the end of transformed string
747  _end_pos = _beg_pos + _transformed.length();
748  }
749  }
750  return _result;
751 }

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 170 of file definition.hpp.

173 {
174  auto* cstr = const_cast<char*>(exe_name.c_str());
175  auto _argc = 1;
176  auto* _argv = &cstr;
177  timemory_init(_argc, _argv, _prefix, _suffix);
178 }
const string_t & _prefix
Definition: definition.hpp:52
char const std::string const std::string & _suffix
Definition: definition.hpp:61

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

◆ TIMEMORY_ENVIRONMENT_LINKAGE() [1/6]

template<>
tim::TIMEMORY_ENVIRONMENT_LINKAGE ( bool  ) const

Definition at line 227 of file definition.hpp.

229 {
230  if(env_id.empty())
231  return _default;
232 
233  auto* _env_settings = env_settings::instance();
234  char* env_var = std::getenv(env_id.c_str());
235  if(env_var)
236  {
237  std::string var = std::string(env_var);
238  bool val = true;
239  if(var.find_first_not_of("0123456789") == std::string::npos)
240  {
241  val = (bool) atoi(var.c_str());
242  }
243  else
244  {
245  for(auto& itr : var)
246  itr = tolower(itr);
247  for(const auto& itr : { "off", "false", "no", "n", "f", "0" })
248  {
249  if(var == itr)
250  {
251  if(_env_settings)
252  _env_settings->insert<bool>(env_id, false);
253  return false;
254  }
255  }
256  }
257  if(_env_settings)
258  _env_settings->insert<bool>(env_id, val);
259  return val;
260  }
261  // record default value
262  if(_env_settings)
263  _env_settings->insert<bool>(env_id, _default);
264 
265  // return default if not specified in environment
266  return _default;
267 }

References tim::env_settings::instance().

◆ TIMEMORY_ENVIRONMENT_LINKAGE() [2/6]

tim::TIMEMORY_ENVIRONMENT_LINKAGE ( env_settings::env_map_t  )

Definition at line 96 of file definition.hpp.

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

◆ TIMEMORY_ENVIRONMENT_LINKAGE() [3/6]

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

Definition at line 84 of file definition.hpp.

85 {
86  if(m_id == 0)
87  {
88  delete m_env;
89  for(auto& itr : m_env_other)
90  delete itr;
91  }
92 }

◆ TIMEMORY_ENVIRONMENT_LINKAGE() [4/6]

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

Definition at line 198 of file definition.hpp.

200 {
201  if(env_id.empty())
202  return _default;
203 
204  auto* _env_settings = env_settings::instance();
205  char* env_var = std::getenv(env_id.c_str());
206  if(env_var)
207  {
208  std::stringstream ss;
209  ss << env_var;
210  if(_env_settings)
211  _env_settings->insert(env_id, ss.str());
212  return ss.str();
213  }
214  // record default value
215  if(_env_settings)
216  _env_settings->insert(env_id, _default);
217 
218  // return default if not specified in environment
219  return _default;
220 }

References tim::env_settings::instance().

◆ TIMEMORY_ENVIRONMENT_LINKAGE() [5/6]

tim::TIMEMORY_ENVIRONMENT_LINKAGE ( tim::env_settings )

Definition at line 338 of file definition.hpp.

340 {
341  static std::atomic<int> _count{ 0 };
342  static env_settings _instance{};
343  static thread_local int _id = _count++;
344  static thread_local env_settings* _local =
345  (_id == 0) ? (&_instance) : new env_settings{ &_instance, _id };
346  static thread_local auto _ldtor = scope::destructor{ []() {
347  if(_local == &_instance || _id == 0)
348  return;
349  delete _local;
350  _local = nullptr;
351  } };
352  return _local;
353  (void) _ldtor;
354 }

◆ TIMEMORY_ENVIRONMENT_LINKAGE() [6/6]

tim::TIMEMORY_ENVIRONMENT_LINKAGE ( void  )

Definition at line 333 of file definition.hpp.

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

References tim::env_settings::instance().

◆ timemory_finalize()

void tim::timemory_finalize ( )

finalization of the specified types

Referenced by finalize(), and kokkosp_finalize_library().

◆ TIMEMORY_HASH_LINKAGE() [1/5]

tim::TIMEMORY_HASH_LINKAGE ( hash_alias_ptr_t )

Definition at line 57 of file definition.hpp.

59 {
60  static thread_local auto _inst =
61  get_shared_ptr_pair_instance<hash_alias_map_t, TIMEMORY_API>();
62  return _inst;
63 }

◆ TIMEMORY_HASH_LINKAGE() [2/5]

tim::TIMEMORY_HASH_LINKAGE ( hash_map_ptr_t )

Definition at line 47 of file definition.hpp.

49 {
50  static thread_local auto _inst =
51  get_shared_ptr_pair_instance<hash_map_t, TIMEMORY_API>();
52  return _inst;
53 }

◆ TIMEMORY_HASH_LINKAGE() [3/5]

tim::TIMEMORY_HASH_LINKAGE ( hash_value_t  ) const &

◆ TIMEMORY_HASH_LINKAGE() [4/5]

tim::TIMEMORY_HASH_LINKAGE ( std::shared_ptr< hash_resolver_vec_t > &  )

Definition at line 67 of file definition.hpp.

69 {
70  static auto _inst = []() {
71  auto _subinst = get_shared_ptr_lone_instance<hash_resolver_vec_t, TIMEMORY_API>();
72  if(_subinst && _subinst->empty())
73  _subinst->reserve(10);
74  return _subinst;
75  }();
76  return _inst;
77 }

◆ TIMEMORY_HASH_LINKAGE() [5/5]

tim::TIMEMORY_HASH_LINKAGE ( void  ) const &

◆ 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 declaration.hpp.

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

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

◆ 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 89 of file vsettings.cpp.

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

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

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")   
)

◆ try_demangle()

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

Definition at line 247 of file utility.hpp.

248 {
249  // static because a type demangle will always be the same
250  static auto _val = []() {
251  // wrap the type in type_list and then extract ... from tim::type_list<...>
252  auto _tmp = ::tim::demangle(typeid(type_list<Tp>).name());
253  auto _key = std::string{ "type_list" };
254  auto _idx = _tmp.find(_key);
255  _idx = _tmp.find('<', _idx);
256  _tmp = _tmp.substr(_idx + 1);
257  _idx = _tmp.find_last_of('>');
258  _tmp = _tmp.substr(0, _idx);
259  // strip trailing whitespaces
260  while((_idx = _tmp.find_last_of(' ')) == _tmp.length() - 1)
261  _tmp = _tmp.substr(0, _idx);
262  return _tmp;
263  }();
264  return _val;
265 }

References demangle().

◆ type_mutex()

template<typename Tp , typename ApiT = TIMEMORY_API, size_t N = 4>
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

Definition at line 157 of file utility.hpp.

158 {
159  static std::array<mutex_t, N> _mutexes{};
160  return _mutexes.at(_n % N);
161 }

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

◆ typeid_hash()

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

Definition at line 299 of file utility.hpp.

300 {
301  return internal::typeid_hash<Tp>(0);
302 }

◆ 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  {
80  enable_signal_detection(_signals);
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

◆ _cleanup_parser

bool tim::_cleanup_parser = parser == nullptr

Definition at line 302 of file definition.hpp.

◆ _cleanup_settings

bool tim::_cleanup_settings = _settings == nullptr

Definition at line 307 of file definition.hpp.

◆ _hash_alias

const hash_alias_ptr_t& tim::_hash_alias

Definition at line 93 of file definition.hpp.

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

◆ _hash_id

const hash_alias_ptr_t hash_value_t tim::_hash_id
Initial value:
{
auto _alias_itr = _hash_alias->find(_hash_id)
const hash_alias_ptr_t & _hash_alias
Definition: definition.hpp:93

Definition at line 82 of file definition.hpp.

Referenced by add_hash_id(), and tim::operation::decode< ApiT >::operator()().

◆ _prefix

◆ _settings

◆ _suffix

char argparse::argument_parser const std::string const std::string & tim::_suffix
Initial value:
{
static auto _settings = settings::shared_instance()

Definition at line 60 of file definition.hpp.

Referenced by tim::operation::print< Tp >::print(), and TIMEMORY_CONFIG_LINKAGE().

◆ add_secondary

tim::add_secondary

Definition at line 1371 of file settings.cpp.

◆ allow_signal_handler

tim::allow_signal_handler

Definition at line 1484 of file settings.cpp.

◆ argv

◆ auto_output

tim::auto_output

Definition at line 1315 of file settings.cpp.

◆ banner

tim::banner

Definition at line 1330 of file settings.cpp.

◆ collapse_processes

◆ collapse_threads

tim::collapse_threads

◆ components

◆ cout_output

◆ cpu_affinity

tim::cpu_affinity

Definition at line 1368 of file settings.cpp.

◆ cpu_roofline_events

tim::cpu_roofline_events

Definition at line 1432 of file settings.cpp.

◆ cpu_roofline_mode

tim::cpu_roofline_mode

Definition at line 1428 of file settings.cpp.

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

◆ craypat_categories

tim::craypat_categories

Definition at line 1472 of file settings.cpp.

◆ ctest_notes

tim::ctest_notes

Definition at line 1327 of file settings.cpp.

◆ cuda_event_batch_size

tim::cuda_event_batch_size

Definition at line 1413 of file settings.cpp.

Referenced by tim::component::cuda_event::get_batched_marker_size().

◆ cupti_activity_kinds

tim::cupti_activity_kinds

Definition at line 1419 of file settings.cpp.

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

◆ cupti_activity_level

tim::cupti_activity_level

Definition at line 1417 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 1364 of file settings.cpp.

◆ dart_label

◆ dart_output

tim::dart_output

Definition at line 1321 of file settings.cpp.

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

◆ dart_type

tim::dart_type

Definition at line 1363 of file settings.cpp.

◆ debug

tim::debug

Definition at line 1329 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::user_bundle< Idx, Tag >::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::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::component::user_bundle< Idx, Tag >::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::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::gotcha< Nt, BundleT, DiffT >::start(), 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 1475 of file settings.cpp.

◆ diff_output

tim::diff_output

Definition at line 1324 of file settings.cpp.

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

◆ disable_all_signals

tim::disable_all_signals

Definition at line 1488 of file settings.cpp.

◆ enable_all_signals

tim::enable_all_signals

Definition at line 1486 of file settings.cpp.

◆ enable_signal_handler

tim::enable_signal_handler

Definition at line 1482 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: definition.hpp:287

Definition at line 296 of file definition.hpp.

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 1466 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 107 of file definition.hpp.

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

◆ file_output

◆ flamegraph_output

tim::flamegraph_output

Definition at line 1325 of file settings.cpp.

◆ flat_profile

tim::flat_profile

Definition at line 1491 of file settings.cpp.

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

◆ global_components

tim::global_components

Definition at line 1376 of file settings.cpp.

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

◆ gpu_roofline_events

tim::gpu_roofline_events

Definition at line 1434 of file settings.cpp.

◆ gpu_roofline_mode

tim::gpu_roofline_mode

Definition at line 1430 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 290 of file definition.hpp.

◆ input_extensions

tim::input_extensions

Definition at line 1361 of file settings.cpp.

◆ input_path

tim::input_path

◆ input_prefix

tim::input_prefix

◆ instruction_roofline

tim::instruction_roofline

Definition at line 1442 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 1392 of file settings.cpp.

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

◆ list_components

tim::list_components

Definition at line 1380 of file settings.cpp.

◆ max_depth

◆ max_thread_bookmarks

tim::max_thread_bookmarks

Definition at line 1366 of file settings.cpp.

◆ max_width

tim::max_width

Definition at line 1339 of file settings.cpp.

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

◆ memory_precision

tim::memory_precision

Definition at line 1348 of file settings.cpp.

◆ memory_scientific

tim::memory_scientific

Definition at line 1353 of file settings.cpp.

◆ memory_units

◆ memory_width

tim::memory_width

Definition at line 1350 of file settings.cpp.

◆ mpi_finalize

tim::mpi_finalize

Definition at line 1396 of file settings.cpp.

◆ mpi_init

tim::mpi_init

Definition at line 1395 of file settings.cpp.

◆ mpi_thread

tim::mpi_thread

Definition at line 1397 of file settings.cpp.

◆ mpi_thread_type

tim::mpi_thread_type

Definition at line 1398 of file settings.cpp.

◆ mpip_components

tim::mpip_components

Definition at line 1384 of file settings.cpp.

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

◆ ncclp_components

tim::ncclp_components

Definition at line 1386 of file settings.cpp.

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

◆ node_count

◆ nvtx_marker_device_sync

tim::nvtx_marker_device_sync

Definition at line 1415 of file settings.cpp.

Referenced by tim::component::nvtx_marker::use_device_sync().

◆ ompt_components

tim::ompt_components

Definition at line 1382 of file settings.cpp.

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

◆ output_path

tim::output_path

◆ output_prefix

◆ papi_attach

tim::papi_attach

Definition at line 1411 of file settings.cpp.

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

◆ papi_events

tim::papi_events

Definition at line 1410 of file settings.cpp.

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

◆ papi_fail_on_error

tim::papi_fail_on_error

Definition at line 1407 of file settings.cpp.

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

◆ papi_multiplexing

tim::papi_multiplexing

Definition at line 1405 of file settings.cpp.

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

◆ papi_overflow

tim::papi_overflow

Definition at line 1412 of file settings.cpp.

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

◆ papi_quiet

tim::papi_quiet

Definition at line 1409 of file settings.cpp.

◆ papi_threading

tim::papi_threading

Definition at line 1403 of file settings.cpp.

◆ parser

char argparse::argument_parser * tim::parser

Definition at line 209 of file definition.hpp.

Referenced by for().

◆ plot_output

tim::plot_output

Definition at line 1323 of file settings.cpp.

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

◆ pos

◆ precision

◆ profiler_components

tim::profiler_components

Definition at line 1390 of file settings.cpp.

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

◆ python_exe

tim::python_exe

Definition at line 1477 of file settings.cpp.

◆ return

if argc tim::return

Definition at line 284 of file definition.hpp.

◆ roofline_mode

◆ roofline_type_labels

tim::roofline_type_labels

◆ roofline_type_labels_cpu

tim::roofline_type_labels_cpu

Definition at line 1438 of file settings.cpp.

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

◆ roofline_type_labels_gpu

tim::roofline_type_labels_gpu

Definition at line 1440 of file settings.cpp.

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

◆ scientific

tim::scientific

Definition at line 1340 of file settings.cpp.

◆ separator_frequency

tim::separator_frequency

Definition at line 1479 of file settings.cpp.

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

◆ stack_clearing

tim::stack_clearing

Definition at line 1369 of file settings.cpp.

◆ suppress_config

tim::suppress_config

Definition at line 1312 of file settings.cpp.

◆ suppress_parsing

tim::suppress_parsing

Definition at line 1310 of file settings.cpp.

◆ text_output

◆ throttle_count

tim::throttle_count

Definition at line 1372 of file settings.cpp.

◆ throttle_value

tim::throttle_value

Definition at line 1374 of file settings.cpp.

◆ time_format

tim::time_format

Definition at line 1336 of file settings.cpp.

◆ time_output

tim::time_output

Definition at line 1322 of file settings.cpp.

◆ timeline_profile

tim::timeline_profile

Definition at line 1492 of file settings.cpp.

◆ timing_precision

tim::timing_precision

Definition at line 1341 of file settings.cpp.

◆ timing_scientific

tim::timing_scientific

Definition at line 1346 of file settings.cpp.

◆ timing_units

◆ timing_width

tim::timing_width

Definition at line 1343 of file settings.cpp.

◆ trace_components

tim::trace_components

Definition at line 1388 of file settings.cpp.

Referenced by tim::env::get_user_bundle_variables(), and timemory_trace_init().

◆ tree_output

◆ tuple_components

tim::tuple_components

Definition at line 1378 of file settings.cpp.

◆ upcxx_finalize

tim::upcxx_finalize

Definition at line 1401 of file settings.cpp.

◆ upcxx_init

tim::upcxx_init

Definition at line 1400 of file settings.cpp.

◆ verbose

tim::verbose

Definition at line 1328 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::user_bundle< Idx, Tag >::configure(), tim::component::data_tracker< InpT, Tag >::description(), tim::base::ring_buffer::destroy(), tim::component::cpu_roofline< Types >::event_mode(), 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::component::user_bundle< Idx, Tag >::insert(), 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