VTK-m  2.0
FetchTagExecObject.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_FetchTagExecObject_h
11 #define vtk_m_exec_arg_FetchTagExecObject_h
12 
14 #include <vtkm/exec/arg/Fetch.h>
15 
16 #include <type_traits>
17 
18 namespace vtkm
19 {
20 namespace exec
21 {
22 namespace arg
23 {
24 
33 {
34 };
35 
36 template <typename ExecObjectType>
38 {
39  using ValueType = ExecObjectType;
40 
42  template <typename ThreadIndicesType>
43  VTKM_EXEC ValueType Load(const ThreadIndicesType& vtkmNotUsed(indices),
44  const ExecObjectType& execObject) const
45  {
46  return execObject;
47  }
48 
49  template <typename ThreadIndicesType>
50  VTKM_EXEC void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const
51  {
52  // Store is a no-op for this fetch.
53  }
54 };
55 }
56 }
57 } // namespace vtkm::exec::arg
58 
59 #endif //vtk_m_exec_arg_FetchTagExecObject_h
vtkm::exec::arg::FetchTagExecObject
Fetch tag for execution objects.
Definition: FetchTagExecObject.h:32
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::FetchTagExecObject, vtkm::exec::arg::AspectTagDefault, ExecObjectType >::Store
VTKM_EXEC void Store(const ThreadIndicesType &, const ExecObjectType &, const ValueType &) const
Definition: FetchTagExecObject.h:50
vtkm::exec::arg::Fetch< vtkm::exec::arg::FetchTagExecObject, vtkm::exec::arg::AspectTagDefault, ExecObjectType >::ValueType
ExecObjectType ValueType
Definition: FetchTagExecObject.h:39
Fetch.h
AspectTagDefault.h
vtkmNotUsed
#define vtkmNotUsed(parameter_name)
Simple macro to identify a parameter as unused.
Definition: ExportMacros.h:128
vtkm::exec::arg::Fetch< vtkm::exec::arg::FetchTagExecObject, vtkm::exec::arg::AspectTagDefault, ExecObjectType >::Load
VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC ValueType Load(const ThreadIndicesType &vtkmNotUsed(indices), const ExecObjectType &execObject) const
Definition: FetchTagExecObject.h:43
vtkm::exec::arg::AspectTagDefault
Aspect tag to use for default load/store of data.
Definition: AspectTagDefault.h:22
VTKM_SUPPRESS_EXEC_WARNINGS
#define VTKM_SUPPRESS_EXEC_WARNINGS
Definition: ExportMacros.h:53