VTK-m  2.0
WorkletReduceByKey.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //============================================================================
10 #ifndef vtk_m_worklet_WorkletReduceByKey_h
11 #define vtk_m_worklet_WorkletReduceByKey_h
12 
14 
26 
28 
36 
37 namespace vtkm
38 {
39 namespace worklet
40 {
41 
42 class WorkletReduceByKey : public vtkm::worklet::internal::WorkletBase
43 {
44 public:
45  template <typename Worklet>
57  {
61  };
62 
71  {
75  };
76 
87  {
91  };
92 
103  {
107  };
108 
120  {
124  };
125 
137  {
141  };
142 
151  {
155  };
156 
165  {
166  };
167 
171  template <typename OutToInArrayType,
172  typename VisitArrayType,
173  typename ThreadToOutArrayType,
174  typename InputDomainType>
176  vtkm::Id threadIndex,
177  const OutToInArrayType& outToIn,
178  const VisitArrayType& visit,
179  const ThreadToOutArrayType& threadToOut,
180  const InputDomainType& inputDomain) const
181  {
182  const vtkm::Id outIndex = threadToOut.Get(threadIndex);
184  threadIndex, outToIn.Get(outIndex), visit.Get(outIndex), outIndex, inputDomain);
185  }
186 };
187 }
188 } // namespace vtkm::worklet
189 
190 #endif //vtk_m_worklet_WorkletReduceByKey_h
TransportTagKeyedValuesInOut.h
vtkm::exec::arg::ValueCount
The ExecutionSignature tag to get the number of values.
Definition: ValueCount.h:40
VTKM_EXEC
#define VTKM_EXEC
Definition: ExportMacros.h:51
TransportTagKeyedValuesIn.h
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
TransportTagKeyedValuesOut.h
TypeCheckTagArrayOut.h
vtkm::worklet::WorkletReduceByKey::ValuesIn
A control signature tag for input values.
Definition: WorkletReduceByKey.h:70
TransportTagArrayIn.h
vtkm::exec::arg::FetchTagKeysIn
Fetch tag for getting key values in a reduce by key.
Definition: FetchTagKeysIn.h:31
vtkm::exec::arg::FetchTagArrayDirectOut
Fetch tag for setting array values with direct indexing.
Definition: FetchTagArrayDirectOut.h:29
TransportTagArrayOut.h
vtkm::worklet::WorkletReduceByKey::ValuesOut
A control signature tag for output values.
Definition: WorkletReduceByKey.h:102
vtkm::cont::arg::TypeCheckTagArrayOut
The Array type check passes for any object that behaves like an ArrayHandle class and can be passed t...
Definition: TypeCheckTagArrayOut.h:31
vtkm::worklet::WorkletReduceByKey::ValueCount
The ExecutionSignature tag to get the number of values.
Definition: WorkletReduceByKey.h:164
vtkm::cont::arg::TransportTagArrayInOut
Transport tag for in-place arrays.
Definition: TransportTagArrayInOut.h:33
vtkm::exec::arg::ThreadIndicesReduceByKey
Container for thread indices in a reduce by key invocation.
Definition: ThreadIndicesReduceByKey.h:31
vtkm::worklet::WorkletReduceByKey::ReducedValuesOut
A control signature tag for reduced output values.
Definition: WorkletReduceByKey.h:150
FetchTagKeysIn.h
vtkm::cont::arg::TransportTagArrayOut
Transport tag for output arrays.
Definition: TransportTagArrayOut.h:32
vtkm::Id
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
vtkm::cont::arg::TypeCheckTagArrayInOut
The Array type check passes for any object that behaves like an ArrayHandle class and can be passed t...
Definition: TypeCheckTagArrayInOut.h:31
TypeCheckTagArrayInOut.h
vtkm::worklet::WorkletReduceByKey::ValuesInOut
A control signature tag for input/output values.
Definition: WorkletReduceByKey.h:86
TransportTagArrayInOut.h
vtkm::cont::arg::TypeCheckTagArrayIn
The Array type check passes for any object that behaves like an ArrayHandle class and can be passed t...
Definition: TypeCheckTagArrayIn.h:31
vtkm::cont::arg::TransportTagKeyedValuesIn
Transport tag for input values in a reduce by key.
Definition: TransportTagKeyedValuesIn.h:28
vtkm::worklet::WorkletReduceByKey::GetThreadIndices
VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC 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.
Definition: WorkletReduceByKey.h:175
vtkm::worklet::WorkletReduceByKey::ReducedValuesIn
A control signature tag for reduced output values.
Definition: WorkletReduceByKey.h:119
vtkm::exec::arg::FetchTagArrayDirectIn
Fetch tag for getting array values with direct indexing.
Definition: FetchTagArrayDirectIn.h:29
vtkm::worklet::WorkletReduceByKey::ReducedValuesInOut
A control signature tag for reduced output values.
Definition: WorkletReduceByKey.h:136
vtkm::worklet::WorkletReduceByKey
Definition: WorkletReduceByKey.h:42
ValueCount.h
TypeCheckTagArrayIn.h
vtkm::cont::arg::TransportTagKeysIn
Transport tag for keys in a reduce by key.
Definition: TransportTagKeysIn.h:28
WorkletBase.h
TransportTagKeysIn.h
vtkm::worklet::WorkletReduceByKey::KeysIn
A control signature tag for input keys.
Definition: WorkletReduceByKey.h:56
vtkm::cont::arg::TransportTagArrayIn
Transport tag for input arrays.
Definition: TransportTagArrayIn.h:32
ThreadIndicesReduceByKey.h
vtkm::cont::arg::TransportTagKeyedValuesOut
Transport tag for input values in a reduce by key.
Definition: TransportTagKeyedValuesOut.h:28
DispatcherReduceByKey.h
FetchTagArrayDirectIn.h
vtkm::cont::arg::ControlSignatureTagBase
The base class for all tags used in a ControlSignature.
Definition: ControlSignatureTagBase.h:36
FetchTagArrayDirectInOut.h
vtkm::worklet::DispatcherReduceByKey
Dispatcher for worklets that inherit from WorkletReduceByKey.
Definition: DispatcherReduceByKey.h:27
FetchTagArrayDirectOut.h
vtkm::exec::arg::FetchTagArrayDirectInOut
Fetch tag for in-place modifying array values with direct indexing.
Definition: FetchTagArrayDirectInOut.h:39
TypeCheckTagKeys.h
vtkm::cont::arg::TypeCheckTagKeys
Check for a Keys object.
Definition: TypeCheckTagKeys.h:24
VTKM_SUPPRESS_EXEC_WARNINGS
#define VTKM_SUPPRESS_EXEC_WARNINGS
Definition: ExportMacros.h:53
ReduceByKeyLookup.h
vtkm::cont::arg::TransportTagKeyedValuesInOut
Transport tag for input values in a reduce by key.
Definition: TransportTagKeyedValuesInOut.h:28