kokkos-utils 0.0.1
 
Loading...
Searching...
No Matches
Kokkos::utils::timer::Event< Kokkos::Cuda > Struct Reference

Specialization for Kokkos::Cuda that uses cudaEvent_t. More...

#include <Event.hpp>

Classes

struct  EventDeleter
 To be used for the custom deleter of event. More...
 

Public Types

using impl_event_t = cudaEvent_t
 
using event_storage_t = std::unique_ptr<CUevent_st, EventDeleter>
 
using impl_clock_t
 Let's choose a steady clock.
 
using impl_event_t
 

Public Member Functions

 Event ()
 
void record (const Kokkos::Cuda &exec)
 Record this event in the execution space instance exec.
 
template<typename Duration = milliseconds>
Duration duration (Event &other)
 
void record ()
 Record this event.
 
void record (const Exec &)
 
Duration duration (const Event &other) const
 Get a Duration object between this event and other.
 

Public Attributes

event_storage_t event = nullptr
 
impl_event_t event
 

Private Member Functions

float elapsed (Event &other)
 Measure the elapsed time in milliseconds.
 

Detailed Description

Specialization for Kokkos::Cuda that uses cudaEvent_t.

Note
It must properly manage event.

Definition at line 15 of file Event.hpp.

Member Typedef Documentation

◆ event_storage_t

using Kokkos::utils::timer::Event< Kokkos::Cuda >::event_storage_t = std::unique_ptr<CUevent_st, EventDeleter>

Definition at line 26 of file Event.hpp.

◆ impl_clock_t

using Kokkos::utils::timer::Event< Kokkos::Cuda >::impl_clock_t

Let's choose a steady clock.

Definition at line 35 of file Event.hpp.

◆ impl_event_t [1/2]

using Kokkos::utils::timer::Event< Kokkos::Cuda >::impl_event_t = cudaEvent_t

Definition at line 25 of file Event.hpp.

◆ impl_event_t [2/2]

using Kokkos::utils::timer::Event< Kokkos::Cuda >::impl_event_t

Definition at line 41 of file Event.hpp.

Constructor & Destructor Documentation

◆ Event()

Kokkos::utils::timer::Event< Kokkos::Cuda >::Event ( )
inline

Definition at line 32 of file Event.hpp.

Member Function Documentation

◆ duration() [1/2]

Duration Kokkos::utils::timer::Event< Kokkos::Cuda >::duration ( const Event< Kokkos::Cuda > & other) const
inline

Get a Duration object between this event and other.

Definition at line 60 of file Event.hpp.

◆ duration() [2/2]

template<typename Duration = milliseconds>
Duration Kokkos::utils::timer::Event< Kokkos::Cuda >::duration ( Event< Kokkos::Cuda > & other)
inline

Definition at line 42 of file Event.hpp.

◆ elapsed()

float Kokkos::utils::timer::Event< Kokkos::Cuda >::elapsed ( Event< Kokkos::Cuda > & other)
inlineprivate

Measure the elapsed time in milliseconds.

As specified in https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__EVENT.html.

Definition at line 52 of file Event.hpp.

◆ record() [1/3]

void Kokkos::utils::timer::Event< Kokkos::Cuda >::record ( )
inline

Record this event.

Definition at line 48 of file Event.hpp.

◆ record() [2/3]

void Kokkos::utils::timer::Event< Kokkos::Cuda >::record ( const Exec & )
inline

Definition at line 54 of file Event.hpp.

◆ record() [3/3]

void Kokkos::utils::timer::Event< Kokkos::Cuda >::record ( const Kokkos::Cuda & exec)
inline

Record this event in the execution space instance exec.

Definition at line 39 of file Event.hpp.

Member Data Documentation

◆ event [1/2]

event_storage_t Kokkos::utils::timer::Event< Kokkos::Cuda >::event = nullptr

Definition at line 30 of file Event.hpp.

◆ event [2/2]

impl_event_t Kokkos::utils::timer::Event< Kokkos::Cuda >::event

Definition at line 43 of file Event.hpp.


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