timemory 3.3.0
Modular C++ Toolkit for Performance Analysis and Logging. Profiling API and Tools for C, C++, CUDA, Fortran, and Python. The C++ template API is essentially a framework to creating tools: it is designed to provide a unifying interface for recording various performance measurements alongside data logging and interfaces to other tools.
types.hpp File Reference
#include "timemory/api.hpp"
#include "timemory/hash/macros.hpp"
#include "timemory/hash/static_string.hpp"
#include "timemory/macros/attributes.hpp"
#include "timemory/macros/language.hpp"
#include "timemory/mpl/concepts.hpp"
#include <functional>
#include <memory>
#include <string>
#include <type_traits>
#include <unordered_map>
#include <utility>
#include <vector>
+ Include dependency graph for types.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  tim
 
namespace  tim::hash
 

Typedefs

using tim::hash::hash_value_t = size_t
 
using tim::hash::hash_map_t = std::unordered_map< hash_value_t, std::string >
 
using tim::hash::hash_alias_map_t = std::unordered_map< hash_value_t, hash_value_t >
 
using tim::hash::hash_map_ptr_t = std::shared_ptr< hash_map_t >
 
using tim::hash::hash_map_ptr_pair_t = std::pair< hash_map_ptr_t, hash_map_ptr_t >
 
using tim::hash::hash_alias_ptr_t = std::shared_ptr< hash_alias_map_t >
 
using tim::hash::hash_resolver_t = std::function< bool(hash_value_t, std::string &)>
 
using tim::hash::hash_resolver_vec_t = std::vector< hash_resolver_t >
 

Functions

template<typename Tp , typename Tag , typename PtrT , typename PairT >
PairT & tim::get_shared_ptr_pair ()
 
template<typename Tp , typename Tag , typename PtrT , typename PairT >
PtrT tim::get_shared_ptr_pair_instance ()
 
template<typename Tp , typename Tag , typename PtrT , typename PairT >
PtrT tim::get_shared_ptr_pair_main_instance ()
 
template<typename Tp , typename Tag , typename PtrT >
PtrT tim::get_shared_ptr_lone_instance ()
 
hash_map_ptr_t & tim::hash::get_hash_ids ()
 
hash_alias_ptr_t & tim::hash::get_hash_aliases ()
 
std::shared_ptr< hash_resolver_vec_t > & tim::hash::get_hash_resolvers ()
 
template<typename Tp , std::enable_if_t< concepts::is_string_type< std::decay_t< Tp > >::value, int > = 0>
hash_value_t tim::hash::get_hash_id (Tp &&_prefix)
 
hash_value_t tim::hash::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 tim::hash::get_combined_hash_id (hash_value_t _lhs, Tp &&_rhs)
 
hash_value_t tim::hash::get_hash_id (const hash_alias_ptr_t &_hash_alias, hash_value_t _hash_id)
 
hash_value_t tim::hash::add_hash_id (hash_map_ptr_t &_hash_map, string_view_cref_t _prefix)
 add an string to the given hash-map (if it doesn't already exist) and return the hash More...
 
hash_value_t tim::hash::add_hash_id (string_view_cref_t _prefix)
 add an string to the default hash-map (if it doesn't already exist) and return the hash More...
 
void tim::hash::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 tim::hash::add_hash_id (const hash_alias_ptr_t &_hash_alias, hash_value_t _hash_id, hash_value_t _alias_hash_id)
 
void tim::hash::add_hash_id (hash_value_t _hash_id, hash_value_t _alias_hash_id)
 
void tim::hash::hash_identifier_error (const hash_map_ptr_t &_hash_map, const hash_alias_ptr_t &_hash_alias, hash_value_t _hash_id)
 
string_view_t tim::hash::get_hash_identifier_fast (hash_value_t _hash)
 this does not check other threads or aliases. Only call this function when you know that the hash exists on the thread and is not an alias More...
 
bool tim::hash::get_hash_identifier_fast (hash_value_t _hash, std::string *&_v)
 
bool tim::hash::get_hash_identifier_fast (hash_value_t _hash, const char *&_v)
 
hash_map_t::const_iterator tim::hash::find_hash_identifier (const hash_map_ptr_t &_hash_map, const hash_alias_ptr_t &_hash_alias, hash_value_t _hash_id)
 
hash_map_t::const_iterator tim::hash::find_hash_identifier (hash_value_t _hash_id)
 
bool tim::hash::get_hash_identifier (const hash_map_ptr_t &_hash_map, const hash_alias_ptr_t &_hash_alias, hash_value_t _hash_id, std::string *&_ret)
 
bool tim::hash::get_hash_identifier (const hash_map_ptr_t &_hash_map, const hash_alias_ptr_t &_hash_alias, hash_value_t _hash_id, const char *&_ret)
 
bool tim::hash::get_hash_identifier (hash_value_t _hash_id, std::string *&_ret)
 
bool tim::hash::get_hash_identifier (hash_value_t _hash_id, const char *&_ret)
 
std::string tim::hash::get_hash_identifier (const hash_map_ptr_t &_hash_map, const hash_alias_ptr_t &_hash_alias, hash_value_t _hash_id)
 
std::string tim::hash::get_hash_identifier (hash_value_t _hash_id)
 
template<typename FuncT >
size_t tim::hash::add_hash_resolver (FuncT &&_func)
 
std::string tim::hash::demangle_hash_identifier (std::string, char bdelim='[', char edelim=']')
 
template<typename... Args>
auto tim::hash::get_demangled_hash_identifier (Args &&... _args)