VTK-m  2.0
ValueCount.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_ValueCount_h
11 #define vtk_m_exec_arg_ValueCount_h
12 
14 #include <vtkm/exec/arg/Fetch.h>
16 
17 namespace vtkm
18 {
19 namespace exec
20 {
21 namespace arg
22 {
23 
30 {
31 };
32 
41 {
42  static constexpr vtkm::IdComponent INDEX = 1;
44 };
45 
46 template <typename FetchTag, typename ExecObjectType>
47 struct Fetch<FetchTag, vtkm::exec::arg::AspectTagValueCount, ExecObjectType>
48 {
49 
51 
53  template <typename ThreadIndicesType>
54  VTKM_EXEC ValueType Load(const ThreadIndicesType& indices, const ExecObjectType&) const
55  {
56  return indices.GetNumberOfValues();
57  }
58 
59  template <typename ThreadIndicesType>
60  VTKM_EXEC void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const
61  {
62  // Store is a no-op.
63  }
64 };
65 }
66 }
67 } // namespace vtkm::exec::arg
68 
69 #endif //vtk_m_exec_arg_ValueCount_h
vtkm::exec::arg::Fetch< FetchTag, vtkm::exec::arg::AspectTagValueCount, ExecObjectType >::Load
VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC ValueType Load(const ThreadIndicesType &indices, const ExecObjectType &) const
Definition: ValueCount.h:54
vtkm::exec::arg::ValueCount
The ExecutionSignature tag to get the number of values.
Definition: ValueCount.h:40
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::AspectTagValueCount
Aspect tag to use for getting the value count.
Definition: ValueCount.h:29
vtkm::exec::arg::Fetch
Class for loading and storing values in thread instance.
Definition: Fetch.h:49
ExecutionSignatureTagBase.h
vtkm::exec::arg::Fetch< FetchTag, vtkm::exec::arg::AspectTagValueCount, ExecObjectType >::ValueType
vtkm::IdComponent ValueType
Definition: ValueCount.h:50
Fetch.h
ThreadIndicesReduceByKey.h
vtkm::exec::arg::ValueCount::INDEX
static constexpr vtkm::IdComponent INDEX
Definition: ValueCount.h:42
vtkm::exec::arg::Fetch< FetchTag, vtkm::exec::arg::AspectTagValueCount, ExecObjectType >::Store
VTKM_EXEC void Store(const ThreadIndicesType &, const ExecObjectType &, const ValueType &) const
Definition: ValueCount.h:60
VTKM_SUPPRESS_EXEC_WARNINGS
#define VTKM_SUPPRESS_EXEC_WARNINGS
Definition: ExportMacros.h:53