Viskores  1.0
IncidentElementCount.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 #ifndef viskores_exec_arg_IncidentElementCount_h
19 #define viskores_exec_arg_IncidentElementCount_h
20 
23 
24 namespace viskores
25 {
26 namespace exec
27 {
28 namespace arg
29 {
30 
37 {
38 };
39 
49 {
50  static constexpr viskores::IdComponent INDEX = 1;
52 };
53 
54 template <typename FetchTag, typename ExecObjectType>
55 struct Fetch<FetchTag, viskores::exec::arg::AspectTagIncidentElementCount, ExecObjectType>
56 {
58 
60  template <typename ThreadIndicesType>
61  VISKORES_EXEC ValueType Load(const ThreadIndicesType& indices, const ExecObjectType&) const
62  {
63  return indices.GetIndicesIncident().GetNumberOfComponents();
64  }
65 
66  template <typename ThreadIndicesType>
67  VISKORES_EXEC void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const
68  {
69  // Store is a no-op.
70  }
71 };
72 }
73 }
74 } // namespace viskores::exec::arg
75 
76 #endif //viskores_exec_arg_IncidentElementCount_h
viskores::exec::arg::Fetch< FetchTag, viskores::exec::arg::AspectTagIncidentElementCount, ExecObjectType >::Store
void Store(const ThreadIndicesType &, const ExecObjectType &, const ValueType &) const
Definition: IncidentElementCount.h:67
viskores::exec::arg::Fetch< FetchTag, viskores::exec::arg::AspectTagIncidentElementCount, ExecObjectType >::Load
ValueType Load(const ThreadIndicesType &indices, const ExecObjectType &) const
Definition: IncidentElementCount.h:61
VISKORES_SUPPRESS_EXEC_WARNINGS
#define VISKORES_SUPPRESS_EXEC_WARNINGS
Definition: ExportMacros.h:61
viskores::IdComponent
viskores::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:202
ExecutionSignatureTagBase.h
viskores::exec::arg::IncidentElementCount
The ExecutionSignature tag to get the number of incident elements.
Definition: IncidentElementCount.h:48
viskores::exec::arg::Fetch
Class for loading and storing values in thread instance.
Definition: Fetch.h:57
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
Fetch.h
viskores::exec::arg::ExecutionSignatureTagBase
The base class for all tags used in an ExecutionSignature.
Definition: ExecutionSignatureTagBase.h:45
viskores::exec::arg::AspectTagIncidentElementCount
Aspect tag to use for getting the incident element count.
Definition: IncidentElementCount.h:36
viskores::exec::arg::Fetch< FetchTag, viskores::exec::arg::AspectTagIncidentElementCount, ExecObjectType >::ValueType
viskores::IdComponent ValueType
Definition: IncidentElementCount.h:57
viskores::exec::arg::IncidentElementCount::INDEX
static constexpr viskores::IdComponent INDEX
Definition: IncidentElementCount.h:50
VISKORES_EXEC
#define VISKORES_EXEC
Definition: ExportMacros.h:59