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

This operation class is used for sampling. More...

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

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

Public Types

using type = Tp
 

Public Member Functions

 TIMEMORY_DELETED_OBJECT (sample) explicit sample(type &obj)
 
template<typename Arg , typename... Args>
 sample (type &obj, Arg &&arg, Args &&... args)
 
template<typename... Args>
auto operator() (type &obj, Args &&... args)
 
template<typename Tp >
 sample (Tp &obj)
 

Static Public Attributes

static constexpr bool enable = trait::sampler<Tp>::value
 

Detailed Description

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

This operation class is used for sampling.

Definition at line 51 of file sample.hpp.

Member Typedef Documentation

◆ type

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

Definition at line 54 of file sample.hpp.

Constructor & Destructor Documentation

◆ sample() [1/2]

template<typename Tp >
template<typename Arg , typename... Args>
tim::operation::sample< Tp >::sample ( type obj,
Arg &&  arg,
Args &&...  args 
)

Definition at line 106 of file sample.hpp.

107{
108 sfinae(obj, 0, 0, std::forward<Arg>(arg), std::forward<Args>(args)...);
109}

◆ sample() [2/2]

template<typename Tp >
template<typename Tp >
tim::operation::sample< Tp >::sample ( Tp &  obj)

Definition at line 97 of file sample.hpp.

98{
99 sfinae(obj, 0, 0, null_type{});
100}

Member Function Documentation

◆ operator()()

template<typename Tp >
template<typename... Args>
auto tim::operation::sample< Tp >::operator() ( type obj,
Args &&...  args 
)
inline

Definition at line 64 of file sample.hpp.

65 {
66 return sfinae(obj, 0, 0, std::forward<Args>(args)...);
67 }

◆ TIMEMORY_DELETED_OBJECT()

template<typename Tp >
tim::operation::sample< Tp >::TIMEMORY_DELETED_OBJECT ( sample< Tp >  ) &

Member Data Documentation

◆ enable

template<typename Tp >
constexpr bool tim::operation::sample< Tp >::enable = trait::sampler<Tp>::value
staticconstexpr

Definition at line 53 of file sample.hpp.


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