Viskores  1.0
FetchTagArrayDirectInOut.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_exec_arg_FetchTagArrayDirectInOut_h
19 #define viskores_exec_arg_FetchTagArrayDirectInOut_h
20 
23 
24 namespace viskores
25 {
26 namespace exec
27 {
28 namespace arg
29 {
30 
48 {
49 };
50 
51 template <typename ExecObjectType>
54  ExecObjectType>
55 {
56  using ValueType = typename ExecObjectType::ValueType;
57 
59  template <typename ThreadIndicesType>
60  VISKORES_EXEC ValueType Load(const ThreadIndicesType& indices,
61  const ExecObjectType& arrayPortal) const
62  {
63  return arrayPortal.Get(indices.GetOutputIndex());
64  }
65 
67  template <typename ThreadIndicesType>
68  VISKORES_EXEC void Store(const ThreadIndicesType& indices,
69  const ExecObjectType& arrayPortal,
70  const ValueType& value) const
71  {
72  arrayPortal.Set(indices.GetOutputIndex(), value);
73  }
74 };
75 }
76 }
77 } // namespace viskores::exec::arg
78 
79 #endif //viskores_exec_arg_FetchTagArrayDirectInOut_h
viskores::exec::arg::Fetch< viskores::exec::arg::FetchTagArrayDirectInOut, viskores::exec::arg::AspectTagDefault, ExecObjectType >::Load
ValueType Load(const ThreadIndicesType &indices, const ExecObjectType &arrayPortal) const
Definition: FetchTagArrayDirectInOut.h:60
VISKORES_SUPPRESS_EXEC_WARNINGS
#define VISKORES_SUPPRESS_EXEC_WARNINGS
Definition: ExportMacros.h:61
viskores::exec::arg::FetchTagArrayDirectInOut
Fetch tag for in-place modifying array values with direct indexing.
Definition: FetchTagArrayDirectInOut.h:47
viskores::exec::arg::Fetch
Class for loading and storing values in thread instance.
Definition: Fetch.h:57
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::exec::arg::Fetch< viskores::exec::arg::FetchTagArrayDirectInOut, viskores::exec::arg::AspectTagDefault, ExecObjectType >::Store
void Store(const ThreadIndicesType &indices, const ExecObjectType &arrayPortal, const ValueType &value) const
Definition: FetchTagArrayDirectInOut.h:68
Fetch.h
AspectTagDefault.h
viskores::exec::arg::AspectTagDefault
Aspect tag to use for default load/store of data.
Definition: AspectTagDefault.h:30
viskores::exec::arg::Fetch< viskores::exec::arg::FetchTagArrayDirectInOut, viskores::exec::arg::AspectTagDefault, ExecObjectType >::ValueType
typename ExecObjectType::ValueType ValueType
Definition: FetchTagArrayDirectInOut.h:56
VISKORES_EXEC
#define VISKORES_EXEC
Definition: ExportMacros.h:59