VTK-m
2.0
|
A scatter that maps input to some numbers of output. More...
#include <ScatterCounting.h>
Public Types | |
using | CountTypes = vtkm::List< vtkm::Int64, vtkm::Int32, vtkm::Int16, vtkm::Int8, vtkm::UInt64, vtkm::UInt32, vtkm::UInt16, vtkm::UInt8 > |
using | OutputToInputMapType = vtkm::cont::ArrayHandle< vtkm::Id > |
using | VisitArrayType = vtkm::cont::ArrayHandle< vtkm::IdComponent > |
Public Member Functions | |
VTKM_CONT | 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. More... | |
VTKM_CONT | ScatterCounting (const vtkm::cont::UnknownArrayHandle &countArray, bool saveInputToOutputMap) |
template<typename RangeType > | |
VTKM_CONT OutputToInputMapType | GetOutputToInputMap (RangeType) const |
template<typename RangeType > | |
VTKM_CONT VisitArrayType | GetVisitArray (RangeType) const |
VTKM_CONT vtkm::Id | GetOutputRange (vtkm::Id inputRange) const |
VTKM_CONT vtkm::Id | GetOutputRange (vtkm::Id3 inputRange) const |
VTKM_CONT OutputToInputMapType | GetOutputToInputMap () const |
VTKM_CONT vtkm::cont::ArrayHandle< vtkm::Id > | GetInputToOutputMap () const |
This array will not be valid unless explicitly instructed to be saved. More... | |
Private Member Functions | |
VTKM_CONT void | BuildArrays (const vtkm::cont::UnknownArrayHandle &countArray, vtkm::cont::DeviceAdapterId device, bool saveInputToOutputMap) |
Private Attributes | |
vtkm::Id | InputRange |
vtkm::cont::ArrayHandle< vtkm::Id > | InputToOutputMap |
OutputToInputMapType | OutputToInputMap |
VisitArrayType | VisitArray |
A scatter that maps input to some numbers of output.
The Scatter
classes are responsible for defining how much output is generated based on some sized input. ScatterCounting
establishes a 1 to N mapping from input to output. That is, every input element generates 0 or more output elements associated with it. The output elements are grouped by the input associated.
A counting scatter takes an array of counts for each input. The data is taken in the constructor and the index arrays are derived from that. So changing the counts after the scatter is created will have no effect.
using vtkm::worklet::ScatterCounting::CountTypes = vtkm::List<vtkm::Int64, vtkm::Int32, vtkm::Int16, vtkm::Int8, vtkm::UInt64, vtkm::UInt32, vtkm::UInt16, vtkm::UInt8> |
|
inline |
Construct a ScatterCounting
object using an array of counts for the number of outputs for each input.
Part of the construction requires generating an input to output map, but this map is not needed for the operations of ScatterCounting
, so by default it is deleted. However, other users might make use of it, so you can instruct the constructor to save the input to output map.
|
inline |
|
private |
|
inline |
This array will not be valid unless explicitly instructed to be saved.
(See documentation for the constructor.)
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |