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::operation::compose< RetType, LhsType, RhsType > Struct Template Reference

The purpose of this operation class is operating on two components to compose a result, e.g. use system-clock and user-clock to get a cpu-clock. More...

#include "timemory/operations/types/compose.hpp"

+ Collaboration diagram for tim::operation::compose< RetType, LhsType, RhsType >:

Public Types

using ret_value_type = typename RetType::value_type
 
using lhs_value_type = typename LhsType::value_type
 
using rhs_value_type = typename RhsType::value_type
 
using ret_base_type = typename RetType::base_type
 
using lhs_base_type = typename LhsType::base_type
 
using rhs_base_type = typename RhsType::base_type
 

Static Public Member Functions

static RetType generate (const lhs_base_type &lhs, const rhs_base_type &rhs)
 
template<typename Func , typename... Args>
static RetType generate (const lhs_base_type &lhs, const rhs_base_type &rhs, const Func &func, Args &&... args)
 

Public Attributes

 TIMEMORY_DELETED_OBJECT (compose) static_assert(std
 

Detailed Description

template<typename RetType, typename LhsType, typename RhsType>
struct tim::operation::compose< RetType, LhsType, RhsType >

The purpose of this operation class is operating on two components to compose a result, e.g. use system-clock and user-clock to get a cpu-clock.

Definition at line 52 of file compose.hpp.

Member Typedef Documentation

◆ lhs_base_type

template<typename RetType , typename LhsType , typename RhsType >
using tim::operation::compose< RetType, LhsType, RhsType >::lhs_base_type = typename LhsType::base_type

Definition at line 59 of file compose.hpp.

◆ lhs_value_type

template<typename RetType , typename LhsType , typename RhsType >
using tim::operation::compose< RetType, LhsType, RhsType >::lhs_value_type = typename LhsType::value_type

Definition at line 55 of file compose.hpp.

◆ ret_base_type

template<typename RetType , typename LhsType , typename RhsType >
using tim::operation::compose< RetType, LhsType, RhsType >::ret_base_type = typename RetType::base_type

Definition at line 58 of file compose.hpp.

◆ ret_value_type

template<typename RetType , typename LhsType , typename RhsType >
using tim::operation::compose< RetType, LhsType, RhsType >::ret_value_type = typename RetType::value_type

Definition at line 54 of file compose.hpp.

◆ rhs_base_type

template<typename RetType , typename LhsType , typename RhsType >
using tim::operation::compose< RetType, LhsType, RhsType >::rhs_base_type = typename RhsType::base_type

Definition at line 60 of file compose.hpp.

◆ rhs_value_type

template<typename RetType , typename LhsType , typename RhsType >
using tim::operation::compose< RetType, LhsType, RhsType >::rhs_value_type = typename RhsType::value_type

Definition at line 56 of file compose.hpp.

Member Function Documentation

◆ generate() [1/2]

template<typename RetType , typename LhsType , typename RhsType >
static RetType tim::operation::compose< RetType, LhsType, RhsType >::generate ( const lhs_base_type lhs,
const rhs_base_type rhs 
)
inlinestatic

Definition at line 70 of file compose.hpp.

71 {
72 RetType ret;
73 ret.set_is_running(false);
74 ret.set_is_on_stack(false);
75 ret.set_is_transient(lhs.get_is_transient() && rhs.get_is_transient());
76 ret.laps = std::min(lhs.laps, rhs.laps);
77 ret.value = (lhs.value + rhs.value);
78 ret.accum = (lhs.accum + rhs.accum);
79 return ret;
80 }
::tim::statistics< Tp > min(::tim::statistics< Tp > lhs, const Tp &rhs)
Definition: statistics.hpp:329

References std::min().

◆ generate() [2/2]

template<typename RetType , typename LhsType , typename RhsType >
template<typename Func , typename... Args>
static RetType tim::operation::compose< RetType, LhsType, RhsType >::generate ( const lhs_base_type lhs,
const rhs_base_type rhs,
const Func &  func,
Args &&...  args 
)
inlinestatic

Definition at line 83 of file compose.hpp.

85 {
86 RetType ret(std::forward<Args>(args)...);
87 ret.set_is_running(false);
88 ret.set_is_on_stack(false);
89 ret.set_is_transient(lhs.get_is_transient() && rhs.get_is_transient());
90 ret.laps = std::min(lhs.laps, rhs.laps);
91 ret.value = func(lhs.value, rhs.value);
92 ret.accum = func(lhs.accum, rhs.accum);
93 return ret;
94 }

References std::min().

Member Data Documentation

◆ TIMEMORY_DELETED_OBJECT

template<typename RetType , typename LhsType , typename RhsType >
tim::operation::compose< RetType, LhsType, RhsType >::TIMEMORY_DELETED_OBJECT(compose) static_assert(std

Definition at line 67 of file compose.hpp.


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