Viskores  1.0
WorkletReduceByKey.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 #ifndef viskores_worklet_WorkletReduceByKey_h
19 #define viskores_worklet_WorkletReduceByKey_h
20 
22 
34 
36 
44 
45 namespace viskores
46 {
47 namespace worklet
48 {
49 
62 class WorkletReduceByKey : public viskores::worklet::internal::WorkletBase
63 {
64 public:
65  template <typename Worklet>
67 
71 
82  {
86  };
87 
97  {
101  };
102 
114  {
118  };
119 
132  {
136  };
137 
148  {
152  };
153 
169  {
173  };
174 
191  {
195  };
196 
197 #ifdef VISKORES_DOXYGEN_ONLY
198  // These redeclarations of superclass features are for documentation purposes only.
199 
201  struct WholeArrayIn : viskores::worklet::internal::WorkletBase::WholeArrayIn
202  {
203  };
204 
206  struct WholeArrayOut : viskores::worklet::internal::WorkletBase::WholeArrayOut
207  {
208  };
209 
211  struct WholeArrayInOut : viskores::worklet::internal::WorkletBase::WholeArrayInOut
212  {
213  };
214 
216  struct AtomicArrayInOut : viskores::worklet::internal::WorkletBase::AtomicArrayInOut
217  {
218  };
219 
221  template <typename VisitTopology = Cell, typename IncidentTopology = Point>
223  : viskores::worklet::internal::WorkletBase::WholeCellSetIn<VisitTopology, IncidentTopology>
224  {
225  };
226 
228  struct ExecObject : viskores::worklet::internal::WorkletBase::ExecObject
229  {
230  };
231 #endif
232 
234 
238 
239 #ifdef VISKORES_DOXYGEN_ONLY
240  // These redeclarations of superclass features are for documentation purposes only.
241 
243  struct _1 : viskores::worklet::internal::WorkletBase::_1
244  {
245  };
246 #endif
247 
258  {
259  };
260 
261 #ifdef VISKORES_DOXYGEN_ONLY
262  // These redeclarations of superclass features are for documentation purposes only.
263 
266  {
267  };
268 
271  {
272  };
273 
276  {
277  };
278 
281  {
282  };
283 
286  {
287  };
288 
290  struct Device : viskores::worklet::internal::WorkletBase::Device
291  {
292  };
293 #endif
294 
296 
300  template <typename OutToInArrayType,
301  typename VisitArrayType,
302  typename ThreadToOutArrayType,
303  typename InputDomainType>
305  viskores::Id threadIndex,
306  const OutToInArrayType& outToIn,
307  const VisitArrayType& visit,
308  const ThreadToOutArrayType& threadToOut,
309  const InputDomainType& inputDomain) const
310  {
311  const viskores::Id outIndex = threadToOut.Get(threadIndex);
313  threadIndex, outToIn.Get(outIndex), visit.Get(outIndex), outIndex, inputDomain);
314  }
315 };
316 }
317 } // namespace viskores::worklet
318 
319 #endif //viskores_worklet_WorkletReduceByKey_h
viskores::cont::arg::TransportTagArrayInOut
Transport tag for in-place arrays.
Definition: TransportTagArrayInOut.h:41
TransportTagKeyedValuesInOut.h
viskores::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:39
viskores::worklet::WorkletReduceByKey::GetThreadIndices
viskores::exec::arg::ThreadIndicesReduceByKey GetThreadIndices(viskores::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:304
viskores::worklet::WorkletReduceByKey::ValuesOut
A control signature tag for output values associated with the keys.
Definition: WorkletReduceByKey.h:131
viskores::worklet::WorkletReduceByKey::AtomicArrayInOut
ControlSignature tag for whole input/output arrays.
Definition: WorkletReduceByKey.h:216
TransportTagKeyedValuesIn.h
viskores::exec::arg::ThreadIndices
The ExecutionSignature tag to use to get the thread indices.
Definition: ThreadIndices.h:52
TransportTagKeyedValuesOut.h
viskores::cont::arg::TransportTagArrayIn
Transport tag for input arrays.
Definition: TransportTagArrayIn.h:40
TypeCheckTagArrayOut.h
TransportTagArrayIn.h
viskores::worklet::WorkletReduceByKey::WholeArrayIn
ControlSignature tag for whole input arrays.
Definition: WorkletReduceByKey.h:201
viskores::worklet::WorkletReduceByKey::WholeArrayInOut
ControlSignature tag for whole input/output arrays.
Definition: WorkletReduceByKey.h:211
viskores::cont::arg::TransportTagKeyedValuesOut
Transport tag for input values in a reduce by key.
Definition: TransportTagKeyedValuesOut.h:36
TransportTagArrayOut.h
viskores::worklet::WorkletReduceByKey::KeysIn
A control signature tag for input keys.
Definition: WorkletReduceByKey.h:81
viskores::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:39
VISKORES_SUPPRESS_EXEC_WARNINGS
#define VISKORES_SUPPRESS_EXEC_WARNINGS
Definition: ExportMacros.h:61
viskores::worklet::WorkletReduceByKey::ReducedValuesOut
A control signature tag for reduced output values.
Definition: WorkletReduceByKey.h:147
FetchTagKeysIn.h
viskores::worklet::WorkletReduceByKey::ValuesIn
A control signature tag for input values associated with the keys.
Definition: WorkletReduceByKey.h:96
viskores::worklet::DispatcherReduceByKey
Dispatcher for worklets that inherit from WorkletReduceByKey.
Definition: DispatcherReduceByKey.h:35
viskores::exec::arg::FetchTagKeysIn
Fetch tag for getting key values in a reduce by key.
Definition: FetchTagKeysIn.h:39
viskores::cont::arg::ControlSignatureTagBase
The base class for all tags used in a ControlSignature.
Definition: ControlSignatureTagBase.h:44
TypeCheckTagArrayInOut.h
viskores::exec::arg::ValueCount
The ExecutionSignature tag to get the number of values.
Definition: ValueCount.h:48
viskores::exec::arg::FetchTagArrayDirectInOut
Fetch tag for in-place modifying array values with direct indexing.
Definition: FetchTagArrayDirectInOut.h:47
TransportTagArrayInOut.h
viskores::exec::arg::VisitIndex
The ExecutionSignature tag to use to get the visit index.
Definition: VisitIndex.h:54
viskores::worklet::WorkletReduceByKey::ExecObject
ControlSignature tag for execution object inputs.
Definition: WorkletReduceByKey.h:228
viskores::Id
viskores::Int64 Id
Base type to use to index arrays.
Definition: Types.h:235
viskores::worklet::WorkletReduceByKey::ReducedValuesIn
A control signature tag for reduced input values.
Definition: WorkletReduceByKey.h:168
viskores::worklet::WorkletReduceByKey::WholeArrayOut
ControlSignature tag for whole output arrays.
Definition: WorkletReduceByKey.h:206
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::exec::arg::OutputIndex
The ExecutionSignature tag to use to get the output index.
Definition: OutputIndex.h:52
viskores::worklet::WorkletReduceByKey::Device
ExecutionSignature tag for getting the device adapter tag.
Definition: WorkletReduceByKey.h:290
viskores::worklet::WorkletReduceByKey::ValueCount
The ExecutionSignature tag to get the number of values.
Definition: WorkletReduceByKey.h:257
viskores::cont::arg::TransportTagKeyedValuesInOut
Transport tag for input values in a reduce by key.
Definition: TransportTagKeyedValuesInOut.h:36
ValueCount.h
TypeCheckTagArrayIn.h
WorkletBase.h
viskores::cont::arg::TransportTagArrayOut
Transport tag for output arrays.
Definition: TransportTagArrayOut.h:40
viskores::worklet::WorkletReduceByKey::ThreadIndices
The ExecutionSignature tag to use to get the thread indices.
Definition: WorkletReduceByKey.h:285
TransportTagKeysIn.h
viskores::cont::arg::TransportTagKeyedValuesIn
Transport tag for input values in a reduce by key.
Definition: TransportTagKeyedValuesIn.h:36
viskores::worklet::WorkletReduceByKey::WorkIndex
The ExecutionSignature tag to use to get the work index.
Definition: WorkletReduceByKey.h:265
viskores::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:39
ThreadIndicesReduceByKey.h
DispatcherReduceByKey.h
FetchTagArrayDirectIn.h
viskores::exec::arg::FetchTagArrayDirectIn
Fetch tag for getting array values with direct indexing.
Definition: FetchTagArrayDirectIn.h:37
viskores::worklet::WorkletReduceByKey::OutputIndex
The ExecutionSignature tag to use to get the output index.
Definition: WorkletReduceByKey.h:280
viskores::cont::arg::TransportTagKeysIn
Transport tag for keys in a reduce by key.
Definition: TransportTagKeysIn.h:36
viskores::cont::arg::TypeCheckTagKeys
Check for a Keys object.
Definition: TypeCheckTagKeys.h:32
viskores::worklet::WorkletReduceByKey::VisitIndex
The ExecutionSignature tag to use to get the visit index.
Definition: WorkletReduceByKey.h:270
viskores::worklet::WorkletReduceByKey::_1
Argument placeholders for an ExecutionSignature.
Definition: WorkletReduceByKey.h:243
FetchTagArrayDirectInOut.h
FetchTagArrayDirectOut.h
viskores::exec::arg::FetchTagArrayDirectOut
Fetch tag for setting array values with direct indexing.
Definition: FetchTagArrayDirectOut.h:39
viskores::worklet::WorkletReduceByKey::ReducedValuesInOut
A control signature tag for reduced output values.
Definition: WorkletReduceByKey.h:190
TypeCheckTagKeys.h
viskores::worklet::WorkletReduceByKey::ValuesInOut
A control signature tag for input/output values associated with the keys.
Definition: WorkletReduceByKey.h:113
viskores::worklet::WorkletReduceByKey
Base class for worklets that group elements by keys.
Definition: WorkletReduceByKey.h:62
VISKORES_EXEC
#define VISKORES_EXEC
Definition: ExportMacros.h:59
viskores::worklet::WorkletReduceByKey::InputIndex
The ExecutionSignature tag to use to get the input index.
Definition: WorkletReduceByKey.h:275
ReduceByKeyLookup.h
viskores::exec::arg::ThreadIndicesReduceByKey
Container for thread indices in a reduce by key invocation.
Definition: ThreadIndicesReduceByKey.h:39
viskores::worklet::WorkletReduceByKey::WholeCellSetIn
ControlSignature tag for whole input topology.
Definition: WorkletReduceByKey.h:222
viskores::exec::arg::InputIndex
The ExecutionSignature tag to use to get the input index.
Definition: InputIndex.h:51
viskores::exec::arg::WorkIndex
The ExecutionSignature tag to use to get the work index.
Definition: WorkIndex.h:47