Go to the documentation of this file.
10 #ifndef vtk_m_cont_RuntimeDeviceTracker_h
11 #define vtk_m_cont_RuntimeDeviceTracker_h
30 struct RuntimeDeviceTrackerInternals;
32 class ScopedRuntimeDeviceTracker;
66 this->SetDeviceState(deviceId,
false);
74 this->SetDeviceState(deviceId,
false);
117 VTKM_CONT bool GetThreadFriendlyMemAlloc()
const;
119 VTKM_CONT void SetThreadFriendlyMemAlloc(
bool state);
133 VTKM_CONT void SetAbortChecker(
const std::function<
bool()>& func);
137 VTKM_CONT bool CheckForAbortRequest()
const;
140 VTKM_CONT void PrintSummary(std::ostream& out)
const;
163 void LogEnabledDevices()
const;
243 const std::function<
bool()>& abortChecker,
250 std::unique_ptr<detail::RuntimeDeviceTrackerInternals>
SavedState;
256 #endif //vtk_m_cont_RuntimeDeviceTracker_h
Groups connected points that have the same field value.
Definition: Atomic.h:19
detail::RuntimeDeviceTrackerInternals * Internals
Definition: RuntimeDeviceTracker.h:145
@ Force
Replaces the current list of devices to try with the device specified.
void ReportBadDeviceFailure(vtkm::cont::DeviceAdapterId deviceId, const vtkm::cont::ErrorBadDevice &)
Report a ErrorBadDevice failure and flag the device as unusable.
Definition: RuntimeDeviceTracker.h:71
A class to create a scoped runtime device tracker object.
Definition: RuntimeDeviceTracker.h:205
vtkm::cont::RuntimeDeviceTracker & GetRuntimeDeviceTracker()
Get the RuntimeDeviceTracker for the current thread.
#define VTKM_CONT_EXPORT
Definition: vtkm_cont_export.h:44
#define VTKM_CONT
Definition: ExportMacros.h:57
RuntimeDeviceTracker is the central location for determining which device adapter will be active for ...
Definition: RuntimeDeviceTracker.h:47
@ Disable
Removes the provided device adapter from the list of devices to try.
An object used to specify a device.
Definition: DeviceAdapterTag.h:58
This class is thrown when VTK-m attempts to manipulate memory that it should not.
Definition: ErrorBadAllocation.h:25
std::unique_ptr< detail::RuntimeDeviceTrackerInternals > SavedState
Construct a ScopedRuntimeDeviceTracker associated with the thread, associated with the provided track...
Definition: RuntimeDeviceTracker.h:250
This class is thrown when VTK-m performs an operation that is not supported on the current device.
Definition: ErrorBadDevice.h:29
RuntimeDeviceTrackerMode
Identifier used to specify whether to enable or disable a particular device.
Definition: RuntimeDeviceTracker.h:180
@ Enable
Adds the provided device adapter to the list of devices to try.
void ReportAllocationFailure(vtkm::cont::DeviceAdapterId deviceId, const vtkm::cont::ErrorBadAllocation &)
Report a failure to allocate memory on a device, this will flag the device as being unusable for all ...
Definition: RuntimeDeviceTracker.h:63