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::node::entry< Tp, StatT > Struct Template Reference

This data type is used in tim::node::tree for inclusive and exclusive values. More...

#include "timemory/storage/node.hpp"

+ Collaboration diagram for tim::node::entry< Tp, StatT >:

Public Types

using base_type = std::tuple< Tp, StatT >
 
using this_type = entry
 

Public Member Functions

template<typename... Args>
 entry (Args &&... args)
 
 entry (const base_type &_obj)
 
 entry (base_type &&_obj) noexcept
 
Tp & data ()
 component object with either inclusive or exclusive values More...
 
StatT & stats ()
 statistics data with either inclusive or exclusive values More...
 
const Tp & data () const
 component object with either inclusive or exclusive values More...
 
const StatT & stats () const
 statistics data with either inclusive or exclusive values More...
 
this_typeoperator+= (const this_type &rhs)
 
this_typeoperator-= (const this_type &rhs)
 

Detailed Description

template<typename Tp, typename StatT>
struct tim::node::entry< Tp, StatT >

This data type is used in tim::node::tree for inclusive and exclusive values.

Template Parameters
TpComponent type
StatTStatistics type

Definition at line 65 of file node.hpp.

Member Typedef Documentation

◆ base_type

template<typename Tp , typename StatT >
using tim::node::entry< Tp, StatT >::base_type = std::tuple<Tp, StatT>

Definition at line 67 of file node.hpp.

◆ this_type

template<typename Tp , typename StatT >
using tim::node::entry< Tp, StatT >::this_type = entry

Definition at line 68 of file node.hpp.

Constructor & Destructor Documentation

◆ entry() [1/3]

template<typename Tp , typename StatT >
template<typename... Args>
tim::node::entry< Tp, StatT >::entry ( Args &&...  args)
inlineexplicit

Definition at line 73 of file node.hpp.

74 : base_type(std::forward<Args>(args)...)
75 {}
std::tuple< Tp, StatT > base_type
Definition: node.hpp:67

◆ entry() [2/3]

template<typename Tp , typename StatT >
tim::node::entry< Tp, StatT >::entry ( const base_type _obj)
inlineexplicit

Definition at line 76 of file node.hpp.

77 : base_type(_obj)
78 {}

◆ entry() [3/3]

template<typename Tp , typename StatT >
tim::node::entry< Tp, StatT >::entry ( base_type &&  _obj)
inlineexplicitnoexcept

Definition at line 79 of file node.hpp.

80 : base_type(std::forward<base_type>(_obj))
81 {}

Member Function Documentation

◆ data() [1/2]

template<typename Tp , typename StatT >
Tp & tim::node::entry< Tp, StatT >::data ( )
inline

component object with either inclusive or exclusive values

Definition at line 84 of file node.hpp.

84{ return std::get<0>(*this); }

Referenced by tim::cereal::load(), tim::node::entry< Tp, StatT >::operator+=(), tim::node::entry< Tp, StatT >::operator-=(), and tim::cereal::save().

◆ data() [2/2]

template<typename Tp , typename StatT >
const Tp & tim::node::entry< Tp, StatT >::data ( ) const
inline

component object with either inclusive or exclusive values

Definition at line 90 of file node.hpp.

90{ return std::get<0>(*this); }

◆ operator+=()

template<typename Tp , typename StatT >
this_type & tim::node::entry< Tp, StatT >::operator+= ( const this_type rhs)
inline

Definition at line 95 of file node.hpp.

96 {
97 data() += rhs.data();
98 stats() += rhs.stats();
99 return *this;
100 }
Tp & data()
component object with either inclusive or exclusive values
Definition: node.hpp:84
StatT & stats()
statistics data with either inclusive or exclusive values
Definition: node.hpp:87

References tim::node::entry< Tp, StatT >::data(), and tim::node::entry< Tp, StatT >::stats().

◆ operator-=()

template<typename Tp , typename StatT >
this_type & tim::node::entry< Tp, StatT >::operator-= ( const this_type rhs)
inline

Definition at line 102 of file node.hpp.

103 {
104 data() -= rhs.data();
105 stats() -= rhs.stats();
106 return *this;
107 }

References tim::node::entry< Tp, StatT >::data(), and tim::node::entry< Tp, StatT >::stats().

◆ stats() [1/2]

template<typename Tp , typename StatT >
StatT & tim::node::entry< Tp, StatT >::stats ( )
inline

statistics data with either inclusive or exclusive values

Definition at line 87 of file node.hpp.

87{ return std::get<1>(*this); }

Referenced by tim::cereal::load(), tim::node::entry< Tp, StatT >::operator+=(), tim::node::entry< Tp, StatT >::operator-=(), and tim::cereal::save().

◆ stats() [2/2]

template<typename Tp , typename StatT >
const StatT & tim::node::entry< Tp, StatT >::stats ( ) const
inline

statistics data with either inclusive or exclusive values

Definition at line 93 of file node.hpp.

93{ return std::get<1>(*this); }

The documentation for this struct was generated from the following file: