VTK-m  2.0
FetchTagArrayDirectInOut.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_exec_arg_FetchTagArrayDirectInOut_h
11 #define vtk_m_exec_arg_FetchTagArrayDirectInOut_h
12 
14 #include <vtkm/exec/arg/Fetch.h>
15 
16 namespace vtkm
17 {
18 namespace exec
19 {
20 namespace arg
21 {
22 
40 {
41 };
42 
43 template <typename ExecObjectType>
46  ExecObjectType>
47 {
48  using ValueType = typename ExecObjectType::ValueType;
49 
51  template <typename ThreadIndicesType>
52  VTKM_EXEC ValueType Load(const ThreadIndicesType& indices,
53  const ExecObjectType& arrayPortal) const
54  {
55  return arrayPortal.Get(indices.GetOutputIndex());
56  }
57 
59  template <typename ThreadIndicesType>
60  VTKM_EXEC void Store(const ThreadIndicesType& indices,
61  const ExecObjectType& arrayPortal,
62  const ValueType& value) const
63  {
64  arrayPortal.Set(indices.GetOutputIndex(), value);
65  }
66 };
67 }
68 }
69 } // namespace vtkm::exec::arg
70 
71 #endif //vtk_m_exec_arg_FetchTagArrayDirectInOut_h
VTKM_EXEC
#define VTKM_EXEC
Definition: ExportMacros.h:51
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::exec::arg::Fetch
Class for loading and storing values in thread instance.
Definition: Fetch.h:49
vtkm::exec::arg::Fetch< vtkm::exec::arg::FetchTagArrayDirectInOut, vtkm::exec::arg::AspectTagDefault, ExecObjectType >::Store
VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC void Store(const ThreadIndicesType &indices, const ExecObjectType &arrayPortal, const ValueType &value) const
Definition: FetchTagArrayDirectInOut.h:60
vtkm::exec::arg::Fetch< vtkm::exec::arg::FetchTagArrayDirectInOut, vtkm::exec::arg::AspectTagDefault, ExecObjectType >::Load
VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC ValueType Load(const ThreadIndicesType &indices, const ExecObjectType &arrayPortal) const
Definition: FetchTagArrayDirectInOut.h:52
Fetch.h
vtkm::exec::arg::Fetch< vtkm::exec::arg::FetchTagArrayDirectInOut, vtkm::exec::arg::AspectTagDefault, ExecObjectType >::ValueType
typename ExecObjectType::ValueType ValueType
Definition: FetchTagArrayDirectInOut.h:48
AspectTagDefault.h
vtkm::exec::arg::AspectTagDefault
Aspect tag to use for default load/store of data.
Definition: AspectTagDefault.h:22
vtkm::exec::arg::FetchTagArrayDirectInOut
Fetch tag for in-place modifying array values with direct indexing.
Definition: FetchTagArrayDirectInOut.h:39
VTKM_SUPPRESS_EXEC_WARNINGS
#define VTKM_SUPPRESS_EXEC_WARNINGS
Definition: ExportMacros.h:53