Autonomic Performance Environment for eXascale (APEX)  2.3.1
Public Member Functions | List of all members
apex::scoped_timer Class Reference

A convenience class for using APEX in C++ applications. More...

#include <apex_api.hpp>

Public Member Functions

 scoped_timer (uint64_t func)
 Construct and start an APEX timer. More...
 
 scoped_timer (std::string func)
 Construct and start an APEX timer. More...
 
 scoped_timer (uint64_t func, std::shared_ptr< apex::task_wrapper > parent)
 Register a new thread with APEX, then construct and start an APEX timer. More...
 
 scoped_timer (std::string func, std::shared_ptr< apex::task_wrapper > parent)
 Register a new thread with APEX, then construct and start an APEX timer. More...
 
void start (void)
 Start the APEX timer. More...
 
void stop (void)
 Stop the APEX timer. More...
 
void yield (void)
 Yield the APEX timer. More...
 
void resume (void)
 Resume the APEX timer. More...
 
 ~scoped_timer ()
 Destructor.
 
std::shared_ptr< apex::task_wrapperget_task_wrapper (void)
 Get the internal task wrapper object.
 

Detailed Description

A convenience class for using APEX in C++ applications.

This class will automatically start an APEX timer when the object is constructed, and automatically stop the timer when the object goes out of scope. There are options for registering a thread when creating a timer for the first time on a thread.

Constructor & Destructor Documentation

◆ scoped_timer() [1/4]

apex::scoped_timer::scoped_timer ( uint64_t  func)
inline

Construct and start an APEX timer.

Parameters
funcThe address of a function used to identify the timer type

◆ scoped_timer() [2/4]

apex::scoped_timer::scoped_timer ( std::string  func)
inline

Construct and start an APEX timer.

Parameters
funcThe name of a function used to identify the timer type

◆ scoped_timer() [3/4]

apex::scoped_timer::scoped_timer ( uint64_t  func,
std::shared_ptr< apex::task_wrapper parent 
)
inline

Register a new thread with APEX, then construct and start an APEX timer.

Parameters
funcThe address of a function used to identify the timer type
parentThe parent task wrapper (if available) of this new scoped_timer

◆ scoped_timer() [4/4]

apex::scoped_timer::scoped_timer ( std::string  func,
std::shared_ptr< apex::task_wrapper parent 
)
inline

Register a new thread with APEX, then construct and start an APEX timer.

Parameters
funcThe name of a function used to identify the timer type
parentThe parent task wrapper (if available) of this new scoped_timer

Member Function Documentation

◆ resume()

void apex::scoped_timer::resume ( void  )
inline

Resume the APEX timer.

◆ start()

void apex::scoped_timer::start ( void  )
inline

Start the APEX timer.

◆ stop()

void apex::scoped_timer::stop ( void  )
inline

Stop the APEX timer.

◆ yield()

void apex::scoped_timer::yield ( void  )
inline

Yield the APEX timer.


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