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

Event. More...

#include <Event.hpp>

Public Types

using impl_clock_t
 Let's choose a steady clock.
 
using impl_event_t = typename impl_clock_t::time_point
 

Public Member Functions

template<typename U = T>
requires std::is_void_v<U>
void record ()
 Record this event.
 
template<typename Exec = T>
requires Kokkos::utils::concepts::ExecutionSpace<Exec>
void record (const Exec &)
 
template<typename Duration>
Duration duration (const Event &other) const
 Get a Duration object between this event and other.
 

Public Attributes

impl_event_t event
 

Detailed Description

template<typename T>
requires Kokkos::utils::concepts::ExecutionSpace<T> || std::is_void_v<T>
struct Kokkos::utils::timer::Event< T >

Event.

The instantiation for the type void concerns the case in which the event is not related to a particular execution space. It is implemented by using std::chrono::steady_clock::time_point.

The instantiations for execution spaces default to an implementation that is identical to the implementation for the instantiation for the type void, except that the member function record takes an execution space instance as argument. This argument is unused.

The specializations for device execution spaces:

  • Cuda (timer/Cuda/Event.hpp),
  • HIP (timer/HIP/Event.hpp), use the Cuda and HIP event management API. Note that the cudaEventSynchronize and hipEventSynchronize functions used by these specializations involve host-device synchronization.

Definition at line 32 of file Event.hpp.

Member Typedef Documentation

◆ impl_clock_t

template<typename T>
using Kokkos::utils::timer::Event< T >::impl_clock_t
Initial value:
std::conditional_t<
std::chrono::high_resolution_clock::is_steady,
std::chrono::high_resolution_clock,
std::chrono::steady_clock
>

Let's choose a steady clock.

Definition at line 35 of file Event.hpp.

◆ impl_event_t

template<typename T>
using Kokkos::utils::timer::Event< T >::impl_event_t = typename impl_clock_t::time_point

Definition at line 41 of file Event.hpp.

Member Function Documentation

◆ duration()

template<typename T>
template<typename Duration>
Duration Kokkos::utils::timer::Event< T >::duration ( const Event< T > & other) const
inline

Get a Duration object between this event and other.

Definition at line 60 of file Event.hpp.

◆ record() [1/2]

template<typename T>
template<typename U = T>
requires std::is_void_v<U>
void Kokkos::utils::timer::Event< T >::record ( )
inline

Record this event.

Definition at line 48 of file Event.hpp.

◆ record() [2/2]

template<typename T>
template<typename Exec = T>
requires Kokkos::utils::concepts::ExecutionSpace<Exec>
void Kokkos::utils::timer::Event< T >::record ( const Exec & )
inline

Definition at line 54 of file Event.hpp.

Member Data Documentation

◆ event

template<typename T>
impl_event_t Kokkos::utils::timer::Event< T >::event

Definition at line 43 of file Event.hpp.


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