VTK-m  2.0
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
vtkm::worklet::ScatterCounting Struct Reference

A scatter that maps input to some numbers of output. More...

#include <ScatterCounting.h>

Inheritance diagram for vtkm::worklet::ScatterCounting:

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::IdGetInputToOutputMap () 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::IdInputToOutputMap
 
OutputToInputMapType OutputToInputMap
 
VisitArrayType VisitArray
 

Detailed Description

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.

Member Typedef Documentation

◆ CountTypes

◆ OutputToInputMapType

◆ VisitArrayType

Constructor & Destructor Documentation

◆ ScatterCounting() [1/2]

VTKM_CONT vtkm::worklet::ScatterCounting::ScatterCounting ( const vtkm::cont::UnknownArrayHandle countArray,
vtkm::cont::DeviceAdapterId  device = vtkm::cont::DeviceAdapterTagAny(),
bool  saveInputToOutputMap = false 
)
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.

◆ ScatterCounting() [2/2]

VTKM_CONT vtkm::worklet::ScatterCounting::ScatterCounting ( const vtkm::cont::UnknownArrayHandle countArray,
bool  saveInputToOutputMap 
)
inline

Member Function Documentation

◆ BuildArrays()

VTKM_CONT void vtkm::worklet::ScatterCounting::BuildArrays ( const vtkm::cont::UnknownArrayHandle countArray,
vtkm::cont::DeviceAdapterId  device,
bool  saveInputToOutputMap 
)
private

◆ GetInputToOutputMap()

VTKM_CONT vtkm::cont::ArrayHandle<vtkm::Id> vtkm::worklet::ScatterCounting::GetInputToOutputMap ( ) const
inline

This array will not be valid unless explicitly instructed to be saved.

(See documentation for the constructor.)

◆ GetOutputRange() [1/2]

VTKM_CONT vtkm::Id vtkm::worklet::ScatterCounting::GetOutputRange ( vtkm::Id  inputRange) const
inline

◆ GetOutputRange() [2/2]

VTKM_CONT vtkm::Id vtkm::worklet::ScatterCounting::GetOutputRange ( vtkm::Id3  inputRange) const
inline

◆ GetOutputToInputMap() [1/2]

VTKM_CONT OutputToInputMapType vtkm::worklet::ScatterCounting::GetOutputToInputMap ( ) const
inline

◆ GetOutputToInputMap() [2/2]

template<typename RangeType >
VTKM_CONT OutputToInputMapType vtkm::worklet::ScatterCounting::GetOutputToInputMap ( RangeType  ) const
inline

◆ GetVisitArray()

template<typename RangeType >
VTKM_CONT VisitArrayType vtkm::worklet::ScatterCounting::GetVisitArray ( RangeType  ) const
inline

Member Data Documentation

◆ InputRange

vtkm::Id vtkm::worklet::ScatterCounting::InputRange
private

◆ InputToOutputMap

vtkm::cont::ArrayHandle<vtkm::Id> vtkm::worklet::ScatterCounting::InputToOutputMap
private

◆ OutputToInputMap

OutputToInputMapType vtkm::worklet::ScatterCounting::OutputToInputMap
private

◆ VisitArray

VisitArrayType vtkm::worklet::ScatterCounting::VisitArray
private

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