VTK-m  2.2
TransportTagAtomicArray.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_cont_arg_TransportTagAtomicArray_h
11 #define vtk_m_cont_arg_TransportTagAtomicArray_h
12 
13 #include <vtkm/Types.h>
14 
15 #include <vtkm/cont/ArrayHandle.h>
16 
18 
19 #include <vtkm/cont/AtomicArray.h>
20 
21 namespace vtkm
22 {
23 namespace cont
24 {
25 namespace arg
26 {
27 
37 {
38 };
39 
40 template <typename T, typename Device>
42  vtkm::cont::ArrayHandle<T, vtkm::cont::StorageTagBasic>,
43  Device>
44 {
47 
48  template <typename InputDomainType>
51  const InputDomainType&,
52  vtkm::Id,
53  vtkm::Id,
54  vtkm::cont::Token& token) const
55  {
56  // Note: we ignore the size of the domain because the randomly accessed
57  // array might not have the same size depending on how the user is using
58  // the array.
59  ExecType obj(array);
60  return obj.PrepareForExecution(Device(), token);
61  }
62 };
63 
64 }
65 }
66 } // namespace vtkm::cont::arg
67 
68 #endif //vtk_m_cont_arg_TransportTagAtomicArray_h
vtkm::cont::AtomicArray::PrepareForExecution
vtkm::exec::AtomicArrayExecutionObject< T > PrepareForExecution(vtkm::cont::DeviceAdapterId device, vtkm::cont::Token &token) const
Definition: AtomicArray.h:69
vtkm::cont::ArrayHandle
Manages an array-worth of data.
Definition: ArrayHandle.h:300
ArrayHandle.h
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
Types.h
vtkm::cont::Token
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:35
vtkm::cont::arg::TransportTagAtomicArray
Transport tag for in-place arrays with atomic operations.
Definition: TransportTagAtomicArray.h:36
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::Id
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
Transport.h
vtkm::cont::arg::Transport< vtkm::cont::arg::TransportTagAtomicArray, vtkm::cont::ArrayHandle< T, vtkm::cont::StorageTagBasic >, Device >::operator()
ExecObjectType operator()(vtkm::cont::ArrayHandle< T, vtkm::cont::StorageTagBasic > &array, const InputDomainType &, vtkm::Id, vtkm::Id, vtkm::cont::Token &token) const
Definition: TransportTagAtomicArray.h:50
vtkm::cont::arg::Transport
Class for transporting from the control to the execution environment.
Definition: Transport.h:38
vtkm::exec::AtomicArrayExecutionObject
An object passed to a worklet when accessing an atomic array.
Definition: AtomicArrayExecutionObject.h:88
vtkm::cont::AtomicArray
A type list containing types that can be used with an AtomicArray.
Definition: AtomicArray.h:49
AtomicArray.h