mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
More changes to Neighborhood code to make it more easy to use.
These changes allow other worklets to be able to call neighborhood worklets.
This commit is contained in:
parent
83165f0cde
commit
d7d5da4fa5
@ -46,7 +46,7 @@ template <int NeighborhoodSize, typename ExecObjectType>
|
||||
struct Neighborhood
|
||||
{
|
||||
VTKM_EXEC
|
||||
Neighborhood(ExecObjectType portal, const vtkm::exec::arg::BoundaryState& boundary)
|
||||
Neighborhood(const ExecObjectType& portal, const vtkm::exec::arg::BoundaryState& boundary)
|
||||
: Boundary(&boundary)
|
||||
, Portal(portal)
|
||||
{
|
||||
@ -83,7 +83,7 @@ template <int NeighborhoodSize>
|
||||
struct Neighborhood<NeighborhoodSize, vtkm::internal::ArrayPortalUniformPointCoordinates>
|
||||
{
|
||||
VTKM_EXEC
|
||||
Neighborhood(vtkm::internal::ArrayPortalUniformPointCoordinates portal,
|
||||
Neighborhood(const vtkm::internal::ArrayPortalUniformPointCoordinates& portal,
|
||||
const vtkm::exec::arg::BoundaryState& boundary)
|
||||
: Boundary(&boundary)
|
||||
, Portal(portal)
|
||||
|
@ -266,7 +266,26 @@ public:
|
||||
NeighborhoodSize)
|
||||
, InputIndex(outToIn.Get(outIndex))
|
||||
, OutputIndex(outIndex)
|
||||
, VisitIndex(static_cast<vtkm::IdComponent>(visit.Get(this->OutputIndex)))
|
||||
, VisitIndex(static_cast<vtkm::IdComponent>(visit.Get(outIndex)))
|
||||
, GlobalThreadIndexOffset(globalThreadIndexOffset)
|
||||
{
|
||||
}
|
||||
|
||||
template <vtkm::IdComponent Dimension>
|
||||
VTKM_EXEC ThreadIndicesPointNeighborhood(
|
||||
const vtkm::Id& outIndex,
|
||||
const vtkm::Id& inIndex,
|
||||
const vtkm::IdComponent& visitIndex,
|
||||
const vtkm::exec::ConnectivityStructured<vtkm::TopologyElementTagCell,
|
||||
vtkm::TopologyElementTagPoint,
|
||||
Dimension>& connectivity,
|
||||
vtkm::Id globalThreadIndexOffset = 0)
|
||||
: State(detail::To3D(connectivity.FlatToLogicalToIndex(inIndex)),
|
||||
detail::To3D(connectivity.GetPointDimensions()),
|
||||
NeighborhoodSize)
|
||||
, InputIndex(inIndex)
|
||||
, OutputIndex(outIndex)
|
||||
, VisitIndex(visitIndex)
|
||||
, GlobalThreadIndexOffset(globalThreadIndexOffset)
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user