VTK-m  2.0
IncidentElementCount.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_IncidentElementCount_h
11 #define vtk_m_exec_arg_IncidentElementCount_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 
41 {
42  static constexpr vtkm::IdComponent INDEX = 1;
44 };
45 
46 template <typename FetchTag, typename ExecObjectType>
47 struct Fetch<FetchTag, vtkm::exec::arg::AspectTagIncidentElementCount, ExecObjectType>
48 {
50 
52  template <typename ThreadIndicesType>
53  VTKM_EXEC ValueType Load(const ThreadIndicesType& indices, const ExecObjectType&) const
54  {
55  return indices.GetIndicesIncident().GetNumberOfComponents();
56  }
57 
58  template <typename ThreadIndicesType>
59  VTKM_EXEC void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const
60  {
61  // Store is a no-op.
62  }
63 };
64 }
65 }
66 } // namespace vtkm::exec::arg
67 
68 #endif //vtk_m_exec_arg_IncidentElementCount_h
vtkm::exec::arg::Fetch< FetchTag, vtkm::exec::arg::AspectTagIncidentElementCount, ExecObjectType >::ValueType
vtkm::IdComponent ValueType
Definition: IncidentElementCount.h:49
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
Represents a component ID (index of component in a vector).
Definition: Types.h:168
vtkm::exec::arg::AspectTagIncidentElementCount
Aspect tag to use for getting the incident element count.
Definition: IncidentElementCount.h:28
vtkm::exec::arg::Fetch
Class for loading and storing values in thread instance.
Definition: Fetch.h:49
ExecutionSignatureTagBase.h
vtkm::exec::arg::IncidentElementCount
The ExecutionSignature tag to get the number of incident elements.
Definition: IncidentElementCount.h:40
vtkm::exec::arg::IncidentElementCount::INDEX
static constexpr vtkm::IdComponent INDEX
Definition: IncidentElementCount.h:42
vtkm::exec::arg::Fetch< FetchTag, vtkm::exec::arg::AspectTagIncidentElementCount, ExecObjectType >::Load
VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC ValueType Load(const ThreadIndicesType &indices, const ExecObjectType &) const
Definition: IncidentElementCount.h:53
Fetch.h
vtkm::exec::arg::Fetch< FetchTag, vtkm::exec::arg::AspectTagIncidentElementCount, ExecObjectType >::Store
VTKM_EXEC void Store(const ThreadIndicesType &, const ExecObjectType &, const ValueType &) const
Definition: IncidentElementCount.h:59
VTKM_SUPPRESS_EXEC_WARNINGS
#define VTKM_SUPPRESS_EXEC_WARNINGS
Definition: ExportMacros.h:53