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

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

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

Public Types

using type = Tp
 
template<typename U >
using base_t = typename U::base_type
 

Public Member Functions

 stop (type &obj)
 
 stop (type &obj, quirk::unsafe &&)
 
template<typename Arg , typename... Args>
 stop (type &obj, Arg &&arg, Args &&... args)
 
template<typename... Args>
auto operator() (type &obj, Args &&... args) const
 
template<typename... Args>
auto operator() (type &obj, quirk::unsafe &&, Args &&... args) const
 

Detailed Description

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

Definition at line 44 of file stop.hpp.

Member Typedef Documentation

◆ base_t

template<typename Tp >
template<typename U >
using tim::operation::stop< Tp >::base_t = typename U::base_type

Definition at line 49 of file stop.hpp.

◆ type

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

Definition at line 46 of file stop.hpp.

Constructor & Destructor Documentation

◆ stop() [1/3]

template<typename Tp >
tim::operation::stop< Tp >::stop ( type obj)
inlineexplicit

Definition at line 53 of file stop.hpp.

53{ impl(obj); }

◆ stop() [2/3]

template<typename Tp >
tim::operation::stop< Tp >::stop ( type obj,
quirk::unsafe &&   
)
inlineexplicit

Definition at line 54 of file stop.hpp.

54{ impl(obj, quirk::unsafe{}); }

◆ stop() [3/3]

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

Definition at line 57 of file stop.hpp.

58 {
59 impl(obj, std::forward<Arg>(arg), std::forward<Args>(args)...);
60 }

Member Function Documentation

◆ operator()() [1/2]

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

Definition at line 63 of file stop.hpp.

64 {
65 using RetT = decltype(sfinae(obj, 0, 0, std::forward<Args>(args)...));
66 if(is_running<Tp, true>{}(obj))
67 {
68 return sfinae(obj, 0, 0, std::forward<Args>(args)...);
69 }
70 return get_return<RetT>();
71 }

◆ operator()() [2/2]

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

Definition at line 74 of file stop.hpp.

75 {
76 return sfinae(obj, 0, 0, std::forward<Args>(args)...);
77 }

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