Viskores  1.0
exec/arg/CellShape.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_CellShape_h
19 #define viskores_exec_arg_CellShape_h
20 
23 
24 namespace viskores
25 {
26 namespace exec
27 {
28 namespace arg
29 {
30 
37 {
38 };
39 
43 {
44  static constexpr viskores::IdComponent INDEX = 1;
46 };
47 
48 template <typename FetchTag, typename ExecObjectType>
49 struct Fetch<FetchTag, viskores::exec::arg::AspectTagCellShape, ExecObjectType>
50 {
52  template <typename ThreadIndicesType>
53  VISKORES_EXEC auto Load(const ThreadIndicesType& indices, const ExecObjectType&) const
54  -> decltype(indices.GetCellShape())
55  {
56  return indices.GetCellShape();
57  }
58 
59  template <typename ThreadIndicesType, typename ValueType>
60  VISKORES_EXEC void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const
61  {
62  // Store is a no-op.
63  }
64 };
65 }
66 }
67 } // namespace viskores::exec::arg
68 
69 #endif //viskores_exec_arg_CellShape_h
viskores::exec::arg::Fetch< FetchTag, viskores::exec::arg::AspectTagCellShape, ExecObjectType >::Load
auto Load(const ThreadIndicesType &indices, const ExecObjectType &) const -> decltype(indices.GetCellShape())
Definition: exec/arg/CellShape.h:53
VISKORES_SUPPRESS_EXEC_WARNINGS
#define VISKORES_SUPPRESS_EXEC_WARNINGS
Definition: ExportMacros.h:61
viskores::exec::arg::CellShape
The ExecutionSignature tag to use to get the cell shape.
Definition: exec/arg/CellShape.h:42
viskores::IdComponent
viskores::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:202
viskores::exec::arg::CellShape::INDEX
static constexpr viskores::IdComponent INDEX
Definition: exec/arg/CellShape.h:44
ExecutionSignatureTagBase.h
viskores::exec::arg::Fetch::ValueType
typename ExecObjectType::ValueType ValueType
The type of value to load and store.
Definition: Fetch.h:66
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
viskores::exec::arg::AspectTagCellShape
Aspect tag to use for getting the cell shape.
Definition: exec/arg/CellShape.h:36
Fetch.h
viskores::exec::arg::Fetch< FetchTag, viskores::exec::arg::AspectTagCellShape, ExecObjectType >::Store
void Store(const ThreadIndicesType &, const ExecObjectType &, const ValueType &) const
Definition: exec/arg/CellShape.h:60
viskores::exec::arg::ExecutionSignatureTagBase
The base class for all tags used in an ExecutionSignature.
Definition: ExecutionSignatureTagBase.h:45
VISKORES_EXEC
#define VISKORES_EXEC
Definition: ExportMacros.h:59