lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
GPUTimer Struct Reference

Class for timing various things. More...

#include <GpuAsyncLib.hh>

Public Member Functions

 GPUTimer ()
 Create the start and stop events (return codes not checked).
 
 ~GPUTimer ()
 Destroy the two events.
 
void start ()
 Record the start event on the default stream.
 
float stop ()
 Record the stop event on the default stream, wait for it and return the time since the start event in milliseconds.
 

Public Attributes

cudaEvent_t beg
 Start event, recorded by start().
 
cudaEvent_t end
 Stop event, recorded by stop().
 

Detailed Description

Class for timing various things.

Constructor & Destructor Documentation

◆ GPUTimer()

GPUTimer::GPUTimer ( )
inline

Create the start and stop events (return codes not checked).

◆ ~GPUTimer()

GPUTimer::~GPUTimer ( )
inline

Destroy the two events.

Member Function Documentation

◆ start()

void GPUTimer::start ( )
inline

Record the start event on the default stream.

◆ stop()

float GPUTimer::stop ( )
inline

Record the stop event on the default stream, wait for it and return the time since the start event in milliseconds.

Member Data Documentation

◆ beg

cudaEvent_t GPUTimer::beg

Start event, recorded by start().

◆ end

cudaEvent_t GPUTimer::end

Stop event, recorded by stop().


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