diff --git a/vtkm/cont/CellSetExplicit.h b/vtkm/cont/CellSetExplicit.h index 976b726b1..9ce8bfa13 100644 --- a/vtkm/cont/CellSetExplicit.h +++ b/vtkm/cont/CellSetExplicit.h @@ -192,15 +192,13 @@ public: GetIndexOffsetArray(FromTopology, ToTopology) const; protected: - VTKM_CONT void BuildConnectivity( - vtkm::TopologyElementTagPoint, - vtkm::TopologyElementTagCell, - vtkm::cont::RuntimeDeviceTracker tracker = vtkm::cont::GetGlobalRuntimeDeviceTracker()) const; + VTKM_CONT void BuildConnectivity(vtkm::cont::DeviceAdapterId, + vtkm::TopologyElementTagPoint, + vtkm::TopologyElementTagCell) const; - VTKM_CONT void BuildConnectivity( - vtkm::TopologyElementTagCell, - vtkm::TopologyElementTagPoint, - vtkm::cont::RuntimeDeviceTracker tracker = vtkm::cont::GetGlobalRuntimeDeviceTracker()) const; + VTKM_CONT void BuildConnectivity(vtkm::cont::DeviceAdapterId, + vtkm::TopologyElementTagCell, + vtkm::TopologyElementTagPoint) const; typename ConnectivityChooser::ConnectivityType PointToCell; diff --git a/vtkm/cont/CellSetExplicit.hxx b/vtkm/cont/CellSetExplicit.hxx index 5e5a54e56..ca2cd65d4 100644 --- a/vtkm/cont/CellSetExplicit.hxx +++ b/vtkm/cont/CellSetExplicit.hxx @@ -386,7 +386,7 @@ auto CellSetExplicit::PrepareForInput(Device, FromTopology, ToTopology) const -> typename ExecutionTypes::ExecObjectType { - this->BuildConnectivity(FromTopology(), ToTopology()); + this->BuildConnectivity(Device{}, FromTopology(), ToTopology()); const auto& connectivity = this->GetConnectivity(FromTopology(), ToTopology()); VTKM_ASSERT(connectivity.ElementsValid); @@ -411,7 +411,7 @@ VTKM_CONT auto CellSetExplicit::GetShapesArray(FromTopology, ToTopology) const -> const typename ConnectivityChooser::ShapeArrayType& { - this->BuildConnectivity(FromTopology(), ToTopology()); + this->BuildConnectivity(vtkm::cont::DeviceAdapterIdAny{}, FromTopology(), ToTopology()); return this->GetConnectivity(FromTopology(), ToTopology()).Shapes; } @@ -427,7 +427,7 @@ VTKM_CONT auto CellSetExplicit const typename ConnectivityChooser::NumIndicesArrayType& { - this->BuildConnectivity(FromTopology(), ToTopology()); + this->BuildConnectivity(vtkm::cont::DeviceAdapterIdAny{}, FromTopology(), ToTopology()); return this->GetConnectivity(FromTopology(), ToTopology()).NumIndices; } @@ -443,7 +443,7 @@ VTKM_CONT auto CellSetExplicit const typename ConnectivityChooser::ConnectivityArrayType& { - this->BuildConnectivity(FromTopology(), ToTopology()); + this->BuildConnectivity(vtkm::cont::DeviceAdapterIdAny{}, FromTopology(), ToTopology()); return this->GetConnectivity(FromTopology(), ToTopology()).Connectivity; } @@ -459,7 +459,7 @@ VTKM_CONT auto CellSetExplicit const typename ConnectivityChooser::IndexOffsetArrayType& { - this->BuildConnectivity(FromTopology(), ToTopology()); + this->BuildConnectivity(vtkm::cont::DeviceAdapterIdAny{}, FromTopology(), ToTopology()); return this->GetConnectivity(FromTopology(), ToTopology()).IndexOffsets; } @@ -521,9 +521,9 @@ template VTKM_CONT void CellSetExplicit:: - BuildConnectivity(vtkm::TopologyElementTagPoint, - vtkm::TopologyElementTagCell, - vtkm::cont::RuntimeDeviceTracker tracker) const + BuildConnectivity(vtkm::cont::DeviceAdapterId device, + vtkm::TopologyElementTagPoint, + vtkm::TopologyElementTagCell) const { using PointToCellConnectivity = typename ConnectivityChooser(this); auto functor = detail::BuildPointToCellConnectivityFunctor(self->PointToCell); - if (!vtkm::cont::TryExecute(functor, tracker)) + if (!vtkm::cont::TryExecuteOnDevice(device, functor)) { - throw vtkm::cont::ErrorExecution("Failed to run BuildConnectivity on any device."); + throw vtkm::cont::ErrorExecution("Failed to run BuildConnectivity."); } } } @@ -548,9 +548,9 @@ template VTKM_CONT void CellSetExplicit:: - BuildConnectivity(vtkm::TopologyElementTagCell, - vtkm::TopologyElementTagPoint, - vtkm::cont::RuntimeDeviceTracker tracker) const + BuildConnectivity(vtkm::cont::DeviceAdapterId device, + vtkm::TopologyElementTagCell, + vtkm::TopologyElementTagPoint) const { using PointToCellConnectivity = typename ConnectivityChooser( self->PointToCell, self->CellToPoint, this->NumberOfPoints); - if (!vtkm::cont::TryExecute(functor, tracker)) + if (!vtkm::cont::TryExecuteOnDevice(device, functor)) { - throw vtkm::cont::ErrorExecution("Failed to run BuildConnectivity on any device."); + throw vtkm::cont::ErrorExecution("Failed to run BuildConnectivity."); } } }