VTK-m  2.1
Classes | Public Types | Public Member Functions | Static Private Attributes | List of all members
vtkm::worklet::WorkletCellNeighborhood Class Reference

Base class for worklets that map over the cells in a structured grid with neighborhood information. More...

#include <WorkletCellNeighborhood.h>

Inheritance diagram for vtkm::worklet::WorkletCellNeighborhood:
vtkm::worklet::WorkletNeighborhood vtkm::exec::FunctorBase

Classes

struct  _1
 Argument placeholders for an ExecutionSignature. More...
 
struct  AtomicArrayInOut
 ControlSignature tag for whole input/output arrays. More...
 
struct  Boundary
 The ExecutionSignature tag to query if the current iteration is inside the boundary. More...
 
struct  CellSetIn
 A control signature tag for input connectivity. More...
 
struct  Device
 ExecutionSignature tag for getting the device adapter tag. More...
 
struct  ExecObject
 ControlSignature tag for execution object inputs. More...
 
struct  FieldIn
 A control signature tag for input fields. More...
 
struct  FieldInNeighborhood
 A control signature tag for neighborhood input values. More...
 
struct  FieldInOut
 A control signature tag for input-output (in-place) fields. More...
 
struct  FieldOut
 A control signature tag for output fields. More...
 
struct  InputIndex
 The ExecutionSignature tag to use to get the input index. More...
 
struct  OutputIndex
 The ExecutionSignature tag to use to get the output index. More...
 
struct  ThreadIndices
 The ExecutionSignature tag to use to get the thread indices. More...
 
struct  VisitIndex
 The ExecutionSignature tag to use to get the visit index. More...
 
struct  WholeArrayIn
 ControlSignature tag for whole input arrays. More...
 
struct  WholeArrayInOut
 ControlSignature tag for whole input/output arrays. More...
 
struct  WholeArrayOut
 ControlSignature tag for whole output arrays. More...
 
struct  WholeCellSetIn
 ControlSignature tag for whole input topology. More...
 
struct  WorkIndex
 The ExecutionSignature tag to use to get the work index. More...
 

Public Types

template<typename Worklet >
using Dispatcher = vtkm::worklet::DispatcherCellNeighborhood< Worklet >
 
template<bool Cond, typename ReturnType >
using EnableFnWhen = typename std::enable_if< Cond, ReturnType >::type
 
- Public Types inherited from vtkm::worklet::WorkletNeighborhood
using ScatterType = vtkm::worklet::ScatterIdentity
 All worklets must define their scatter operation. More...
 
using BoundaryType = vtkm::worklet::BoundaryClamp
 All neighborhood worklets must define their boundary type operation. More...
 

Public Member Functions

template<typename OutToInArrayType , typename VisitArrayType , typename ThreadToOutArrayType , vtkm::IdComponent Dimension>
vtkm::exec::arg::ThreadIndicesCellNeighborhood GetThreadIndices (vtkm::Id threadIndex, const OutToInArrayType &outToIn, const VisitArrayType &visit, const ThreadToOutArrayType &threadToOut, const vtkm::exec::ConnectivityStructured< vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell, Dimension > &inputDomain) const
 Point neighborhood worklets use the related thread indices class. More...
 
template<typename OutToInArrayType , typename VisitArrayType , typename ThreadToOutArrayType , typename InputDomainType , bool S = IsScatterIdentity, bool M = IsMaskNone>
EnableFnWhen< S &&M, vtkm::exec::arg::ThreadIndicesCellNeighborhoodGetThreadIndices (vtkm::Id threadIndex1D, const vtkm::Id3 &threadIndex3D, const OutToInArrayType &, const VisitArrayType &, const ThreadToOutArrayType &, const InputDomainType &connectivity) const
 
template<typename OutToInArrayType , typename VisitArrayType , typename ThreadToOutArrayType , typename InputDomainType , bool S = IsScatterIdentity, bool M = IsMaskNone>
EnableFnWhen<!(S &&M), vtkm::exec::arg::ThreadIndicesCellNeighborhoodGetThreadIndices (vtkm::Id threadIndex1D, const vtkm::Id3 &threadIndex3D, const OutToInArrayType &outToIn, const VisitArrayType &visit, const ThreadToOutArrayType &threadToOut, const InputDomainType &connectivity) const
 
- Public Member Functions inherited from vtkm::worklet::WorkletNeighborhood
BoundaryType GetBoundaryCondition () const
 In addition to defining the boundary type, the worklet must produce the boundary condition. More...
 

Static Private Attributes

static constexpr bool IsScatterIdentity
 In the remaining methods and constexpr we determine at compilation time which method definition will be actually used for GetThreadIndices. More...
 
static constexpr bool IsMaskNone = std::is_same<MaskType, vtkm::worklet::MaskNone>::value
 

Detailed Description

Base class for worklets that map over the cells in a structured grid with neighborhood information.

The domain of a WorkletCellNeighborhood is a vtkm::cont::CellSetStructured. It visits all the cells in the mesh and provides access to the cell field values of the visited cell and the field values of the nearby connected neighborhood of a prescribed size.

Member Typedef Documentation

◆ Dispatcher

◆ EnableFnWhen

template<bool Cond, typename ReturnType >
using vtkm::worklet::WorkletCellNeighborhood::EnableFnWhen = typename std::enable_if<Cond, ReturnType>::type

Member Function Documentation

◆ GetThreadIndices() [1/3]

template<typename OutToInArrayType , typename VisitArrayType , typename ThreadToOutArrayType , vtkm::IdComponent Dimension>
vtkm::exec::arg::ThreadIndicesCellNeighborhood vtkm::worklet::WorkletCellNeighborhood::GetThreadIndices ( vtkm::Id  threadIndex,
const OutToInArrayType &  outToIn,
const VisitArrayType &  visit,
const ThreadToOutArrayType &  threadToOut,
const vtkm::exec::ConnectivityStructured< vtkm::TopologyElementTagPoint, vtkm::TopologyElementTagCell, Dimension > &  inputDomain 
) const
inline

Point neighborhood worklets use the related thread indices class.

◆ GetThreadIndices() [2/3]

template<typename OutToInArrayType , typename VisitArrayType , typename ThreadToOutArrayType , typename InputDomainType , bool S = IsScatterIdentity, bool M = IsMaskNone>
EnableFnWhen<S && M, vtkm::exec::arg::ThreadIndicesCellNeighborhood> vtkm::worklet::WorkletCellNeighborhood::GetThreadIndices ( vtkm::Id  threadIndex1D,
const vtkm::Id3 threadIndex3D,
const OutToInArrayType &  ,
const VisitArrayType &  ,
const ThreadToOutArrayType &  ,
const InputDomainType &  connectivity 
) const
inline

◆ GetThreadIndices() [3/3]

template<typename OutToInArrayType , typename VisitArrayType , typename ThreadToOutArrayType , typename InputDomainType , bool S = IsScatterIdentity, bool M = IsMaskNone>
EnableFnWhen<!(S && M), vtkm::exec::arg::ThreadIndicesCellNeighborhood> vtkm::worklet::WorkletCellNeighborhood::GetThreadIndices ( vtkm::Id  threadIndex1D,
const vtkm::Id3 threadIndex3D,
const OutToInArrayType &  outToIn,
const VisitArrayType &  visit,
const ThreadToOutArrayType &  threadToOut,
const InputDomainType &  connectivity 
) const
inline

Member Data Documentation

◆ IsMaskNone

constexpr bool vtkm::worklet::WorkletCellNeighborhood::IsMaskNone = std::is_same<MaskType, vtkm::worklet::MaskNone>::value
staticconstexprprivate

◆ IsScatterIdentity

constexpr bool vtkm::worklet::WorkletCellNeighborhood::IsScatterIdentity
staticconstexprprivate
Initial value:
=
std::is_same<ScatterType, vtkm::worklet::ScatterIdentity>::value

In the remaining methods and constexpr we determine at compilation time which method definition will be actually used for GetThreadIndices.

We want to avoid further function calls when we use WorkletMapTopology in which ScatterType is set as ScatterIdentity and MaskType as MaskNone. Otherwise, we call the default method defined at the bottom of this class.


The documentation for this class was generated from the following file: