VTK-m  2.2
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 
54 class WorkletReduceByKey : public vtkm::worklet::internal::WorkletBase
55 {
56 public:
57  template <typename Worklet>
59 
63 
74  {
78  };
79 
89  {
93  };
94 
106  {
110  };
111 
124  {
128  };
129 
140  {
144  };
145 
161  {
165  };
166 
183  {
187  };
188 
189 #ifdef VTKM_DOXYGEN_ONLY
190  // These redeclarations of superclass features are for documentation purposes only.
191 
193  struct WholeArrayIn : vtkm::worklet::internal::WorkletBase::WholeArrayIn
194  {
195  };
196 
198  struct WholeArrayOut : vtkm::worklet::internal::WorkletBase::WholeArrayOut
199  {
200  };
201 
203  struct WholeArrayInOut : vtkm::worklet::internal::WorkletBase::WholeArrayInOut
204  {
205  };
206 
208  struct AtomicArrayInOut : vtkm::worklet::internal::WorkletBase::AtomicArrayInOut
209  {
210  };
211 
213  template <typename VisitTopology = Cell, typename IncidentTopology = Point>
215  : vtkm::worklet::internal::WorkletBase::WholeCellSetIn<VisitTopology, IncidentTopology>
216  {
217  };
218 
220  struct ExecObject : vtkm::worklet::internal::WorkletBase::ExecObject
221  {
222  };
223 #endif
224 
226 
230 
231 #ifdef VTKM_DOXYGEN_ONLY
232  // These redeclarations of superclass features are for documentation purposes only.
233 
235  struct _1 : vtkm::worklet::internal::WorkletBase::_1
236  {
237  };
238 #endif
239 
250  {
251  };
252 
253 #ifdef VTKM_DOXYGEN_ONLY
254  // These redeclarations of superclass features are for documentation purposes only.
255 
258  {
259  };
260 
263  {
264  };
265 
268  {
269  };
270 
273  {
274  };
275 
278  {
279  };
280 
282  struct Device : vtkm::worklet::internal::WorkletBase::Device
283  {
284  };
285 #endif
286 
288 
292  template <typename OutToInArrayType,
293  typename VisitArrayType,
294  typename ThreadToOutArrayType,
295  typename InputDomainType>
297  vtkm::Id threadIndex,
298  const OutToInArrayType& outToIn,
299  const VisitArrayType& visit,
300  const ThreadToOutArrayType& threadToOut,
301  const InputDomainType& inputDomain) const
302  {
303  const vtkm::Id outIndex = threadToOut.Get(threadIndex);
305  threadIndex, outToIn.Get(outIndex), visit.Get(outIndex), outIndex, inputDomain);
306  }
307 };
308 }
309 } // namespace vtkm::worklet
310 
311 #endif //vtk_m_worklet_WorkletReduceByKey_h
vtkm::worklet::WorkletReduceByKey::Device
ExecutionSignature tag for getting the device adapter tag.
Definition: WorkletReduceByKey.h:282
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 associated with the keys.
Definition: WorkletReduceByKey.h:88
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:31
TransportTagArrayOut.h
vtkm::worklet::WorkletReduceByKey::ValuesOut
A control signature tag for output values associated with the keys.
Definition: WorkletReduceByKey.h:123
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:249
vtkm::cont::arg::TransportTagArrayInOut
Transport tag for in-place arrays.
Definition: TransportTagArrayInOut.h:33
vtkm::worklet::WorkletReduceByKey::VisitIndex
The ExecutionSignature tag to use to get the visit index.
Definition: WorkletReduceByKey.h:262
vtkm::exec::arg::ThreadIndicesReduceByKey
Container for thread indices in a reduce by key invocation.
Definition: ThreadIndicesReduceByKey.h:31
vtkm::worklet::WorkletReduceByKey::WholeCellSetIn
ControlSignature tag for whole input topology.
Definition: WorkletReduceByKey.h:214
vtkm::worklet::WorkletReduceByKey::ReducedValuesOut
A control signature tag for reduced output values.
Definition: WorkletReduceByKey.h:139
FetchTagKeysIn.h
vtkm::exec::arg::OutputIndex
The ExecutionSignature tag to use to get the output index.
Definition: OutputIndex.h:44
vtkm::cont::arg::TransportTagArrayOut
Transport tag for output arrays.
Definition: TransportTagArrayOut.h:32
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
vtkm::worklet::WorkletReduceByKey::ExecObject
ControlSignature tag for execution object inputs.
Definition: WorkletReduceByKey.h:220
TypeCheckTagArrayInOut.h
vtkm::worklet::WorkletReduceByKey::ValuesInOut
A control signature tag for input/output values associated with the keys.
Definition: WorkletReduceByKey.h:105
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::AtomicArrayInOut
ControlSignature tag for whole input/output arrays.
Definition: WorkletReduceByKey.h:208
vtkm::worklet::WorkletReduceByKey::WholeArrayIn
ControlSignature tag for whole input arrays.
Definition: WorkletReduceByKey.h:193
vtkm::worklet::WorkletReduceByKey::ReducedValuesIn
A control signature tag for reduced input values.
Definition: WorkletReduceByKey.h:160
vtkm::worklet::WorkletReduceByKey::WholeArrayInOut
ControlSignature tag for whole input/output arrays.
Definition: WorkletReduceByKey.h:203
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:182
vtkm::worklet::WorkletReduceByKey
Base class for worklets that group elements by keys.
Definition: WorkletReduceByKey.h:54
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::exec::arg::ThreadIndices
The ExecutionSignature tag to use to get the thread indices.
Definition: ThreadIndices.h:44
vtkm::worklet::WorkletReduceByKey::InputIndex
The ExecutionSignature tag to use to get the input index.
Definition: WorkletReduceByKey.h:267
vtkm::worklet::WorkletReduceByKey::WorkIndex
The ExecutionSignature tag to use to get the work index.
Definition: WorkletReduceByKey.h:257
vtkm::worklet::WorkletReduceByKey::KeysIn
A control signature tag for input keys.
Definition: WorkletReduceByKey.h:73
vtkm::Id
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
vtkm::cont::arg::TransportTagArrayIn
Transport tag for input arrays.
Definition: TransportTagArrayIn.h:32
ThreadIndicesReduceByKey.h
vtkm::worklet::WorkletReduceByKey::_1
Argument placeholders for an ExecutionSignature.
Definition: WorkletReduceByKey.h:235
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
vtkm::worklet::WorkletReduceByKey::WholeArrayOut
ControlSignature tag for whole output arrays.
Definition: WorkletReduceByKey.h:198
FetchTagArrayDirectInOut.h
vtkm::worklet::DispatcherReduceByKey
Dispatcher for worklets that inherit from WorkletReduceByKey.
Definition: DispatcherReduceByKey.h:27
FetchTagArrayDirectOut.h
vtkm::worklet::WorkletReduceByKey::ThreadIndices
The ExecutionSignature tag to use to get the thread indices.
Definition: WorkletReduceByKey.h:277
vtkm::worklet::WorkletReduceByKey::GetThreadIndices
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:296
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::exec::arg::VisitIndex
The ExecutionSignature tag to use to get the visit index.
Definition: VisitIndex.h:46
vtkm::exec::arg::InputIndex
The ExecutionSignature tag to use to get the input index.
Definition: InputIndex.h:43
VTKM_SUPPRESS_EXEC_WARNINGS
#define VTKM_SUPPRESS_EXEC_WARNINGS
Definition: ExportMacros.h:53
ReduceByKeyLookup.h
vtkm::worklet::WorkletReduceByKey::OutputIndex
The ExecutionSignature tag to use to get the output index.
Definition: WorkletReduceByKey.h:272
vtkm::cont::arg::TransportTagKeyedValuesInOut
Transport tag for input values in a reduce by key.
Definition: TransportTagKeyedValuesInOut.h:28
vtkm::exec::arg::WorkIndex
The ExecutionSignature tag to use to get the work index.
Definition: WorkIndex.h:39