RTK  2.0.1
Reconstruction Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Static Private Attributes | List of all members
rtk::GlobalTimer Class Reference

#include <rtkGlobalTimer.h>

+ Inheritance diagram for rtk::GlobalTimer:
+ Collaboration diagram for rtk::GlobalTimer:

Public Types

using ConstPointer = itk::SmartPointer< const Self >
using Pointer = itk::SmartPointer< Self >
using Self = GlobalTimer
using Superclass = itk::Object

Public Member Functions

virtual void Clear (void)
virtual const char * GetNameOfClass () const
virtual bool GetVerbose ()
virtual void Remove (const rtk::WatcherForTimer *w)
virtual void Report (std::ostream &os=std::cout) const
virtual void SetVerbose (bool _arg)
virtual void Start (const char *name)
virtual void Stop (const char *name)
virtual void Watch (itk::ProcessObject *o)

Static Public Member Functions

static Pointer GetInstance ()
static Pointer New ()

Protected Member Functions

 GlobalTimer ()
void PrintSelf (std::ostream &os, Indent indent) const override
 ~GlobalTimer () override

Protected Attributes

rtk::TimeProbesCollectorBase m_TimeProbesCollectorBase
bool m_Verbose
std::vector< rtk::WatcherForTimer * > m_Watchers

Private Attributes

std::mutex m_Mutex

Static Private Attributes

static Pointer m_Instance

Detailed Description

Definition at line 37 of file rtkGlobalTimer.h.

Member Typedef Documentation

Definition at line 46 of file rtkGlobalTimer.h.

Definition at line 45 of file rtkGlobalTimer.h.

Standard class type alias.

Definition at line 43 of file rtkGlobalTimer.h.

Definition at line 44 of file rtkGlobalTimer.h.

Constructor & Destructor Documentation

rtk::GlobalTimer::GlobalTimer ( )
rtk::GlobalTimer::~GlobalTimer ( )

Member Function Documentation

virtual void rtk::GlobalTimer::Clear ( void  )

Destroy the set of probes. New probes can be created after invoking this method.

static Pointer rtk::GlobalTimer::GetInstance ( )

Return the singleton instance with no reference counting.

Referenced by rtk::args_info_manager< TArgsInfo, TCleanupFunction >::args_info_manager().

virtual const char* rtk::GlobalTimer::GetNameOfClass ( ) const

Run-time type information (and related methods).

virtual bool rtk::GlobalTimer::GetVerbose ( )
static Pointer rtk::GlobalTimer::New ( )

This is a singleton pattern New. There will only be ONE reference to a GlobalTimer object per process. Clients that call this must call Delete on the object so that the reference counting will work. The single instance will be unreferenced when the program exits.

void rtk::GlobalTimer::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
virtual void rtk::GlobalTimer::Remove ( const rtk::WatcherForTimer w)

Remove a watcher

virtual void rtk::GlobalTimer::Report ( std::ostream &  os = std::cout) const

Report the summary of results from the probes

virtual void rtk::GlobalTimer::SetVerbose ( bool  _arg)

Set / Get macro for verbosity

virtual void rtk::GlobalTimer::Start ( const char *  name)

Start a probe with a particular name. If the time probe does not exist, it will be created

virtual void rtk::GlobalTimer::Stop ( const char *  name)

Stop a time probe identified with a name

virtual void rtk::GlobalTimer::Watch ( itk::ProcessObject o)

Create a new watcher and store it

Member Data Documentation

Pointer rtk::GlobalTimer::m_Instance

Definition at line 96 of file rtkGlobalTimer.h.

std::mutex rtk::GlobalTimer::m_Mutex

Definition at line 97 of file rtkGlobalTimer.h.

rtk::TimeProbesCollectorBase rtk::GlobalTimer::m_TimeProbesCollectorBase

Definition at line 92 of file rtkGlobalTimer.h.

bool rtk::GlobalTimer::m_Verbose

Definition at line 89 of file rtkGlobalTimer.h.

std::vector<rtk::WatcherForTimer*> rtk::GlobalTimer::m_Watchers

Definition at line 93 of file rtkGlobalTimer.h.

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