CASToR  3.0
Tomographic Reconstruction (PET/SPECT/CT)
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
sChronoManager Class Reference

This class is designed to manage some profiling of the code. More...

#include <sChronoManager.hh>

Collaboration diagram for sChronoManager:
Collaboration graph

Public Member Functions

 ~sChronoManager ()
 The destructor of sChronoManager. More...
 
int CheckParameters ()
 Check validity of all parameters. More...
 
int Initialize ()
 Initialize all thread-safe buffers for profiling. More...
 
void Display ()
 Display the results of the duration buffers. More...
 
void StartIterativeDataUpdateStep1 (int a_thread)
 Start the timer for duration of iterative data update step 1. More...
 
void StopIterativeDataUpdateStep1 (int a_thread)
 Stop the timer for duration of iterative data update step 1. More...
 
void StartIterativeDataUpdateStep2 (int a_thread)
 Start the timer for duration of iterative data update step 2. More...
 
void StopIterativeDataUpdateStep2 (int a_thread)
 Stop the timer for duration of iterative data update step 2. More...
 
void StartIterativeDataUpdateStep3 (int a_thread)
 Start the timer for duration of iterative data update step 3. More...
 
void StopIterativeDataUpdateStep3 (int a_thread)
 Stop the timer for duration of iterative data update step 3. More...
 
void StartIterativeDataUpdateStep4 (int a_thread)
 Start the timer for duration of iterative data update step 4. More...
 
void StopIterativeDataUpdateStep4 (int a_thread)
 Stop the timer for duration of iterative data update step 4. More...
 
void StartConvolution ()
 Start the timer for duration of convolution. More...
 
void StopConvolution ()
 Stop the timer for duration of convolution. More...
 
void StartCustomStep (int a_thread, int a_step)
 Start the timer for duration of custom step of the given index for the given thread. More...
 
void StopCustomStep (int a_thread, int a_step)
 Stop the timer for duration of custom step of the given index for the given thread. More...
 
void SetNbThreads (int a_nbThreadsForProjection, int a_nbThreadsForImageComputation)
 Set the number of threads for both projection and image computations. More...
 
void SetNbCustomSteps (int a_nbCustomSteps)
 Set the number of custom steps for profiling. More...
 
void SetVerbose (int a_verbose)
 Set the verbose level. More...
 

Static Public Member Functions

static sChronoManagerGetInstance ()
 Instantiate the singleton if not already done, then return the pointer to its instance. More...
 

Private Member Functions

 sChronoManager ()
 The constructor of sChronoManager. More...
 
 sChronoManager (sChronoManager const &)
 
void operator= (sChronoManager const &)
 

Private Attributes

int m_nbThreadsForProjection
 
int m_nbThreadsForImageComputation
 
int m_nbThreadsMax
 
DurationNanomp_durationIterativeDataUpdateStep1
 
DurationNanomp_durationIterativeDataUpdateStep2
 
DurationNanomp_durationIterativeDataUpdateStep3
 
DurationNanomp_durationIterativeDataUpdateStep4
 
ChronoTimemp_startIterativeDataUpdateStep1
 
ChronoTimemp_startIterativeDataUpdateStep2
 
ChronoTimemp_startIterativeDataUpdateStep3
 
ChronoTimemp_startIterativeDataUpdateStep4
 
DurationNano m_durationConvolution
 
ChronoTime m_startConvolution
 
int m_nbCustomSteps
 
DurationNano ** mpp_durationCustomSteps
 
ChronoTime ** mpp_startCustomSteps
 
int m_verbose
 

Static Private Attributes

static sChronoManagermp_Instance = NULL
 

Detailed Description

This class is designed to manage some profiling of the code.

We'll see for details...

Definition at line 49 of file sChronoManager.hh.

Constructor & Destructor Documentation

◆ ~sChronoManager()

public sChronoManager::~sChronoManager ( )
inline

The destructor of sChronoManager.

This is the default and unique destructor. It simply replace the instance pointer by NULL.

Definition at line 69 of file sChronoManager.hh.

Here is the call graph for this function:

◆ sChronoManager() [1/2]

sChronoManager::sChronoManager ( )
private

The constructor of sChronoManager.

This is the default and unique constructor. It does nothing.

Definition at line 45 of file sChronoManager.cc.

Here is the caller graph for this function:

◆ sChronoManager() [2/2]

sChronoManager::sChronoManager ( sChronoManager const &  )
inlineprivate

Definition at line 215 of file sChronoManager.hh.

Member Function Documentation

◆ CheckParameters()

int sChronoManager::CheckParameters ( )

Check validity of all parameters.

Returns
0 if success, another value otherwise

Definition at line 74 of file sChronoManager.cc.

Here is the caller graph for this function:

◆ Display()

void sChronoManager::Display ( )

Display the results of the duration buffers.

Definition at line 151 of file sChronoManager.cc.

Here is the caller graph for this function:

◆ GetInstance()

public static sChronoManager * sChronoManager::GetInstance ( )
inlinestatic

Instantiate the singleton if not already done, then return the pointer to its instance.

Returns
mp_Instance

Definition at line 59 of file sChronoManager.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Initialize()

int sChronoManager::Initialize ( )

Initialize all thread-safe buffers for profiling.

Returns
0 if success, another value otherwise

Definition at line 108 of file sChronoManager.cc.

Here is the caller graph for this function:

◆ operator=()

void sChronoManager::operator= ( sChronoManager const &  )
inlineprivate

Definition at line 216 of file sChronoManager.hh.

◆ SetNbCustomSteps()

public sChronoManager::SetNbCustomSteps ( int  a_nbCustomSteps)
inline

Set the number of custom steps for profiling.

Parameters
inta_nbCustomSteps

Definition at line 195 of file sChronoManager.hh.

Here is the caller graph for this function:

◆ SetNbThreads()

public sChronoManager::SetNbThreads ( int  a_nbThreadsForProjection,
int  a_nbThreadsForImageComputation 
)
inline

Set the number of threads for both projection and image computations.

Parameters
inta_nbThreadsForProjection
inta_nbThreadsForImageComputation

Definition at line 187 of file sChronoManager.hh.

Here is the caller graph for this function:

◆ SetVerbose()

public sChronoManager::SetVerbose ( int  a_verbose)
inline

Set the verbose level.

Parameters
inta_verbose

Definition at line 202 of file sChronoManager.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartConvolution()

public void sChronoManager::StartConvolution ( )
inline

Start the timer for duration of convolution.

Definition at line 155 of file sChronoManager.hh.

Here is the caller graph for this function:

◆ StartCustomStep()

public void sChronoManager::StartCustomStep ( int  a_thread,
int  a_step 
)
inline

Start the timer for duration of custom step of the given index for the given thread.

Parameters
inta_thread
inta_step

Definition at line 169 of file sChronoManager.hh.

Here is the caller graph for this function:

◆ StartIterativeDataUpdateStep1()

public void sChronoManager::StartIterativeDataUpdateStep1 ( int  a_thread)
inline

Start the timer for duration of iterative data update step 1.

Parameters
inta_thread

Definition at line 100 of file sChronoManager.hh.

Here is the caller graph for this function:

◆ StartIterativeDataUpdateStep2()

public void sChronoManager::StartIterativeDataUpdateStep2 ( int  a_thread)
inline

Start the timer for duration of iterative data update step 2.

Parameters
inta_thread

Definition at line 114 of file sChronoManager.hh.

Here is the caller graph for this function:

◆ StartIterativeDataUpdateStep3()

public void sChronoManager::StartIterativeDataUpdateStep3 ( int  a_thread)
inline

Start the timer for duration of iterative data update step 3.

Parameters
inta_thread

Definition at line 128 of file sChronoManager.hh.

Here is the caller graph for this function:

◆ StartIterativeDataUpdateStep4()

public void sChronoManager::StartIterativeDataUpdateStep4 ( int  a_thread)
inline

Start the timer for duration of iterative data update step 4.

Parameters
inta_thread

Definition at line 142 of file sChronoManager.hh.

Here is the caller graph for this function:

◆ StopConvolution()

public void sChronoManager::StopConvolution ( )
inline

Stop the timer for duration of convolution.

Definition at line 161 of file sChronoManager.hh.

Here is the caller graph for this function:

◆ StopCustomStep()

public void sChronoManager::StopCustomStep ( int  a_thread,
int  a_step 
)
inline

Stop the timer for duration of custom step of the given index for the given thread.

Definition at line 175 of file sChronoManager.hh.

Here is the caller graph for this function:

◆ StopIterativeDataUpdateStep1()

public void sChronoManager::StopIterativeDataUpdateStep1 ( int  a_thread)
inline

Stop the timer for duration of iterative data update step 1.

Parameters
inta_thread

Definition at line 107 of file sChronoManager.hh.

Here is the caller graph for this function:

◆ StopIterativeDataUpdateStep2()

public void sChronoManager::StopIterativeDataUpdateStep2 ( int  a_thread)
inline

Stop the timer for duration of iterative data update step 2.

Parameters
inta_thread

Definition at line 121 of file sChronoManager.hh.

Here is the caller graph for this function:

◆ StopIterativeDataUpdateStep3()

public void sChronoManager::StopIterativeDataUpdateStep3 ( int  a_thread)
inline

Stop the timer for duration of iterative data update step 3.

Parameters
inta_thread

Definition at line 135 of file sChronoManager.hh.

Here is the caller graph for this function:

◆ StopIterativeDataUpdateStep4()

public void sChronoManager::StopIterativeDataUpdateStep4 ( int  a_thread)
inline

Stop the timer for duration of iterative data update step 4.

Parameters
inta_thread

Definition at line 149 of file sChronoManager.hh.

Here is the caller graph for this function:

Member Data Documentation

◆ m_durationConvolution

DurationNano sChronoManager::m_durationConvolution
private

Definition at line 235 of file sChronoManager.hh.

◆ m_nbCustomSteps

int sChronoManager::m_nbCustomSteps
private

Definition at line 238 of file sChronoManager.hh.

◆ m_nbThreadsForImageComputation

int sChronoManager::m_nbThreadsForImageComputation
private

Definition at line 224 of file sChronoManager.hh.

◆ m_nbThreadsForProjection

int sChronoManager::m_nbThreadsForProjection
private

Definition at line 223 of file sChronoManager.hh.

◆ m_nbThreadsMax

int sChronoManager::m_nbThreadsMax
private

Definition at line 225 of file sChronoManager.hh.

◆ m_startConvolution

ChronoTime sChronoManager::m_startConvolution
private

Definition at line 236 of file sChronoManager.hh.

◆ m_verbose

int sChronoManager::m_verbose
private

Definition at line 242 of file sChronoManager.hh.

◆ mp_durationIterativeDataUpdateStep1

DurationNano* sChronoManager::mp_durationIterativeDataUpdateStep1
private

Definition at line 227 of file sChronoManager.hh.

◆ mp_durationIterativeDataUpdateStep2

DurationNano* sChronoManager::mp_durationIterativeDataUpdateStep2
private

Definition at line 228 of file sChronoManager.hh.

◆ mp_durationIterativeDataUpdateStep3

DurationNano* sChronoManager::mp_durationIterativeDataUpdateStep3
private

Definition at line 229 of file sChronoManager.hh.

◆ mp_durationIterativeDataUpdateStep4

DurationNano* sChronoManager::mp_durationIterativeDataUpdateStep4
private

Definition at line 230 of file sChronoManager.hh.

◆ mp_Instance

sChronoManager * sChronoManager::mp_Instance = NULL
staticprivate

Pointer to this singleton object

Definition at line 216 of file sChronoManager.hh.

◆ mp_startIterativeDataUpdateStep1

ChronoTime* sChronoManager::mp_startIterativeDataUpdateStep1
private

Definition at line 231 of file sChronoManager.hh.

◆ mp_startIterativeDataUpdateStep2

ChronoTime* sChronoManager::mp_startIterativeDataUpdateStep2
private

Definition at line 232 of file sChronoManager.hh.

◆ mp_startIterativeDataUpdateStep3

ChronoTime* sChronoManager::mp_startIterativeDataUpdateStep3
private

Definition at line 233 of file sChronoManager.hh.

◆ mp_startIterativeDataUpdateStep4

ChronoTime* sChronoManager::mp_startIterativeDataUpdateStep4
private

Definition at line 234 of file sChronoManager.hh.

◆ mpp_durationCustomSteps

DurationNano** sChronoManager::mpp_durationCustomSteps
private

Definition at line 239 of file sChronoManager.hh.

◆ mpp_startCustomSteps

ChronoTime** sChronoManager::mpp_startCustomSteps
private

Definition at line 240 of file sChronoManager.hh.


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