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::singleton< void, void, void > Class Reference

#include "timemory/utility/singleton.hpp"

+ Collaboration diagram for tim::singleton< void, void, void >:

Public Types

using thread_t = std::thread
 
using thread_id_t = std::thread::id
 

Static Public Member Functions

static bool is_main_thread ()
 
static thread_id_t main_thread_id ()
 
static bool init ()
 

Friends

template<typename TypeT , typename PointerT , typename TagT >
class singleton
 

Detailed Description

Definition at line 58 of file singleton.hpp.

Member Typedef Documentation

◆ thread_id_t

using tim::singleton< void, void, void >::thread_id_t = std::thread::id

Definition at line 62 of file singleton.hpp.

◆ thread_t

using tim::singleton< void, void, void >::thread_t = std::thread

Definition at line 61 of file singleton.hpp.

Member Function Documentation

◆ init()

bool tim::singleton< void, void, void >::init ( )
inlinestatic

Definition at line 95 of file singleton.hpp.

96{
97 (void) f_main_thread();
98 return true;
99}

◆ is_main_thread()

bool tim::singleton< void, void, void >::is_main_thread ( )
inlinestatic

Definition at line 87 of file singleton.hpp.

88{
89 return (std::this_thread::get_id() == f_main_thread());
90}

◆ main_thread_id()

static thread_id_t tim::singleton< void, void, void >::main_thread_id ( )
inlinestatic

Definition at line 68 of file singleton.hpp.

68{ return f_main_thread(); }

Friends And Related Function Documentation

◆ singleton

template<typename TypeT , typename PointerT , typename TagT >
friend class singleton
friend

Definition at line 75 of file singleton.hpp.


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