mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 21:33:55 +00:00
Extract WorkletNeighborhood base class
This commit is contained in:
parent
760c51ed62
commit
f66c782b14
@ -111,7 +111,7 @@ int main(int argc, char** argv)
|
||||
view.SaveAs("spin0.png");
|
||||
|
||||
vtkm::cont::Invoker invoker;
|
||||
for (int i = 1; i < 10; ++i)
|
||||
for (vtkm::UInt32 i = 1; i < 10; ++i)
|
||||
{
|
||||
vtkm::cont::ArrayHandleRandomUniformReal<vtkm::Float32> prob(dataSet.GetNumberOfCells(), { i });
|
||||
invoker(UpdateSpins{}, dataSet.GetCellSet(), spins, prob, spins);
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <vtkm/exec/BoundaryState.h>
|
||||
#include <vtkm/exec/ConnectivityStructured.h>
|
||||
#include <vtkm/exec/arg/ThreadIndicesBasic.h>
|
||||
#include <vtkm/exec/arg/ThreadIndicesNeighborhood.h>
|
||||
#include <vtkm/exec/arg/ThreadIndicesTopologyMap.h> //for Deflate and Inflate
|
||||
|
||||
#include <vtkm/Math.h>
|
||||
|
@ -27,12 +27,12 @@ template <typename WorkletType>
|
||||
class DispatcherCellNeighborhood
|
||||
: public vtkm::worklet::internal::DispatcherBase<DispatcherCellNeighborhood<WorkletType>,
|
||||
WorkletType,
|
||||
vtkm::worklet::WorkletCellNeighborhoodBase>
|
||||
vtkm::worklet::WorkletNeighborhood>
|
||||
{
|
||||
using Superclass =
|
||||
vtkm::worklet::internal::DispatcherBase<DispatcherCellNeighborhood<WorkletType>,
|
||||
WorkletType,
|
||||
vtkm::worklet::WorkletCellNeighborhoodBase>;
|
||||
vtkm::worklet::WorkletNeighborhood>;
|
||||
using ScatterType = typename Superclass::ScatterType;
|
||||
|
||||
public:
|
||||
|
@ -27,12 +27,12 @@ template <typename WorkletType>
|
||||
class DispatcherPointNeighborhood
|
||||
: public vtkm::worklet::internal::DispatcherBase<DispatcherPointNeighborhood<WorkletType>,
|
||||
WorkletType,
|
||||
vtkm::worklet::WorkletPointNeighborhoodBase>
|
||||
vtkm::worklet::WorkletNeighborhood>
|
||||
{
|
||||
using Superclass =
|
||||
vtkm::worklet::internal::DispatcherBase<DispatcherPointNeighborhood<WorkletType>,
|
||||
WorkletType,
|
||||
vtkm::worklet::WorkletPointNeighborhoodBase>;
|
||||
vtkm::worklet::WorkletNeighborhood>;
|
||||
using ScatterType = typename Superclass::ScatterType;
|
||||
|
||||
public:
|
||||
|
@ -16,30 +16,8 @@
|
||||
/// access to the 3D neighborhood values. The neighborhood is always cubic in
|
||||
/// nature and is fixed at compile time.
|
||||
|
||||
#include <vtkm/worklet/internal/WorkletBase.h>
|
||||
|
||||
#include <vtkm/TopologyElementTag.h>
|
||||
|
||||
#include <vtkm/cont/arg/ControlSignatureTagBase.h>
|
||||
#include <vtkm/cont/arg/TransportTagArrayIn.h>
|
||||
#include <vtkm/cont/arg/TransportTagArrayInOut.h>
|
||||
#include <vtkm/cont/arg/TransportTagArrayOut.h>
|
||||
#include <vtkm/cont/arg/TransportTagCellSetIn.h>
|
||||
#include <vtkm/cont/arg/TypeCheckTagArrayIn.h>
|
||||
#include <vtkm/cont/arg/TypeCheckTagArrayInOut.h>
|
||||
#include <vtkm/cont/arg/TypeCheckTagArrayOut.h>
|
||||
#include <vtkm/cont/arg/TypeCheckTagCellSetStructured.h>
|
||||
|
||||
#include <vtkm/exec/arg/Boundary.h>
|
||||
#include <vtkm/exec/arg/FetchTagArrayDirectIn.h>
|
||||
#include <vtkm/exec/arg/FetchTagArrayDirectInOut.h>
|
||||
#include <vtkm/exec/arg/FetchTagArrayDirectOut.h>
|
||||
#include <vtkm/exec/arg/FetchTagArrayNeighborhoodIn.h>
|
||||
#include <vtkm/exec/arg/FetchTagCellSetIn.h>
|
||||
#include <vtkm/exec/arg/ThreadIndicesCellNeighborhood.h>
|
||||
|
||||
#include <vtkm/worklet/BoundaryTypes.h>
|
||||
#include <vtkm/worklet/ScatterIdentity.h>
|
||||
#include <vtkm/worklet/WorkletNeighborhood.h>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
@ -49,107 +27,12 @@ namespace worklet
|
||||
template <typename WorkletType>
|
||||
class DispatcherCellNeighborhood;
|
||||
|
||||
class WorkletCellNeighborhoodBase : public vtkm::worklet::internal::WorkletBase
|
||||
class WorkletCellNeighborhood : public WorkletNeighborhood
|
||||
{
|
||||
public:
|
||||
template <typename Worklet>
|
||||
using Dispatcher = vtkm::worklet::DispatcherCellNeighborhood<Worklet>;
|
||||
|
||||
/// \brief The \c ExecutionSignature tag to query if the current iteration is inside the boundary.
|
||||
///
|
||||
/// A \c WorkletCellNeighborhood operates by iterating over all points using a defined
|
||||
/// neighborhood. This \c ExecutionSignature tag provides a \c BoundaryState object that allows
|
||||
/// you to query whether the neighborhood of the current iteration is completely inside the
|
||||
/// bounds of the mesh or if it extends beyond the mesh. This is important as when you are on a
|
||||
/// boundary the neighboordhood will contain empty values for a certain subset of values, and in
|
||||
/// this case the values returned will depend on the boundary behavior.
|
||||
///
|
||||
struct Boundary : vtkm::exec::arg::Boundary
|
||||
{
|
||||
};
|
||||
|
||||
/// All worklets must define their scatter operation.
|
||||
using ScatterType = vtkm::worklet::ScatterIdentity;
|
||||
|
||||
/// All neighborhood worklets must define their boundary type operation.
|
||||
/// The boundary type determines how loading on boundaries will work.
|
||||
using BoundaryType = vtkm::worklet::BoundaryClamp;
|
||||
|
||||
/// In addition to defining the boundary type, the worklet must produce the
|
||||
/// boundary condition. The default BoundaryClamp has no state, so just return an
|
||||
/// instance.
|
||||
/// Note: Currently only BoundaryClamp is implemented
|
||||
VTKM_CONT
|
||||
BoundaryType GetBoundaryCondition() const { return BoundaryType(); }
|
||||
|
||||
/// \brief A control signature tag for input point fields.
|
||||
///
|
||||
/// This tag takes a template argument that is a type list tag that limits
|
||||
/// the possible value types in the array.
|
||||
///
|
||||
struct FieldIn : vtkm::cont::arg::ControlSignatureTagBase
|
||||
{
|
||||
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayIn;
|
||||
using TransportTag = vtkm::cont::arg::TransportTagArrayIn;
|
||||
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectIn;
|
||||
};
|
||||
|
||||
/// \brief A control signature tag for output point fields.
|
||||
///
|
||||
/// This tag takes a template argument that is a type list tag that limits
|
||||
/// the possible value types in the array.
|
||||
///
|
||||
struct FieldOut : vtkm::cont::arg::ControlSignatureTagBase
|
||||
{
|
||||
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayOut;
|
||||
using TransportTag = vtkm::cont::arg::TransportTagArrayOut;
|
||||
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectOut;
|
||||
};
|
||||
|
||||
/// \brief A control signature tag for input-output (in-place) point fields.
|
||||
///
|
||||
/// This tag takes a template argument that is a type list tag that limits
|
||||
/// the possible value types in the array.
|
||||
///
|
||||
struct FieldInOut : vtkm::cont::arg::ControlSignatureTagBase
|
||||
{
|
||||
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayInOut;
|
||||
using TransportTag = vtkm::cont::arg::TransportTagArrayInOut;
|
||||
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectInOut;
|
||||
};
|
||||
|
||||
/// \brief A control signature tag for input connectivity.
|
||||
///
|
||||
struct CellSetIn : vtkm::cont::arg::ControlSignatureTagBase
|
||||
{
|
||||
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagCellSetStructured;
|
||||
using TransportTag = vtkm::cont::arg::TransportTagCellSetIn<vtkm::TopologyElementTagPoint,
|
||||
vtkm::TopologyElementTagCell>;
|
||||
using FetchTag = vtkm::exec::arg::FetchTagCellSetIn;
|
||||
};
|
||||
};
|
||||
|
||||
class WorkletCellNeighborhood : public WorkletCellNeighborhoodBase
|
||||
{
|
||||
public:
|
||||
/// \brief A control signature tag for neighborhood input values.
|
||||
///
|
||||
/// A \c WorkletCellNeighborhood operates allowing access to a adjacent point
|
||||
/// values in a NxNxN patch called a neighborhood.
|
||||
/// No matter the size of the neighborhood it is symmetric across its center
|
||||
/// in each axis, and the current point value will be at the center
|
||||
/// For example a 3x3x3 neighborhood would
|
||||
///
|
||||
/// This tag specifies an \c ArrayHandle object that holds the values. It is
|
||||
/// an input array with entries for each point.
|
||||
///
|
||||
struct FieldInNeighborhood : vtkm::cont::arg::ControlSignatureTagBase
|
||||
{
|
||||
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayIn;
|
||||
using TransportTag = vtkm::cont::arg::TransportTagArrayIn;
|
||||
using FetchTag = vtkm::exec::arg::FetchTagArrayNeighborhoodIn;
|
||||
};
|
||||
|
||||
/// Point neighborhood worklets use the related thread indices class.
|
||||
///
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
|
139
vtkm/worklet/WorkletNeighborhood.h
Normal file
139
vtkm/worklet/WorkletNeighborhood.h
Normal file
@ -0,0 +1,139 @@
|
||||
//============================================================================
|
||||
// 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_worklet_WorkletNeighborhood_h
|
||||
#define vtk_m_worklet_WorkletNeighborhood_h
|
||||
|
||||
#include <vtkm/worklet/internal/WorkletBase.h>
|
||||
|
||||
#include <vtkm/TopologyElementTag.h>
|
||||
|
||||
#include <vtkm/cont/arg/ControlSignatureTagBase.h>
|
||||
#include <vtkm/cont/arg/TransportTagArrayIn.h>
|
||||
#include <vtkm/cont/arg/TransportTagArrayInOut.h>
|
||||
#include <vtkm/cont/arg/TransportTagArrayOut.h>
|
||||
#include <vtkm/cont/arg/TransportTagCellSetIn.h>
|
||||
#include <vtkm/cont/arg/TypeCheckTagArrayIn.h>
|
||||
#include <vtkm/cont/arg/TypeCheckTagArrayInOut.h>
|
||||
#include <vtkm/cont/arg/TypeCheckTagArrayOut.h>
|
||||
#include <vtkm/cont/arg/TypeCheckTagCellSetStructured.h>
|
||||
|
||||
#include <vtkm/exec/arg/Boundary.h>
|
||||
#include <vtkm/exec/arg/FetchTagArrayDirectIn.h>
|
||||
#include <vtkm/exec/arg/FetchTagArrayDirectInOut.h>
|
||||
#include <vtkm/exec/arg/FetchTagArrayDirectOut.h>
|
||||
#include <vtkm/exec/arg/FetchTagArrayNeighborhoodIn.h>
|
||||
#include <vtkm/exec/arg/FetchTagCellSetIn.h>
|
||||
|
||||
#include <vtkm/worklet/BoundaryTypes.h>
|
||||
#include <vtkm/worklet/ScatterIdentity.h>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
namespace worklet
|
||||
{
|
||||
|
||||
class WorkletNeighborhood : public vtkm::worklet::internal::WorkletBase
|
||||
{
|
||||
public:
|
||||
/// \brief The \c ExecutionSignature tag to query if the current iteration is inside the boundary.
|
||||
///
|
||||
/// A \c WorkletPointNeighborhood operates by iterating over all points using a defined
|
||||
/// neighborhood. This \c ExecutionSignature tag provides a \c BoundaryState object that allows
|
||||
/// you to query whether the neighborhood of the current iteration is completely inside the
|
||||
/// bounds of the mesh or if it extends beyond the mesh. This is important as when you are on a
|
||||
/// boundary the neighboordhood will contain empty values for a certain subset of values, and in
|
||||
/// this case the values returned will depend on the boundary behavior.
|
||||
///
|
||||
struct Boundary : vtkm::exec::arg::Boundary
|
||||
{
|
||||
};
|
||||
|
||||
/// All worklets must define their scatter operation.
|
||||
using ScatterType = vtkm::worklet::ScatterIdentity;
|
||||
|
||||
/// All neighborhood worklets must define their boundary type operation.
|
||||
/// The boundary type determines how loading on boundaries will work.
|
||||
using BoundaryType = vtkm::worklet::BoundaryClamp;
|
||||
|
||||
/// In addition to defining the boundary type, the worklet must produce the
|
||||
/// boundary condition. The default BoundaryClamp has no state, so just return an
|
||||
/// instance.
|
||||
/// Note: Currently only BoundaryClamp is implemented
|
||||
VTKM_CONT
|
||||
BoundaryType GetBoundaryCondition() const { return BoundaryType(); }
|
||||
|
||||
/// \brief A control signature tag for input point fields.
|
||||
///
|
||||
/// This tag takes a template argument that is a type list tag that limits
|
||||
/// the possible value types in the array.
|
||||
///
|
||||
struct FieldIn : vtkm::cont::arg::ControlSignatureTagBase
|
||||
{
|
||||
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayIn;
|
||||
using TransportTag = vtkm::cont::arg::TransportTagArrayIn;
|
||||
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectIn;
|
||||
};
|
||||
|
||||
/// \brief A control signature tag for output point fields.
|
||||
///
|
||||
/// This tag takes a template argument that is a type list tag that limits
|
||||
/// the possible value types in the array.
|
||||
///
|
||||
struct FieldOut : vtkm::cont::arg::ControlSignatureTagBase
|
||||
{
|
||||
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayOut;
|
||||
using TransportTag = vtkm::cont::arg::TransportTagArrayOut;
|
||||
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectOut;
|
||||
};
|
||||
|
||||
/// \brief A control signature tag for input-output (in-place) point fields.
|
||||
///
|
||||
/// This tag takes a template argument that is a type list tag that limits
|
||||
/// the possible value types in the array.
|
||||
///
|
||||
struct FieldInOut : vtkm::cont::arg::ControlSignatureTagBase
|
||||
{
|
||||
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayInOut;
|
||||
using TransportTag = vtkm::cont::arg::TransportTagArrayInOut;
|
||||
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectInOut;
|
||||
};
|
||||
|
||||
/// \brief A control signature tag for input connectivity.
|
||||
///
|
||||
struct CellSetIn : vtkm::cont::arg::ControlSignatureTagBase
|
||||
{
|
||||
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagCellSetStructured;
|
||||
using TransportTag = vtkm::cont::arg::TransportTagCellSetIn<vtkm::TopologyElementTagPoint,
|
||||
vtkm::TopologyElementTagCell>;
|
||||
using FetchTag = vtkm::exec::arg::FetchTagCellSetIn;
|
||||
};
|
||||
|
||||
/// \brief A control signature tag for neighborhood input values.
|
||||
///
|
||||
/// A \c WorkletPointNeighborhood operates allowing access to a adjacent point
|
||||
/// values in a NxNxN patch called a neighborhood.
|
||||
/// No matter the size of the neighborhood it is symmetric across its center
|
||||
/// in each axis, and the current point value will be at the center
|
||||
/// For example a 3x3x3 neighborhood would
|
||||
///
|
||||
/// This tag specifies an \c ArrayHandle object that holds the values. It is
|
||||
/// an input array with entries for each point.
|
||||
///
|
||||
struct FieldInNeighborhood : vtkm::cont::arg::ControlSignatureTagBase
|
||||
{
|
||||
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayIn;
|
||||
using TransportTag = vtkm::cont::arg::TransportTagArrayIn;
|
||||
using FetchTag = vtkm::exec::arg::FetchTagArrayNeighborhoodIn;
|
||||
};
|
||||
};
|
||||
} // namespace worklet
|
||||
} // namespace vtkm
|
||||
|
||||
#endif // vtk_m_worklet_WorkletPointNeighborhood_h
|
@ -15,31 +15,8 @@
|
||||
/// WorkletPointNeighborhood executes on every point inside a volume providing
|
||||
/// access to the 3D neighborhood values. The neighborhood is always cubic in
|
||||
/// nature and is fixed at compile time.
|
||||
|
||||
#include <vtkm/worklet/internal/WorkletBase.h>
|
||||
|
||||
#include <vtkm/TopologyElementTag.h>
|
||||
|
||||
#include <vtkm/cont/arg/ControlSignatureTagBase.h>
|
||||
#include <vtkm/cont/arg/TransportTagArrayIn.h>
|
||||
#include <vtkm/cont/arg/TransportTagArrayInOut.h>
|
||||
#include <vtkm/cont/arg/TransportTagArrayOut.h>
|
||||
#include <vtkm/cont/arg/TransportTagCellSetIn.h>
|
||||
#include <vtkm/cont/arg/TypeCheckTagArrayIn.h>
|
||||
#include <vtkm/cont/arg/TypeCheckTagArrayInOut.h>
|
||||
#include <vtkm/cont/arg/TypeCheckTagArrayOut.h>
|
||||
#include <vtkm/cont/arg/TypeCheckTagCellSetStructured.h>
|
||||
|
||||
#include <vtkm/exec/arg/Boundary.h>
|
||||
#include <vtkm/exec/arg/FetchTagArrayDirectIn.h>
|
||||
#include <vtkm/exec/arg/FetchTagArrayDirectInOut.h>
|
||||
#include <vtkm/exec/arg/FetchTagArrayDirectOut.h>
|
||||
#include <vtkm/exec/arg/FetchTagArrayNeighborhoodIn.h>
|
||||
#include <vtkm/exec/arg/FetchTagCellSetIn.h>
|
||||
#include <vtkm/exec/arg/ThreadIndicesPointNeighborhood.h>
|
||||
|
||||
#include <vtkm/worklet/BoundaryTypes.h>
|
||||
#include <vtkm/worklet/ScatterIdentity.h>
|
||||
#include <vtkm/worklet/WorkletNeighborhood.h>
|
||||
|
||||
namespace vtkm
|
||||
{
|
||||
@ -49,107 +26,12 @@ namespace worklet
|
||||
template <typename WorkletType>
|
||||
class DispatcherPointNeighborhood;
|
||||
|
||||
class WorkletPointNeighborhoodBase : public vtkm::worklet::internal::WorkletBase
|
||||
class WorkletPointNeighborhood : public WorkletNeighborhood
|
||||
{
|
||||
public:
|
||||
template <typename Worklet>
|
||||
using Dispatcher = vtkm::worklet::DispatcherPointNeighborhood<Worklet>;
|
||||
|
||||
/// \brief The \c ExecutionSignature tag to query if the current iteration is inside the boundary.
|
||||
///
|
||||
/// A \c WorkletPointNeighborhood operates by iterating over all points using a defined
|
||||
/// neighborhood. This \c ExecutionSignature tag provides a \c BoundaryState object that allows
|
||||
/// you to query whether the neighborhood of the current iteration is completely inside the
|
||||
/// bounds of the mesh or if it extends beyond the mesh. This is important as when you are on a
|
||||
/// boundary the neighboordhood will contain empty values for a certain subset of values, and in
|
||||
/// this case the values returned will depend on the boundary behavior.
|
||||
///
|
||||
struct Boundary : vtkm::exec::arg::Boundary
|
||||
{
|
||||
};
|
||||
|
||||
/// All worklets must define their scatter operation.
|
||||
using ScatterType = vtkm::worklet::ScatterIdentity;
|
||||
|
||||
/// All neighborhood worklets must define their boundary type operation.
|
||||
/// The boundary type determines how loading on boundaries will work.
|
||||
using BoundaryType = vtkm::worklet::BoundaryClamp;
|
||||
|
||||
/// In addition to defining the boundary type, the worklet must produce the
|
||||
/// boundary condition. The default BoundaryClamp has no state, so just return an
|
||||
/// instance.
|
||||
/// Note: Currently only BoundaryClamp is implemented
|
||||
VTKM_CONT
|
||||
BoundaryType GetBoundaryCondition() const { return BoundaryType(); }
|
||||
|
||||
/// \brief A control signature tag for input point fields.
|
||||
///
|
||||
/// This tag takes a template argument that is a type list tag that limits
|
||||
/// the possible value types in the array.
|
||||
///
|
||||
struct FieldIn : vtkm::cont::arg::ControlSignatureTagBase
|
||||
{
|
||||
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayIn;
|
||||
using TransportTag = vtkm::cont::arg::TransportTagArrayIn;
|
||||
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectIn;
|
||||
};
|
||||
|
||||
/// \brief A control signature tag for output point fields.
|
||||
///
|
||||
/// This tag takes a template argument that is a type list tag that limits
|
||||
/// the possible value types in the array.
|
||||
///
|
||||
struct FieldOut : vtkm::cont::arg::ControlSignatureTagBase
|
||||
{
|
||||
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayOut;
|
||||
using TransportTag = vtkm::cont::arg::TransportTagArrayOut;
|
||||
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectOut;
|
||||
};
|
||||
|
||||
/// \brief A control signature tag for input-output (in-place) point fields.
|
||||
///
|
||||
/// This tag takes a template argument that is a type list tag that limits
|
||||
/// the possible value types in the array.
|
||||
///
|
||||
struct FieldInOut : vtkm::cont::arg::ControlSignatureTagBase
|
||||
{
|
||||
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayInOut;
|
||||
using TransportTag = vtkm::cont::arg::TransportTagArrayInOut;
|
||||
using FetchTag = vtkm::exec::arg::FetchTagArrayDirectInOut;
|
||||
};
|
||||
|
||||
/// \brief A control signature tag for input connectivity.
|
||||
///
|
||||
struct CellSetIn : vtkm::cont::arg::ControlSignatureTagBase
|
||||
{
|
||||
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagCellSetStructured;
|
||||
using TransportTag = vtkm::cont::arg::TransportTagCellSetIn<vtkm::TopologyElementTagPoint,
|
||||
vtkm::TopologyElementTagCell>;
|
||||
using FetchTag = vtkm::exec::arg::FetchTagCellSetIn;
|
||||
};
|
||||
};
|
||||
|
||||
class WorkletPointNeighborhood : public WorkletPointNeighborhoodBase
|
||||
{
|
||||
public:
|
||||
/// \brief A control signature tag for neighborhood input values.
|
||||
///
|
||||
/// A \c WorkletPointNeighborhood operates allowing access to a adjacent point
|
||||
/// values in a NxNxN patch called a neighborhood.
|
||||
/// No matter the size of the neighborhood it is symmetric across its center
|
||||
/// in each axis, and the current point value will be at the center
|
||||
/// For example a 3x3x3 neighborhood would
|
||||
///
|
||||
/// This tag specifies an \c ArrayHandle object that holds the values. It is
|
||||
/// an input array with entries for each point.
|
||||
///
|
||||
struct FieldInNeighborhood : vtkm::cont::arg::ControlSignatureTagBase
|
||||
{
|
||||
using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArrayIn;
|
||||
using TransportTag = vtkm::cont::arg::TransportTagArrayIn;
|
||||
using FetchTag = vtkm::exec::arg::FetchTagArrayNeighborhoodIn;
|
||||
};
|
||||
|
||||
/// Point neighborhood worklets use the related thread indices class.
|
||||
///
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
|
Loading…
Reference in New Issue
Block a user