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

Class for timing various things. More...

#include <gpuUtils.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()

Drp::Gpu::GPUTimer::GPUTimer ( )
inline

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

◆ ~GPUTimer()

Drp::Gpu::GPUTimer::~GPUTimer ( )
inline

Destroy the two events.

Member Function Documentation

◆ start()

void Drp::Gpu::GPUTimer::start ( )
inline

Record the start event on the default stream.

◆ stop()

float Drp::Gpu::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 Drp::Gpu::GPUTimer::beg

Start event, recorded by start().

◆ end

cudaEvent_t Drp::Gpu::GPUTimer::end

Stop event, recorded by stop().


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