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::get_data< Tp > Struct Template Reference

The purpose of this operation class is to combine the output types from the "get()" member function for multiple components – this is specifically used in the Python interface to provide direct access to the results. More...

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

+ Collaboration diagram for tim::operation::get_data< Tp >:

Public Types

using type = Tp
 
using data_type = decltype(std::declval< type >().get())
 

Public Member Functions

 get_data (const type &obj, data_type &dst)
 
template<typename Dp , typename... Args>
 get_data (const type &obj, Dp &dst, Args &&... args)
 
data_type operator() (const type &_obj)
 

Detailed Description

template<typename Tp>
struct tim::operation::get_data< Tp >

The purpose of this operation class is to combine the output types from the "get()" member function for multiple components – this is specifically used in the Python interface to provide direct access to the results.

Definition at line 97 of file get.hpp.

Member Typedef Documentation

◆ data_type

template<typename Tp >
using tim::operation::get_data< Tp >::data_type = decltype(std::declval<type>().get())

Definition at line 100 of file get.hpp.

◆ type

template<typename Tp >
using tim::operation::get_data< Tp >::type = Tp

Definition at line 99 of file get.hpp.

Constructor & Destructor Documentation

◆ get_data() [1/2]

template<typename Tp >
tim::operation::get_data< Tp >::get_data ( const type obj,
data_type dst 
)
inline

Definition at line 107 of file get.hpp.

107{ sfinae(obj, 0, 0, dst); }

◆ get_data() [2/2]

template<typename Tp >
template<typename Dp , typename... Args>
tim::operation::get_data< Tp >::get_data ( const type obj,
Dp &  dst,
Args &&...  args 
)
inline

Definition at line 110 of file get.hpp.

111 {
112 static_assert(std::is_same<Dp, data_type>::value, "Error! Dp != type::get()");
113 sfinae(obj, 0, 0, dst, std::forward<Args>(args)...);
114 }

Member Function Documentation

◆ operator()()

template<typename Tp >
data_type tim::operation::get_data< Tp >::operator() ( const type _obj)
inline

Definition at line 116 of file get.hpp.

117 {
118 data_type _data{};
119 sfinae(_obj, 0, 0, _data);
120 return _data;
121 }
decltype(std::declval< type >().get()) data_type
Definition: get.hpp:100

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