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

Mask using a given array of indices to include in the output. More...

#include <MaskIndices.h>

Inheritance diagram for vtkm::worklet::MaskIndices:

Public Types

using ThreadToOutputMapType = vtkm::cont::ArrayHandle< vtkm::Id >
 

Public Member Functions

template<typename RangeType >
vtkm::Id GetThreadRange (RangeType vtkmNotUsed(outputRange)) const
 
template<typename RangeType >
ThreadToOutputMapType GetThreadToOutputMap (RangeType vtkmNotUsed(outputRange)) const
 
 MaskIndices (const vtkm::cont::ArrayHandle< vtkm::Id > &indexArray, vtkm::cont::DeviceAdapterId vtkmNotUsed(device)=vtkm::cont::DeviceAdapterTagAny())
 Construct using an index array. More...
 
template<typename T , typename S >
 MaskIndices (const vtkm::cont::ArrayHandle< T, S > &indexArray, vtkm::cont::DeviceAdapterId device=vtkm::cont::DeviceAdapterTagAny())
 Construct using an index array. More...
 

Private Attributes

ThreadToOutputMapType ThreadToOutputMap
 

Detailed Description

Mask using a given array of indices to include in the output.

MaskIndices is a worklet mask object that is used to select elements in the output of a worklet to include in the output. This is done by providing a mask array. This array contains an entry for every output to create. Any output index not included is not generated.

It is OK to give indices that are out of order, but any index must be provided at most one time. It is an error to have the same index listed twice.

Member Typedef Documentation

◆ ThreadToOutputMapType

Constructor & Destructor Documentation

◆ MaskIndices() [1/2]

vtkm::worklet::MaskIndices::MaskIndices ( const vtkm::cont::ArrayHandle< vtkm::Id > &  indexArray,
vtkm::cont::DeviceAdapterId   vtkmNotUseddevice = vtkm::cont::DeviceAdapterTagAny() 
)
inlineexplicit

Construct using an index array.

When you construct a MaskSelect with the IndexArray tag, you provide an array containing an index for each output to produce. It is OK to give indices that are out of order, but any index must be provided at most one time. It is an error to have the same index listed twice.

Note that depending on the type of the array passed in, the index may be shallow copied or deep copied into the state of this mask object. Thus, it is a bad idea to alter the array once given to this object.

◆ MaskIndices() [2/2]

template<typename T , typename S >
vtkm::worklet::MaskIndices::MaskIndices ( const vtkm::cont::ArrayHandle< T, S > &  indexArray,
vtkm::cont::DeviceAdapterId  device = vtkm::cont::DeviceAdapterTagAny() 
)
inlineexplicit

Construct using an index array.

When you construct a MaskSelect with the IndexArray tag, you provide an array containing an index for each output to produce. It is OK to give indices that are out of order, but any index must be provided at most one time. It is an error to have the same index listed twice.

Note that depending on the type of the array passed in, the index may be shallow copied or deep copied into the state of this mask object. Thus, it is a bad idea to alter the array once given to this object.

Member Function Documentation

◆ GetThreadRange()

template<typename RangeType >
vtkm::Id vtkm::worklet::MaskIndices::GetThreadRange ( RangeType   vtkmNotUsedoutputRange) const
inline

◆ GetThreadToOutputMap()

template<typename RangeType >
ThreadToOutputMapType vtkm::worklet::MaskIndices::GetThreadToOutputMap ( RangeType   vtkmNotUsedoutputRange) const
inline

Member Data Documentation

◆ ThreadToOutputMap

ThreadToOutputMapType vtkm::worklet::MaskIndices::ThreadToOutputMap
private

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