Viskores  1.0
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
viskores::worklet::ScatterPermutation< PermutationStorage > Class Template Reference

A scatter that maps input to output based on a permutation array. More...

#include <ScatterPermutation.h>

Inheritance diagram for viskores::worklet::ScatterPermutation< PermutationStorage >:

Public Types

using OutputToInputMapType = PermutationArrayHandle
 
using VisitArrayType = viskores::cont::ArrayHandleConstant< viskores::IdComponent >
 

Public Member Functions

 ScatterPermutation (const PermutationArrayHandle &permutation)
 
template<typename RangeType >
viskores::Id GetOutputRange (RangeType) const
 
template<typename RangeType >
OutputToInputMapType GetOutputToInputMap (RangeType) const
 
OutputToInputMapType GetOutputToInputMap () const
 
VisitArrayType GetVisitArray (viskores::Id inputRange) const
 
VisitArrayType GetVisitArray (viskores::Id3 inputRange) const
 

Private Types

using PermutationArrayHandle = viskores::cont::ArrayHandle< viskores::Id, PermutationStorage >
 

Private Attributes

PermutationArrayHandle Permutation
 

Detailed Description

template<typename PermutationStorage = VISKORES_DEFAULT_STORAGE_TAG>
class viskores::worklet::ScatterPermutation< PermutationStorage >

A scatter that maps input to output based on a permutation array.

The Scatter classes are responsible for defining how much output is generated based on some sized input. ScatterPermutation is similar to ScatterCounting but can have lesser memory usage for some cases. The constructor takes an array of ids, where each entry maps the corresponding output to an input. The ids can be in any order and there can be duplicates. Note that even with duplicates the VistIndex is always 0.

Member Typedef Documentation

◆ OutputToInputMapType

template<typename PermutationStorage = VISKORES_DEFAULT_STORAGE_TAG>
using viskores::worklet::ScatterPermutation< PermutationStorage >::OutputToInputMapType = PermutationArrayHandle

◆ PermutationArrayHandle

template<typename PermutationStorage = VISKORES_DEFAULT_STORAGE_TAG>
using viskores::worklet::ScatterPermutation< PermutationStorage >::PermutationArrayHandle = viskores::cont::ArrayHandle<viskores::Id, PermutationStorage>
private

◆ VisitArrayType

template<typename PermutationStorage = VISKORES_DEFAULT_STORAGE_TAG>
using viskores::worklet::ScatterPermutation< PermutationStorage >::VisitArrayType = viskores::cont::ArrayHandleConstant<viskores::IdComponent>

Constructor & Destructor Documentation

◆ ScatterPermutation()

template<typename PermutationStorage = VISKORES_DEFAULT_STORAGE_TAG>
viskores::worklet::ScatterPermutation< PermutationStorage >::ScatterPermutation ( const PermutationArrayHandle permutation)
inline

Member Function Documentation

◆ GetOutputRange()

template<typename PermutationStorage = VISKORES_DEFAULT_STORAGE_TAG>
template<typename RangeType >
viskores::Id viskores::worklet::ScatterPermutation< PermutationStorage >::GetOutputRange ( RangeType  ) const
inline

◆ GetOutputToInputMap() [1/2]

template<typename PermutationStorage = VISKORES_DEFAULT_STORAGE_TAG>
OutputToInputMapType viskores::worklet::ScatterPermutation< PermutationStorage >::GetOutputToInputMap ( ) const
inline

◆ GetOutputToInputMap() [2/2]

template<typename PermutationStorage = VISKORES_DEFAULT_STORAGE_TAG>
template<typename RangeType >
OutputToInputMapType viskores::worklet::ScatterPermutation< PermutationStorage >::GetOutputToInputMap ( RangeType  ) const
inline

◆ GetVisitArray() [1/2]

template<typename PermutationStorage = VISKORES_DEFAULT_STORAGE_TAG>
VisitArrayType viskores::worklet::ScatterPermutation< PermutationStorage >::GetVisitArray ( viskores::Id  inputRange) const
inline

◆ GetVisitArray() [2/2]

template<typename PermutationStorage = VISKORES_DEFAULT_STORAGE_TAG>
VisitArrayType viskores::worklet::ScatterPermutation< PermutationStorage >::GetVisitArray ( viskores::Id3  inputRange) const
inline

Member Data Documentation

◆ Permutation

template<typename PermutationStorage = VISKORES_DEFAULT_STORAGE_TAG>
PermutationArrayHandle viskores::worklet::ScatterPermutation< PermutationStorage >::Permutation
private

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