VTK-m  2.2
exec/arg/CellShape.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_CellShape_h
11 #define vtk_m_exec_arg_CellShape_h
12 
14 #include <vtkm/exec/arg/Fetch.h>
15 
16 namespace vtkm
17 {
18 namespace exec
19 {
20 namespace arg
21 {
22 
29 {
30 };
31 
35 {
36  static constexpr vtkm::IdComponent INDEX = 1;
38 };
39 
40 template <typename FetchTag, typename ExecObjectType>
41 struct Fetch<FetchTag, vtkm::exec::arg::AspectTagCellShape, ExecObjectType>
42 {
44  template <typename ThreadIndicesType>
45  VTKM_EXEC auto Load(const ThreadIndicesType& indices, const ExecObjectType&) const
46  -> decltype(indices.GetCellShape())
47  {
48  return indices.GetCellShape();
49  }
50 
51  template <typename ThreadIndicesType, typename ValueType>
52  VTKM_EXEC void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const
53  {
54  // Store is a no-op.
55  }
56 };
57 }
58 }
59 } // namespace vtkm::exec::arg
60 
61 #endif //vtk_m_exec_arg_CellShape_h
vtkm::exec::arg::Fetch< FetchTag, vtkm::exec::arg::AspectTagCellShape, ExecObjectType >::Load
auto Load(const ThreadIndicesType &indices, const ExecObjectType &) const -> decltype(indices.GetCellShape())
Definition: exec/arg/CellShape.h:45
vtkm::exec::arg::Fetch< FetchTag, vtkm::exec::arg::AspectTagCellShape, ExecObjectType >::Store
void Store(const ThreadIndicesType &, const ExecObjectType &, const ValueType &) const
Definition: exec/arg/CellShape.h:52
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::ExecutionSignatureTagBase
The base class for all tags used in an ExecutionSignature.
Definition: ExecutionSignatureTagBase.h:37
vtkm::IdComponent
vtkm::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:194
vtkm::exec::arg::Fetch::ValueType
typename ExecObjectType::ValueType ValueType
The type of value to load and store.
Definition: Fetch.h:58
vtkm::exec::arg::Fetch
Class for loading and storing values in thread instance.
Definition: Fetch.h:49
ExecutionSignatureTagBase.h
vtkm::exec::arg::AspectTagCellShape
Aspect tag to use for getting the cell shape.
Definition: exec/arg/CellShape.h:28
Fetch.h
vtkm::exec::arg::CellShape
The ExecutionSignature tag to use to get the cell shape.
Definition: exec/arg/CellShape.h:34
VTKM_SUPPRESS_EXEC_WARNINGS
#define VTKM_SUPPRESS_EXEC_WARNINGS
Definition: ExportMacros.h:53
vtkm::exec::arg::CellShape::INDEX
static constexpr vtkm::IdComponent INDEX
Definition: exec/arg/CellShape.h:36