VTK-m  2.2
Classes | Public Member Functions | Public Attributes | List of all members
vtkm::cont::DeviceAdapterTimerImplementation< DeviceAdapterTag > Class Template Reference

Class providing a device-specific timer. More...

#include <DeviceAdapterAlgorithm.h>

Classes

struct  TimeStamp
 

Public Member Functions

 DeviceAdapterTimerImplementation ()
 When a timer is constructed, all threads are synchronized and the current time is marked so that GetElapsedTime returns the number of seconds elapsed since the construction. More...
 
void Reset ()
 Resets the timer. More...
 
void Start ()
 
void Stop ()
 
bool Started () const
 
bool Stopped () const
 
bool Ready () const
 
vtkm::Float64 GetElapsedTime () const
 Returns the elapsed time in seconds between the construction of this class or the last call to Reset and the time this function is called. More...
 
TimeStamp GetCurrentTime () const
 

Public Attributes

bool StartReady
 
bool StopReady
 
TimeStamp StartTime
 
TimeStamp StopTime
 

Detailed Description

template<class DeviceAdapterTag>
class vtkm::cont::DeviceAdapterTimerImplementation< DeviceAdapterTag >

Class providing a device-specific timer.

The class provide the actual implementation used by vtkm::cont::Timer. A default implementation is provided but device adapters should provide one (in conjunction with DeviceAdapterAlgorithm) where appropriate. The interface for this class is exactly the same as vtkm::cont::Timer.

Constructor & Destructor Documentation

◆ DeviceAdapterTimerImplementation()

template<class DeviceAdapterTag >
vtkm::cont::DeviceAdapterTimerImplementation< DeviceAdapterTag >::DeviceAdapterTimerImplementation ( )
inline

When a timer is constructed, all threads are synchronized and the current time is marked so that GetElapsedTime returns the number of seconds elapsed since the construction.

Member Function Documentation

◆ GetCurrentTime()

template<class DeviceAdapterTag >
TimeStamp vtkm::cont::DeviceAdapterTimerImplementation< DeviceAdapterTag >::GetCurrentTime ( ) const
inline

◆ GetElapsedTime()

template<class DeviceAdapterTag >
vtkm::Float64 vtkm::cont::DeviceAdapterTimerImplementation< DeviceAdapterTag >::GetElapsedTime ( ) const
inline

Returns the elapsed time in seconds between the construction of this class or the last call to Reset and the time this function is called.

The time returned is measured in wall time. GetElapsedTime may be called any number of times to get the progressive time. This method synchronizes all asynchronous operations.

◆ Ready()

template<class DeviceAdapterTag >
bool vtkm::cont::DeviceAdapterTimerImplementation< DeviceAdapterTag >::Ready ( ) const
inline

◆ Reset()

template<class DeviceAdapterTag >
void vtkm::cont::DeviceAdapterTimerImplementation< DeviceAdapterTag >::Reset ( )
inline

Resets the timer.

All further calls to GetElapsedTime will report the number of seconds elapsed since the call to this. This method synchronizes all asynchronous operations.

◆ Start()

template<class DeviceAdapterTag >
void vtkm::cont::DeviceAdapterTimerImplementation< DeviceAdapterTag >::Start ( )
inline

◆ Started()

template<class DeviceAdapterTag >
bool vtkm::cont::DeviceAdapterTimerImplementation< DeviceAdapterTag >::Started ( ) const
inline

◆ Stop()

template<class DeviceAdapterTag >
void vtkm::cont::DeviceAdapterTimerImplementation< DeviceAdapterTag >::Stop ( )
inline

◆ Stopped()

template<class DeviceAdapterTag >
bool vtkm::cont::DeviceAdapterTimerImplementation< DeviceAdapterTag >::Stopped ( ) const
inline

Member Data Documentation

◆ StartReady

template<class DeviceAdapterTag >
bool vtkm::cont::DeviceAdapterTimerImplementation< DeviceAdapterTag >::StartReady

◆ StartTime

template<class DeviceAdapterTag >
TimeStamp vtkm::cont::DeviceAdapterTimerImplementation< DeviceAdapterTag >::StartTime

◆ StopReady

template<class DeviceAdapterTag >
bool vtkm::cont::DeviceAdapterTimerImplementation< DeviceAdapterTag >::StopReady

◆ StopTime

template<class DeviceAdapterTag >
TimeStamp vtkm::cont::DeviceAdapterTimerImplementation< DeviceAdapterTag >::StopTime

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