Viskores  1.0
TransportTagExecObject.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_TransportTagExecObject_h
19 #define viskores_cont_arg_TransportTagExecObject_h
20 
21 #include <viskores/Types.h>
22 
24 
26 
27 
28 namespace viskores
29 {
30 namespace cont
31 {
32 namespace arg
33 {
34 
41 {
42 };
43 
44 template <typename ContObjectType, typename Device>
45 struct Transport<viskores::cont::arg::TransportTagExecObject, ContObjectType, Device>
46 {
47  // If you get a compile error here, it means you tried to use an object that is not an execution
48  // object as an argument that is expected to be one. All execution objects are expected to
49  // inherit from viskores::cont::ExecutionObjectBase and have a PrepareForExecution method.
50  VISKORES_IS_EXECUTION_OBJECT(ContObjectType);
51 
52  using ExecObjectType = viskores::cont::internal::ExecutionObjectType<ContObjectType, Device>;
53  template <typename InputDomainType>
54  VISKORES_CONT ExecObjectType operator()(ContObjectType& object,
55  const InputDomainType&,
58  viskores::cont::Token& token) const
59  {
60  return viskores::cont::internal::CallPrepareForExecution(object, Device{}, token);
61  }
62 };
63 }
64 }
65 } // namespace viskores::cont::arg
66 
67 #endif //viskores_cont_arg_TransportTagExecObject_h
viskores::cont::arg::Transport< viskores::cont::arg::TransportTagExecObject, ContObjectType, Device >::ExecObjectType
viskores::cont::internal::ExecutionObjectType< ContObjectType, Device > ExecObjectType
Definition: TransportTagExecObject.h:52
Types.h
viskores::cont::arg::Transport
Class for transporting from the control to the execution environment.
Definition: Transport.h:46
VISKORES_IS_EXECUTION_OBJECT
#define VISKORES_IS_EXECUTION_OBJECT(execObject)
Checks that the argument is a proper execution object.
Definition: ExecutionObjectBase.h:75
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::TransportTagExecObject
Transport tag for execution objects.
Definition: TransportTagExecObject.h:40
Transport.h
viskores::cont::arg::Transport< viskores::cont::arg::TransportTagExecObject, ContObjectType, Device >::operator()
ExecObjectType operator()(ContObjectType &object, const InputDomainType &, viskores::Id, viskores::Id, viskores::cont::Token &token) const
Definition: TransportTagExecObject.h:54
ExecutionObjectBase.h
viskores::cont::Token
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:43