VTK-m  2.0
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

VTKM_CONT 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...
 
VTKM_CONT void Reset ()
 Resets the timer. More...
 
VTKM_CONT void Start ()
 
VTKM_CONT void Stop ()
 
VTKM_CONT bool Started () const
 
VTKM_CONT bool Stopped () const
 
VTKM_CONT bool Ready () const
 
VTKM_CONT 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...
 
VTKM_CONT 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 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 >
VTKM_CONT TimeStamp vtkm::cont::DeviceAdapterTimerImplementation< DeviceAdapterTag >::GetCurrentTime ( ) const
inline

◆ GetElapsedTime()

template<class DeviceAdapterTag >
VTKM_CONT 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 >
VTKM_CONT bool vtkm::cont::DeviceAdapterTimerImplementation< DeviceAdapterTag >::Ready ( ) const
inline

◆ Reset()

template<class DeviceAdapterTag >
VTKM_CONT 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 >
VTKM_CONT void vtkm::cont::DeviceAdapterTimerImplementation< DeviceAdapterTag >::Start ( )
inline

◆ Started()

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

◆ Stop()

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

◆ Stopped()

template<class DeviceAdapterTag >
VTKM_CONT 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: