Go to the documentation of this file.
10 #ifndef vtkm_m_worklet_Threshold_h
11 #define vtkm_m_worklet_Threshold_h
36 template <
typename UnaryPredicate>
58 template <
typename ScalarsVecType>
82 template <
typename Operator>
97 combined = this->
Combine(combined, incoming);
104 template <
typename Operator>
115 dispatcher.Invoke(this->
PassFlags, passFlagsIn);
135 template <
typename ValueType,
136 typename StorageType,
137 typename UnaryPredicate,
138 typename PassFlagsCombineOp>
142 const UnaryPredicate& predicate,
143 bool allPointsMustPass,
144 const PassFlagsCombineOp& passFlagsCombineOp)
154 ThresholdWorklet worklet(predicate, allPointsMustPass);
156 dispatcher.Invoke(cellSet, field, passFlags);
205 template <
typename ValueType,
typename StorageType,
typename UnaryPredicate>
210 const UnaryPredicate& predicate,
211 bool allPointsMustPass =
false,
214 this->
RunIncremental(cellSet, field, fieldType, predicate, allPointsMustPass,
NoOp{});
231 #endif // vtkm_m_worklet_Threshold_h
_3(_2, PointCount) ExecutionSignature
Definition: worklet/Threshold.h:42
VTKM_CONT vtkm::Id GetNumberOfValues() const
Returns the number of entries in the array.
Definition: ArrayHandle.h:448
void(FieldInOut, FieldIn) ControlSignature
Definition: worklet/Threshold.h:86
vtkm::cont::UnknownCellSet Run(const vtkm::cont::UnknownCellSet &cellSet, const vtkm::cont::ArrayHandle< ValueType, StorageType > &field, vtkm::cont::Field::Association fieldType, const UnaryPredicate &predicate, bool allPointsMustPass=false, bool invert=false)
Definition: worklet/Threshold.h:206
#define VTKM_EXEC
Definition: ExportMacros.h:51
VTKM_CONT CombinePassFlagsWorklet(const Operator &combine)
Definition: worklet/Threshold.h:90
Groups connected points that have the same field value.
Definition: Atomic.h:19
void CombinePassFlags(const vtkm::cont::ArrayHandle< bool > &passFlagsIn, const Operator &combine)
Definition: worklet/Threshold.h:105
UnaryPredicate Predicate
Definition: worklet/Threshold.h:78
IncidentElementCount PointCount
Definition: WorkletMapTopology.h:267
vtkm::Int32 IdComponent
Represents a component ID (index of component in a vector).
Definition: Types.h:168
Association
Definition: cont/Field.h:34
bool AllPointsMustPass
Definition: worklet/Threshold.h:79
void RunIncremental(const vtkm::cont::UnknownCellSet &cellSet, const vtkm::cont::ArrayHandle< ValueType, StorageType > &field, vtkm::cont::Field::Association fieldType, const UnaryPredicate &predicate, bool allPointsMustPass, const PassFlagsCombineOp &passFlagsCombineOp)
Incrementally run the worklet on the given parameters.
Definition: worklet/Threshold.h:139
static VTKM_CONT bool Copy(vtkm::cont::DeviceAdapterId devId, const vtkm::cont::ArrayHandle< T, CIn > &input, vtkm::cont::ArrayHandle< U, COut > &output)
Definition: Algorithm.h:410
Predicate that takes a single argument x, and returns True if and only if x is false.
Definition: UnaryPredicates.h:45
A CellSet of an unknown type.
Definition: UnknownCellSet.h:48
void CastAndCall(const DynamicObject &dynamicObject, Functor &&f, Args &&... args)
A Generic interface to CastAndCall.
Definition: CastAndCall.h:47
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
Operator Combine
Definition: worklet/Threshold.h:101
void(_1, _2) ExecitionSignature
Definition: worklet/Threshold.h:87
vtkm::cont::ArrayHandle< vtkm::Id > GetValidCellIds() const
Definition: worklet/Threshold.h:172
VTKM_CONT ThresholdByPointField(const UnaryPredicate &predicate, bool allPointsMustPass)
Definition: worklet/Threshold.h:52
Dispatcher for worklets that inherit from WorkletMapField.
Definition: DispatcherMapField.h:25
VTKM_CONT vtkm::cont::ArrayHandleTransform< HandleType, FunctorType > make_ArrayHandleTransform(HandleType handle, FunctorType functor)
make_ArrayHandleTransform is convenience function to generate an ArrayHandleTransform.
Definition: ArrayHandleTransform.h:474
Dispatcher for worklets that inherit from WorkletMapTopology.
Definition: DispatcherMapTopology.h:31
A control signature tag for input fields.
Definition: WorkletMapField.h:49
Base class for worklets that map from Points to Cells.
Definition: WorkletMapTopology.h:255
vtkm::cont::ArrayHandle< vtkm::Id > ValidCellIds
Definition: worklet/Threshold.h:226
static VTKM_CONT void CopyIf(vtkm::cont::DeviceAdapterId devId, const vtkm::cont::ArrayHandle< T, CIn > &input, const vtkm::cont::ArrayHandle< U, CStencil > &stencil, vtkm::cont::ArrayHandle< T, COut > &output)
Definition: Algorithm.h:435
VTKM_EXEC bool operator()(const ScalarsVecType &scalars, vtkm::Id count) const
Definition: worklet/Threshold.h:59
FieldInIncident FieldInPoint
Definition: WorkletMapTopology.h:259
#define VTKM_CONT
Definition: ExportMacros.h:57
void CombinePassFlags(const vtkm::cont::ArrayHandle< bool > &passFlagsIn, NoOp)
Definition: worklet/Threshold.h:125
A control signature tag for input-output (in-place) fields.
Definition: WorkletMapField.h:71
bool PassFlagsModified
Definition: worklet/Threshold.h:225
void InvertResults()
Definition: worklet/Threshold.h:198
VTKM_CONT ThresholdByPointField()
Definition: worklet/Threshold.h:45
Definition: worklet/Threshold.h:33
vtkm::cont::UnknownCellSet GenerateResultCellSet(const vtkm::cont::UnknownCellSet &cellSet)
Definition: worklet/Threshold.h:185
Definition: worklet/Threshold.h:37
static VTKM_CONT void Run(const InCellSetType &inCellSet, vtkm::cont::CellSetExplicit< ShapeStorage, ConnectivityStorage, OffsetsStorage > &outCellSet, vtkm::Id numberOfPoints)
Definition: CellDeepCopy.h:68
vtkm::cont::ArrayHandle< bool > PassFlags
Definition: worklet/Threshold.h:223
This class is thrown when a VTKm function or method encounters an invalid value that inhibits progres...
Definition: ErrorBadValue.h:25
Definition: worklet/Threshold.h:121
Definition: worklet/Threshold.h:83
VTKM_EXEC void operator()(bool &combined, bool incoming) const
Definition: worklet/Threshold.h:95
void(CellSetIn cellset, FieldInPoint scalars, FieldOutCell passFlags) ControlSignature
Definition: worklet/Threshold.h:40
vtkm::cont::CellSetPermutation< OriginalCellSet, PermutationArrayHandleType > make_CellSetPermutation(const PermutationArrayHandleType &cellIndexMap, const OriginalCellSet &cellSet)
Definition: CellSetPermutation.h:549
An implicit array handle containing the its own indices.
Definition: ArrayHandleIndex.h:54
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38
FieldOut FieldOutCell
Definition: WorkletMapTopology.h:263