diff --git a/vtkm/cont/BoundingIntervalHierarchy.h b/vtkm/cont/BoundingIntervalHierarchy.h index d45d76f3a..c5b08070b 100644 --- a/vtkm/cont/BoundingIntervalHierarchy.h +++ b/vtkm/cont/BoundingIntervalHierarchy.h @@ -114,7 +114,8 @@ protected: void Build() override; VTKM_CONT - virtual const HandleType PrepareForExecutionImpl(const vtkm::Int8 device) const override; + virtual const HandleType PrepareForExecutionImpl( + const vtkm::cont::DeviceAdapterId device) const override; private: vtkm::IdComponent NumPlanes; diff --git a/vtkm/cont/BoundingIntervalHierarchy.hxx b/vtkm/cont/BoundingIntervalHierarchy.hxx index 78f0839b0..feb191627 100644 --- a/vtkm/cont/BoundingIntervalHierarchy.hxx +++ b/vtkm/cont/BoundingIntervalHierarchy.hxx @@ -519,18 +519,13 @@ void BoundingIntervalHierarchy::Build() } VTKM_CONT -const HandleType BoundingIntervalHierarchy::PrepareForExecutionImpl(const vtkm::Int8 deviceId) const +const HandleType BoundingIntervalHierarchy::PrepareForExecutionImpl( + const vtkm::cont::DeviceAdapterId deviceId) const { - /*using DeviceList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG; - const vtkm::exec::CellLocator* toReturn; - vtkm::cont::internal::FindDeviceAdapterTagAndCall( - device, DeviceList(), PrepareForExecutionFunctor(), *this, &toReturn); - return toReturn;*/ - using DeviceList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG; - //HandleType ExecHandle; // = new HandleType(locator, false); vtkm::cont::internal::FindDeviceAdapterTagAndCall( deviceId, DeviceList(), PrepareForExecutionFunctor(), *this, this->ExecHandle); + return this->ExecHandle; } diff --git a/vtkm/cont/CellLocator.h b/vtkm/cont/CellLocator.h index b11ba6792..77a411763 100644 --- a/vtkm/cont/CellLocator.h +++ b/vtkm/cont/CellLocator.h @@ -79,7 +79,8 @@ protected: //This is going to need a TryExecute VTKM_CONT virtual void Build() = 0; - VTKM_CONT virtual const HandleType PrepareForExecutionImpl(const vtkm::Int8 device) const = 0; + VTKM_CONT virtual const HandleType PrepareForExecutionImpl( + const vtkm::cont::DeviceAdapterId device) const = 0; private: vtkm::cont::DynamicCellSet CellSet; diff --git a/vtkm/cont/RuntimeDeviceTracker.h b/vtkm/cont/RuntimeDeviceTracker.h index 0141c80b7..d42430796 100644 --- a/vtkm/cont/RuntimeDeviceTracker.h +++ b/vtkm/cont/RuntimeDeviceTracker.h @@ -83,7 +83,7 @@ public: /// device as being unusable for all future invocations of the instance of /// the filter. /// - VTKM_CONT void ReportAllocationFailure(vtkm::Int8 deviceId, + VTKM_CONT void ReportAllocationFailure(vtkm::cont::DeviceAdapterId deviceId, const std::string& name, const vtkm::cont::ErrorBadAllocation&) { @@ -99,7 +99,7 @@ public: this->SetDeviceState(Traits::GetId(), Traits::GetName(), false); } - VTKM_CONT void ReportBadDeviceFailure(vtkm::Int8 deviceId, + VTKM_CONT void ReportBadDeviceFailure(vtkm::cont::DeviceAdapterId deviceId, const std::string& name, const vtkm::cont::ErrorBadDevice&) { diff --git a/vtkm/cont/TryExecute.cxx b/vtkm/cont/TryExecute.cxx index c113ebd3b..10d4e51bb 100644 --- a/vtkm/cont/TryExecute.cxx +++ b/vtkm/cont/TryExecute.cxx @@ -31,7 +31,7 @@ namespace cont namespace detail { -void HandleTryExecuteException(vtkm::Int8 deviceId, +void HandleTryExecuteException(vtkm::cont::DeviceAdapterId deviceId, const std::string& name, vtkm::cont::RuntimeDeviceTracker& tracker) { diff --git a/vtkm/cont/TryExecute.h b/vtkm/cont/TryExecute.h index b5b253401..c578c2686 100644 --- a/vtkm/cont/TryExecute.h +++ b/vtkm/cont/TryExecute.h @@ -22,6 +22,7 @@ #include #include +#include namespace vtkm { @@ -31,7 +32,7 @@ namespace cont namespace detail { -VTKM_CONT_EXPORT void HandleTryExecuteException(vtkm::Int8, +VTKM_CONT_EXPORT void HandleTryExecuteException(vtkm::cont::DeviceAdapterId, const std::string&, vtkm::cont::RuntimeDeviceTracker&); @@ -51,7 +52,7 @@ bool TryExecuteIfValid(std::true_type, catch (...) { using Traits = vtkm::cont::DeviceAdapterTraits; - HandleTryExecuteException(Traits::GetId(), Traits::GetName(), tracker); + detail::HandleTryExecuteException(Traits::GetId(), Traits::GetName(), tracker); } }