Viskores  1.0
TransportTagAtomicArray.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_cont_arg_TransportTagAtomicArray_h
19 #define viskores_cont_arg_TransportTagAtomicArray_h
20 
21 #include <viskores/Types.h>
22 
24 
26 
28 
29 namespace viskores
30 {
31 namespace cont
32 {
33 namespace arg
34 {
35 
45 {
46 };
47 
48 template <typename T, typename Device>
50  viskores::cont::ArrayHandle<T, viskores::cont::StorageTagBasic>,
51  Device>
52 {
55 
56  template <typename InputDomainType>
59  const InputDomainType&,
62  viskores::cont::Token& token) const
63  {
64  // Note: we ignore the size of the domain because the randomly accessed
65  // array might not have the same size depending on how the user is using
66  // the array.
67  ExecType obj(array);
68  return obj.PrepareForExecution(Device(), token);
69  }
70 };
71 
72 }
73 }
74 } // namespace viskores::cont::arg
75 
76 #endif //viskores_cont_arg_TransportTagAtomicArray_h
ArrayHandle.h
Types.h
viskores::cont::arg::Transport
Class for transporting from the control to the execution environment.
Definition: Transport.h:46
viskores::cont::arg::Transport< viskores::cont::arg::TransportTagAtomicArray, viskores::cont::ArrayHandle< T, viskores::cont::StorageTagBasic >, Device >::operator()
ExecObjectType operator()(viskores::cont::ArrayHandle< T, viskores::cont::StorageTagBasic > &array, const InputDomainType &, viskores::Id, viskores::Id, viskores::cont::Token &token) const
Definition: TransportTagAtomicArray.h:58
viskores::cont::ArrayHandle
Manages an array-worth of data.
Definition: ArrayHandle.h:313
viskores::cont::AtomicArray
A type list containing types that can be used with an AtomicArray.
Definition: AtomicArray.h:61
viskores::Id
viskores::Int64 Id
Base type to use to index arrays.
Definition: Types.h:235
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::cont::arg::TransportTagAtomicArray
Transport tag for in-place arrays with atomic operations.
Definition: TransportTagAtomicArray.h:44
Transport.h
viskores::cont::AtomicArray::PrepareForExecution
viskores::exec::AtomicArrayExecutionObject< T > PrepareForExecution(viskores::cont::DeviceAdapterId device, viskores::cont::Token &token) const
Definition: AtomicArray.h:81
viskores::exec::AtomicArrayExecutionObject
An object passed to a worklet when accessing an atomic array.
Definition: AtomicArrayExecutionObject.h:96
viskores::cont::Token
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:43
AtomicArray.h