Go to the documentation of this file.
10 #ifndef vtk_m_worklet_ScatterCounting_h
11 #define vtk_m_worklet_ScatterCounting_h
28 struct ScatterCountingBuilder;
64 bool saveInputToOutputMap =
false)
66 this->BuildArrays(countArray, device, saveInputToOutputMap);
69 bool saveInputToOutputMap)
76 template <
typename RangeType>
79 return this->OutputToInputMap;
83 template <
typename RangeType>
86 return this->VisitArray;
92 if (inputRange != this->InputRange)
94 std::stringstream msg;
95 msg <<
"ScatterCounting initialized with input domain of size " << this->InputRange
96 <<
" but used with a worklet invoke of size " << inputRange << std::endl;
99 return this->VisitArray.GetNumberOfValues();
104 return this->GetOutputRange(inputRange[0] * inputRange[1] * inputRange[2]);
122 friend struct detail::ScatterCountingBuilder;
126 bool saveInputToOutputMap);
131 #endif //vtk_m_worklet_ScatterCounting_h
ScatterCounting(const vtkm::cont::UnknownArrayHandle &countArray, bool saveInputToOutputMap)
Definition: ScatterCounting.h:68
#define VTKM_WORKLET_EXPORT
Definition: vtkm_worklet_export.h:44
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::Id GetOutputRange(vtkm::Id3 inputRange) const
Definition: ScatterCounting.h:102
An ArrayHandle of an unknown value type and storage.
Definition: UnknownArrayHandle.h:430
OutputToInputMapType GetOutputToInputMap(RangeType) const
Definition: ScatterCounting.h:77
vtkm::Id GetOutputRange(vtkm::Id inputRange) const
Definition: ScatterCounting.h:90
int16_t Int16
Base type to use for 16-bit signed integer numbers.
Definition: Types.h:173
OutputToInputMapType GetOutputToInputMap() const
Definition: ScatterCounting.h:108
vtkm::cont::ArrayHandle< vtkm::Id > GetInputToOutputMap() const
This array will not be valid unless explicitly instructed to be saved.
Definition: ScatterCounting.h:114
vtkm::cont::ArrayHandle< vtkm::Id > InputToOutputMap
Definition: ScatterCounting.h:118
ScatterCounting(const vtkm::cont::UnknownArrayHandle &countArray, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny(), bool saveInputToOutputMap=false)
Construct a ScatterCounting object using an array of counts for the number of outputs for each input.
Definition: ScatterCounting.h:62
A scatter that maps input to some numbers of output.
Definition: ScatterCounting.h:44
int8_t Int8
Base type to use for 8-bit signed integer numbers.
Definition: Types.h:165
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
signed long long Int64
Base type to use for 64-bit signed integer numbers.
Definition: Types.h:204
Tag for a device adapter used to specify that any device may be used for an operation.
Definition: DeviceAdapterTag.h:180
VisitArrayType VisitArray
Definition: ScatterCounting.h:120
uint8_t UInt8
Base type to use for 8-bit unsigned integer numbers.
Definition: Types.h:169
An object used to specify a device.
Definition: DeviceAdapterTag.h:58
uint32_t UInt32
Base type to use for 32-bit unsigned integer numbers.
Definition: Types.h:185
This class is thrown when a VTKm function or method encounters an invalid value that inhibits progres...
Definition: ErrorBadValue.h:25
unsigned long long UInt64
Base type to use for 64-bit signed integer numbers.
Definition: Types.h:207
A template used to hold a list of types.
Definition: List.h:39
int32_t Int32
Base type to use for 32-bit signed integer numbers.
Definition: Types.h:181
vtkm::Id InputRange
Definition: ScatterCounting.h:117
uint16_t UInt16
Base type to use for 16-bit unsigned integer numbers.
Definition: Types.h:177
VisitArrayType GetVisitArray(RangeType) const
Definition: ScatterCounting.h:84
OutputToInputMapType OutputToInputMap
Definition: ScatterCounting.h:119