kokkos-utils 0.0.1
 
Loading...
Searching...
No Matches
Kokkos::utils::timer::Timer< Exec > Class Template Reference

Measure elapsed time between events. More...

#include <Timer.hpp>

Public Types

using event_t = Event<Exec>
 

Public Member Functions

void reset (const Exec &exec)
 Reset the timer.
 
void stop (const Exec &exec)
 Stop the timer.
 
bool is_valid () const
 Returns true if reset and stop have been called.
 
template<typename Duration = milliseconds>
Duration duration ()
 

Detailed Description

template<Kokkos::utils::concepts::ExecutionSpace Exec>
class Kokkos::utils::timer::Timer< Exec >

Measure elapsed time between events.

This class uses Event to create, destroy, record, and compute the elapsed time between events.

Definition at line 16 of file Timer.hpp.

Member Typedef Documentation

◆ event_t

using Kokkos::utils::timer::Timer< Exec >::event_t = Event<Exec>

Definition at line 19 of file Timer.hpp.

Member Function Documentation

◆ duration()

template<typename Duration = milliseconds>
Duration Kokkos::utils::timer::Timer< Exec >::duration ( )
inline

Get a std::chrono::duration object representing the elapsed time.

Note
This function is not const because it calls Event::duration, whose device specializations are not const.

Definition at line 46 of file Timer.hpp.

◆ is_valid()

bool Kokkos::utils::timer::Timer< Exec >::is_valid ( ) const
inline

Returns true if reset and stop have been called.

Definition at line 37 of file Timer.hpp.

◆ reset()

void Kokkos::utils::timer::Timer< Exec >::reset ( const Exec & exec)
inline

Reset the timer.

Definition at line 23 of file Timer.hpp.

◆ stop()

void Kokkos::utils::timer::Timer< Exec >::stop ( const Exec & exec)
inline

Stop the timer.

Definition at line 30 of file Timer.hpp.


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