//============================================================================ // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE. See the above copyright notice for more information. //============================================================================ #ifndef vtk_m_exec_arg_ThreadIndicesCellNeighborhood_h #define vtk_m_exec_arg_ThreadIndicesCellNeighborhood_h #include #include #include #include #include //for Deflate and Inflate #include namespace vtkm { namespace exec { namespace arg { /// \brief Container for thread information in a WorkletCellNeighborhood. /// /// class ThreadIndicesCellNeighborhood : public vtkm::exec::arg::ThreadIndicesNeighborhood { using Superclass = vtkm::exec::arg::ThreadIndicesNeighborhood; public: template VTKM_EXEC ThreadIndicesCellNeighborhood( const vtkm::Id3& threadIndex3D, vtkm::Id threadIndex1D, const vtkm::exec::ConnectivityStructured& connectivity) : Superclass( threadIndex1D, vtkm::exec::BoundaryState{ threadIndex3D, detail::To3D(connectivity.GetCellDimensions()) }) { } template VTKM_EXEC ThreadIndicesCellNeighborhood( const vtkm::Id3& threadIndex3D, vtkm::Id threadIndex1D, vtkm::Id inputIndex, vtkm::IdComponent visitIndex, vtkm::Id outputIndex, const vtkm::exec::ConnectivityStructured& connectivity) : Superclass( threadIndex1D, inputIndex, visitIndex, outputIndex, vtkm::exec::BoundaryState{ threadIndex3D, detail::To3D(connectivity.GetCellDimensions()) }) { } template VTKM_EXEC ThreadIndicesCellNeighborhood( vtkm::Id threadIndex, vtkm::Id inputIndex, vtkm::IdComponent visitIndex, vtkm::Id outputIndex, const vtkm::exec::ConnectivityStructured& connectivity) : Superclass( threadIndex, inputIndex, visitIndex, outputIndex, vtkm::exec::BoundaryState{ detail::To3D(connectivity.FlatToLogicalVisitIndex(inputIndex)), detail::To3D(connectivity.GetCellDimensions()) }) { } }; } } } // namespace vtkm::exec::arg #endif //vtk_m_exec_arg_ThreadIndicesCellNeighborhood_h