VTK-m  2.2
Classes | Public Types | Public Member Functions | List of all members
vtkm::worklet::WorkletReduceByKey Class Reference

Base class for worklets that group elements by keys. More...

#include <WorkletReduceByKey.h>

Inheritance diagram for vtkm::worklet::WorkletReduceByKey:
vtkm::exec::FunctorBase vtkm::worklet::AverageByKey::AverageWorklet

Classes

struct  _1
 Argument placeholders for an ExecutionSignature. More...
 
struct  AtomicArrayInOut
 ControlSignature tag for whole input/output arrays. More...
 
struct  Device
 ExecutionSignature tag for getting the device adapter tag. More...
 
struct  ExecObject
 ControlSignature tag for execution object inputs. More...
 
struct  InputIndex
 The ExecutionSignature tag to use to get the input index. More...
 
struct  KeysIn
 A control signature tag for input keys. More...
 
struct  OutputIndex
 The ExecutionSignature tag to use to get the output index. More...
 
struct  ReducedValuesIn
 A control signature tag for reduced input values. More...
 
struct  ReducedValuesInOut
 A control signature tag for reduced output values. More...
 
struct  ReducedValuesOut
 A control signature tag for reduced output values. More...
 
struct  ThreadIndices
 The ExecutionSignature tag to use to get the thread indices. More...
 
struct  ValueCount
 The ExecutionSignature tag to get the number of values. More...
 
struct  ValuesIn
 A control signature tag for input values associated with the keys. More...
 
struct  ValuesInOut
 A control signature tag for input/output values associated with the keys. More...
 
struct  ValuesOut
 A control signature tag for output values associated with the keys. More...
 
struct  VisitIndex
 The ExecutionSignature tag to use to get the visit index. More...
 
struct  WholeArrayIn
 ControlSignature tag for whole input arrays. More...
 
struct  WholeArrayInOut
 ControlSignature tag for whole input/output arrays. More...
 
struct  WholeArrayOut
 ControlSignature tag for whole output arrays. More...
 
struct  WholeCellSetIn
 ControlSignature tag for whole input topology. More...
 
struct  WorkIndex
 The ExecutionSignature tag to use to get the work index. More...
 

Public Types

template<typename Worklet >
using Dispatcher = vtkm::worklet::DispatcherReduceByKey< Worklet >
 

Public Member Functions

template<typename OutToInArrayType , typename VisitArrayType , typename ThreadToOutArrayType , typename InputDomainType >
vtkm::exec::arg::ThreadIndicesReduceByKey GetThreadIndices (vtkm::Id threadIndex, const OutToInArrayType &outToIn, const VisitArrayType &visit, const ThreadToOutArrayType &threadToOut, const InputDomainType &inputDomain) const
 Reduce by key worklets use the related thread indices class. More...
 

Detailed Description

Base class for worklets that group elements by keys.

The InputDomain of this worklet is a vtkm::worklet::Keys object, which holds an array of keys. All entries of this array with the same key are collected together, and the operator of the worklet is called once for each unique key.

Input arrays are (typically) the same size as the number of keys. When these objects are passed to the operator of the worklet, all values of the associated key are placed in a Vec-like object. Output arrays get sized by the number of unique keys, and each call to the operator produces one result for each output.

Member Typedef Documentation

◆ Dispatcher

Member Function Documentation

◆ GetThreadIndices()

template<typename OutToInArrayType , typename VisitArrayType , typename ThreadToOutArrayType , typename InputDomainType >
vtkm::exec::arg::ThreadIndicesReduceByKey vtkm::worklet::WorkletReduceByKey::GetThreadIndices ( vtkm::Id  threadIndex,
const OutToInArrayType &  outToIn,
const VisitArrayType &  visit,
const ThreadToOutArrayType &  threadToOut,
const InputDomainType &  inputDomain 
) const
inline

Reduce by key worklets use the related thread indices class.


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