VTK-m  2.0
Classes | Public Types | Public Member Functions | Private Types | Static Private Attributes | List of all members
vtkm::worklet::WorkletMapTopology< VisitTopology, IncidentTopology > Class Template Reference

Base class for worklets that map topology elements onto each other. More...

#include <WorkletMapTopology.h>

Inheritance diagram for vtkm::worklet::WorkletMapTopology< VisitTopology, IncidentTopology >:
vtkm::exec::FunctorBase

Classes

struct  CellSetIn
 A control signature tag for input connectivity. More...
 
struct  CellShape
 An execution signature tag for getting the cell shape. More...
 
struct  FieldInIncident
 A control signature tag for input fields from the incident topology. More...
 
struct  FieldInOut
 A control signature tag for input-output (in-place) fields from the visited topology. More...
 
struct  FieldInVisit
 A control signature tag for input fields from the visited topology. More...
 
struct  FieldOut
 A control signature tag for output fields. More...
 
struct  IncidentElementCount
 An execution signature tag to get the number of incident elements. More...
 
struct  IncidentElementIndices
 An execution signature tag to get the indices of from elements. More...
 

Public Types

using VisitTopologyType = VisitTopology
 
using IncidentTopologyType = IncidentTopology
 

Public Member Functions

template<typename OutToInArrayType , typename VisitArrayType , typename ThreadToOutArrayType , typename InputDomainType >
VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC vtkm::exec::arg::ThreadIndicesTopologyMap< InputDomainType, vtkm::exec::arg::CustomScatterOrMaskTagGetThreadIndices (vtkm::Id threadIndex, const OutToInArrayType &outToIn, const VisitArrayType &visit, const ThreadToOutArrayType &threadToOut, const InputDomainType &connectivity) const
 Topology map worklets use topology map indices. More...
 
template<typename OutToInArrayType , typename VisitArrayType , typename ThreadToOutArrayType , typename InputDomainType , bool S = IsScatterIdentity, bool M = IsMaskNone>
VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC EnableFnWhen< S &&M, vtkm::exec::arg::ThreadIndicesTopologyMap< InputDomainType, vtkm::exec::arg::DefaultScatterAndMaskTag > > GetThreadIndices (vtkm::Id threadIndex1D, const vtkm::Id3 &threadIndex3D, const OutToInArrayType &vtkmNotUsed(outToIn), const VisitArrayType &vtkmNotUsed(visit), const ThreadToOutArrayType &vtkmNotUsed(threadToOut), const InputDomainType &connectivity) const
 Optimized for ScatterIdentity and MaskNone. More...
 
template<typename OutToInArrayType , typename VisitArrayType , typename ThreadToOutArrayType , typename InputDomainType , bool S = IsScatterIdentity, bool M = IsMaskNone>
VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC EnableFnWhen<!(S &&M), vtkm::exec::arg::ThreadIndicesTopologyMap< InputDomainType, vtkm::exec::arg::CustomScatterOrMaskTag > > GetThreadIndices (vtkm::Id threadIndex1D, const vtkm::Id3 &threadIndex3D, const OutToInArrayType &outToIn, const VisitArrayType &visit, const ThreadToOutArrayType &threadToOut, const InputDomainType &connectivity) const
 Default version. More...
 

Private Types

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

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

template<typename VisitTopology, typename IncidentTopology>
class vtkm::worklet::WorkletMapTopology< VisitTopology, IncidentTopology >

Base class for worklets that map topology elements onto each other.

The template parameters for this class must be members of the TopologyElementTag group. The VisitTopology indicates the elements of a cellset that will be visited, and the IncidentTopology will be mapped onto the VisitTopology.

For instance, WorkletMapTopology<TopologyElementTagPoint, TopologyElementCell> will execute one instance per point, and provides convenience methods for gathering information about the cells incident to the current point.

Member Typedef Documentation

◆ EnableFnWhen

template<typename VisitTopology , typename IncidentTopology >
template<bool Cond, typename ReturnType >
using vtkm::worklet::WorkletMapTopology< VisitTopology, IncidentTopology >::EnableFnWhen = typename std::enable_if<Cond, ReturnType>::type
private

◆ IncidentTopologyType

template<typename VisitTopology , typename IncidentTopology >
using vtkm::worklet::WorkletMapTopology< VisitTopology, IncidentTopology >::IncidentTopologyType = IncidentTopology

◆ VisitTopologyType

template<typename VisitTopology , typename IncidentTopology >
using vtkm::worklet::WorkletMapTopology< VisitTopology, IncidentTopology >::VisitTopologyType = VisitTopology

Member Function Documentation

◆ GetThreadIndices() [1/3]

template<typename VisitTopology , typename IncidentTopology >
template<typename OutToInArrayType , typename VisitArrayType , typename ThreadToOutArrayType , typename InputDomainType >
VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC vtkm::exec::arg::ThreadIndicesTopologyMap<InputDomainType, vtkm::exec::arg::CustomScatterOrMaskTag> vtkm::worklet::WorkletMapTopology< VisitTopology, IncidentTopology >::GetThreadIndices ( vtkm::Id  threadIndex,
const OutToInArrayType &  outToIn,
const VisitArrayType &  visit,
const ThreadToOutArrayType &  threadToOut,
const InputDomainType &  connectivity 
) const
inline

Topology map worklets use topology map indices.

◆ GetThreadIndices() [2/3]

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

Default version.

◆ GetThreadIndices() [3/3]

template<typename VisitTopology , typename IncidentTopology >
template<typename OutToInArrayType , typename VisitArrayType , typename ThreadToOutArrayType , typename InputDomainType , bool S = IsScatterIdentity, bool M = IsMaskNone>
VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC EnableFnWhen< S && M, vtkm::exec::arg::ThreadIndicesTopologyMap<InputDomainType, vtkm::exec::arg::DefaultScatterAndMaskTag> > vtkm::worklet::WorkletMapTopology< VisitTopology, IncidentTopology >::GetThreadIndices ( vtkm::Id  threadIndex1D,
const vtkm::Id3 threadIndex3D,
const OutToInArrayType &  vtkmNotUsedoutToIn,
const VisitArrayType &  vtkmNotUsedvisit,
const ThreadToOutArrayType &  vtkmNotUsedthreadToOut,
const InputDomainType &  connectivity 
) const
inline

Optimized for ScatterIdentity and MaskNone.

Member Data Documentation

◆ IsMaskNone

template<typename VisitTopology , typename IncidentTopology >
constexpr bool vtkm::worklet::WorkletMapTopology< VisitTopology, IncidentTopology >::IsMaskNone = std::is_same<MaskType, vtkm::worklet::MaskNone>::value
staticconstexprprivate

◆ IsScatterIdentity

template<typename VisitTopology , typename IncidentTopology >
constexpr bool vtkm::worklet::WorkletMapTopology< VisitTopology, IncidentTopology >::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: