Make sure people always treat DeviceAdapterId as a proper type
This commit is contained in:
parent
51e6f07550
commit
14824bd42e
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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&)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include <vtkm/cont/DeviceAdapterListTag.h>
|
||||
#include <vtkm/cont/RuntimeDeviceTracker.h>
|
||||
#include <vtkm/cont/internal/DeviceAdapterTag.h>
|
||||
|
||||
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<DeviceTag>;
|
||||
HandleTryExecuteException(Traits::GetId(), Traits::GetName(), tracker);
|
||||
detail::HandleTryExecuteException(Traits::GetId(), Traits::GetName(), tracker);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user