mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Add RuntimeDeviceTracker::PrintSummary for debugging.
This commit is contained in:
parent
673e3d38df
commit
ff7db97807
@ -169,6 +169,17 @@ void RuntimeDeviceTracker::ForceDevice(DeviceAdapterId deviceId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VTKM_CONT
|
||||||
|
void RuntimeDeviceTracker::PrintSummary(std::ostream& out) const
|
||||||
|
{
|
||||||
|
for (vtkm::Int8 i = 1; i < VTKM_MAX_DEVICE_ADAPTER_ID; ++i)
|
||||||
|
{
|
||||||
|
auto dev = vtkm::cont::make_DeviceAdapterId(i);
|
||||||
|
out << " - Device " << static_cast<vtkm::Int32>(i) << " (" << dev.GetName()
|
||||||
|
<< "): Enabled=" << this->CanRunOn(dev) << "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
ScopedRuntimeDeviceTracker::ScopedRuntimeDeviceTracker(vtkm::cont::DeviceAdapterId device,
|
ScopedRuntimeDeviceTracker::ScopedRuntimeDeviceTracker(vtkm::cont::DeviceAdapterId device,
|
||||||
RuntimeDeviceTrackerMode mode)
|
RuntimeDeviceTrackerMode mode)
|
||||||
|
@ -110,6 +110,8 @@ public:
|
|||||||
///
|
///
|
||||||
VTKM_CONT void ForceDevice(DeviceAdapterId deviceId);
|
VTKM_CONT void ForceDevice(DeviceAdapterId deviceId);
|
||||||
|
|
||||||
|
VTKM_CONT void PrintSummary(std::ostream& out) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend struct ScopedRuntimeDeviceTracker;
|
friend struct ScopedRuntimeDeviceTracker;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user