Go to the documentation of this file.
18 #ifndef viskores_cont_RuntimeDeviceTracker_h
19 #define viskores_cont_RuntimeDeviceTracker_h
38 struct RuntimeDeviceTrackerInternals;
40 class ScopedRuntimeDeviceTracker;
74 this->SetDeviceState(deviceId,
false);
82 this->SetDeviceState(deviceId,
false);
141 VISKORES_CONT void SetAbortChecker(
const std::function<
bool()>& func);
171 void LogEnabledDevices()
const;
251 const std::function<
bool()>& abortChecker,
258 std::unique_ptr<detail::RuntimeDeviceTrackerInternals>
SavedState;
264 #endif //viskores_cont_RuntimeDeviceTracker_h
RuntimeDeviceTrackerMode
Identifier used to specify whether to enable or disable a particular device.
Definition: RuntimeDeviceTracker.h:188
This class is thrown when Viskores attempts to manipulate memory that it should not.
Definition: ErrorBadAllocation.h:33
viskores::cont::RuntimeDeviceTracker & GetRuntimeDeviceTracker()
Get the RuntimeDeviceTracker for the current thread.
void ReportAllocationFailure(viskores::cont::DeviceAdapterId deviceId, const viskores::cont::ErrorBadAllocation &)
Report a failure to allocate memory on a device, this will flag the device as being unusable for all ...
Definition: RuntimeDeviceTracker.h:71
A class to create a scoped runtime device tracker object.
Definition: RuntimeDeviceTracker.h:213
std::unique_ptr< detail::RuntimeDeviceTrackerInternals > SavedState
Construct a ScopedRuntimeDeviceTracker associated with the thread, associated with the provided track...
Definition: RuntimeDeviceTracker.h:258
#define VISKORES_CONT
Definition: ExportMacros.h:65
Groups connected points that have the same field value.
Definition: Atomic.h:27
@ Enable
Adds the provided device adapter to the list of devices to try.
This class is thrown when Viskores performs an operation that is not supported on the current device.
Definition: ErrorBadDevice.h:37
An object used to specify a device.
Definition: DeviceAdapterTag.h:66
RuntimeDeviceTracker is the central location for determining which device adapter will be active for ...
Definition: RuntimeDeviceTracker.h:55
void ReportBadDeviceFailure(viskores::cont::DeviceAdapterId deviceId, const viskores::cont::ErrorBadDevice &)
Report a ErrorBadDevice failure and flag the device as unusable.
Definition: RuntimeDeviceTracker.h:79
@ Disable
Removes the provided device adapter from the list of devices to try.
@ Force
Replaces the current list of devices to try with the device specified.
detail::RuntimeDeviceTrackerInternals * Internals
Definition: RuntimeDeviceTracker.h:153