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

Classes

struct  bit_flags
 
class  path
 
struct  transient_function
 A light-weight alternative to std::function. Pass any callback - including capturing lambdas - cheaply and quickly as a function argument. More...
 
struct  transient_function< RetT(Args...)>
 

Typedefs

using entry = data::entry
 
using header = data::header
 
using stream = data::stream
 
template<typename Tp >
using header_stream = data::header_stream< Tp >
 
template<typename Tp >
using type_id = impl::type_id< Tp >
 

Functions

template<typename... Args>
auto write_header (Args &&... args)
 
template<typename... Args>
auto write_entry (Args &&... args)
 

Class Documentation

◆ tim::utility::transient_function

struct tim::utility::transient_function
template<typename>
struct tim::utility::transient_function< typename >

A light-weight alternative to std::function. Pass any callback - including capturing lambdas - cheaply and quickly as a function argument.

  • No instantiation of called function at each call site
  • Simple to use - use transient_function<...> as the function argument
  • Low cost, cheap setup, one indirect function call to invoke
  • No risk of dynamic allocation (unlike std::function)
  • Not persistent: synchronous calls only

Definition at line 37 of file transient_function.hpp.

+ Collaboration diagram for tim::utility::transient_function< typename >:

Typedef Documentation

◆ entry

Definition at line 980 of file stream.hpp.

◆ header

Definition at line 981 of file stream.hpp.

◆ header_stream

template<typename Tp >
using tim::utility::header_stream = typedef data::header_stream<Tp>

Definition at line 985 of file stream.hpp.

◆ stream

Definition at line 982 of file stream.hpp.

◆ type_id

template<typename Tp >
using tim::utility::type_id = typedef impl::type_id<Tp>

Definition at line 76 of file type_id.hpp.

Function Documentation

◆ write_entry()

template<typename... Args>
auto tim::utility::write_entry ( Args &&...  args)

Definition at line 996 of file stream.hpp.

997{
998 return data::write_entry(std::forward<Args>(args)...);
999}
auto write_entry(Args &&... args)
Definition: stream.hpp:996

References tim::data::write_entry().

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

◆ write_header()

template<typename... Args>
auto tim::utility::write_header ( Args &&...  args)

Definition at line 989 of file stream.hpp.

990{
991 return data::write_header(std::forward<Args>(args)...);
992}
auto write_header(Args &&... args)
Definition: stream.hpp:989

References tim::data::write_header().

Referenced by tim::operation::print_header< Tp >::print_header(), and tim::operation::print_statistics< Tp >::get_header().