Viskores  1.0
TransportTagCellSetIn.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_cont_arg_TransportTagCellSetIn_h
19 #define viskores_cont_arg_TransportTagCellSetIn_h
20 
21 #include <viskores/Types.h>
22 
23 #include <viskores/cont/CellSet.h>
24 
26 
27 namespace viskores
28 {
29 namespace cont
30 {
31 namespace arg
32 {
33 
39 template <typename VisitTopology, typename IncidentTopology>
41 {
42 };
43 
44 template <typename VisitTopology,
45  typename IncidentTopology,
46  typename ContObjectType,
47  typename Device>
48 struct Transport<viskores::cont::arg::TransportTagCellSetIn<VisitTopology, IncidentTopology>,
49  ContObjectType,
50  Device>
51 {
52  VISKORES_IS_CELL_SET(ContObjectType);
53 
54  using ExecObjectType = decltype(std::declval<ContObjectType>().PrepareForInput(
55  Device(),
56  VisitTopology(),
57  IncidentTopology(),
58  std::declval<viskores::cont::Token&>()));
59 
60  template <typename InputDomainType>
61  VISKORES_CONT ExecObjectType operator()(const ContObjectType& object,
62  const InputDomainType&,
65  viskores::cont::Token& token) const
66  {
67  return object.PrepareForInput(Device(), VisitTopology(), IncidentTopology(), token);
68  }
69 };
70 }
71 }
72 } // namespace viskores::cont::arg
73 
74 #endif //viskores_cont_arg_TransportTagCellSetIn_h
Types.h
viskores::cont::arg::Transport
Class for transporting from the control to the execution environment.
Definition: Transport.h:46
viskores::cont::arg::TransportTagCellSetIn
Transport tag for input arrays.
Definition: TransportTagCellSetIn.h:40
viskores::Id
viskores::Int64 Id
Base type to use to index arrays.
Definition: Types.h:235
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::cont::arg::Transport< viskores::cont::arg::TransportTagCellSetIn< VisitTopology, IncidentTopology >, ContObjectType, Device >::operator()
ExecObjectType operator()(const ContObjectType &object, const InputDomainType &, viskores::Id, viskores::Id, viskores::cont::Token &token) const
Definition: TransportTagCellSetIn.h:61
CellSet.h
viskores::cont::arg::Transport< viskores::cont::arg::TransportTagCellSetIn< VisitTopology, IncidentTopology >, ContObjectType, Device >::ExecObjectType
decltype(std::declval< ContObjectType >().PrepareForInput(Device(), VisitTopology(), IncidentTopology(), std::declval< viskores::cont::Token & >())) ExecObjectType
Definition: TransportTagCellSetIn.h:58
Transport.h
VISKORES_IS_CELL_SET
#define VISKORES_IS_CELL_SET(T)
Definition: CellSet.h:97
viskores::cont::Token
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:43