COMPASS  5.4.4
End-to-end AO simulation tool using GPU acceleration
CarmaTimer Class Reference

a simple timer for CUDA kernel. More...

#include <carma_timer.h>

Collaboration diagram for CarmaTimer:

Public Member Functions

 CarmaTimer ()
 
 ~CarmaTimer ()
 
void start ()
 
void reset ()
 
void stop ()
 
void set_stream (cudaStream_t newStream)
 
double elapsed ()
 

Protected Attributes

cudaEvent_t start_event
 
cudaEvent_t stop_event
 
cudaStream_t stream = 0
 
double total_time
 

Detailed Description

a simple timer for CUDA kernel.

this class provides the timer features to CarmaObj

Author
COMPASS Team https://github.com/ANR-COMPASS
Version
5.4.4
Date
2022/01/24

Definition at line 27 of file carma_timer.h.

Constructor & Destructor Documentation

◆ CarmaTimer()

CarmaTimer::CarmaTimer ( )

Definition at line 34 of file carma_timer.h.

◆ ~CarmaTimer()

CarmaTimer::~CarmaTimer ( )

Definition at line 40 of file carma_timer.h.

Member Function Documentation

◆ elapsed()

double CarmaTimer::elapsed ( )

return elapsed time in seconds (as record in total_time)

Definition at line 60 of file carma_timer.h.

◆ reset()

void CarmaTimer::reset ( )

Definition at line 47 of file carma_timer.h.

◆ set_stream()

void CarmaTimer::set_stream ( cudaStream_t  newStream)

Definition at line 58 of file carma_timer.h.

◆ start()

void CarmaTimer::start ( )

Definition at line 45 of file carma_timer.h.

◆ stop()

void CarmaTimer::stop ( )

stop timer and accumulate time in seconds

Definition at line 50 of file carma_timer.h.

Here is the caller graph for this function:

Member Data Documentation

◆ start_event

cudaEvent_t CarmaTimer::start_event
protected

Definition at line 29 of file carma_timer.h.

◆ stop_event

cudaEvent_t CarmaTimer::stop_event
protected

Definition at line 29 of file carma_timer.h.

◆ stream

cudaStream_t CarmaTimer::stream = 0
protected

Definition at line 30 of file carma_timer.h.

◆ total_time

double CarmaTimer::total_time
protected

Definition at line 31 of file carma_timer.h.


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