VTK-m  2.0
TransportTagExecObject.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_cont_arg_TransportTagExecObject_h
11 #define vtk_m_cont_arg_TransportTagExecObject_h
12 
13 #include <vtkm/Types.h>
14 
16 
18 
19 
20 namespace vtkm
21 {
22 namespace cont
23 {
24 namespace arg
25 {
26 
33 {
34 };
35 
36 template <typename ContObjectType, typename Device>
37 struct Transport<vtkm::cont::arg::TransportTagExecObject, ContObjectType, Device>
38 {
39  // If you get a compile error here, it means you tried to use an object that is not an execution
40  // object as an argument that is expected to be one. All execution objects are expected to
41  // inherit from vtkm::cont::ExecutionObjectBase and have a PrepareForExecution method.
42  VTKM_IS_EXECUTION_OBJECT(ContObjectType);
43 
44  using ExecObjectType = vtkm::cont::internal::ExecutionObjectType<ContObjectType, Device>;
45  template <typename InputDomainType>
46  VTKM_CONT ExecObjectType operator()(ContObjectType& object,
47  const InputDomainType&,
48  vtkm::Id,
49  vtkm::Id,
50  vtkm::cont::Token& token) const
51  {
52  return vtkm::cont::internal::CallPrepareForExecution(object, Device{}, token);
53  }
54 };
55 }
56 }
57 } // namespace vtkm::cont::arg
58 
59 #endif //vtk_m_cont_arg_TransportTagExecObject_h
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
Types.h
vtkm::Id
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
vtkm::cont::Token
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:35
VTKM_IS_EXECUTION_OBJECT
#define VTKM_IS_EXECUTION_OBJECT(execObject)
Checks that the argument is a proper execution object.
Definition: ExecutionObjectBase.h:66
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
Transport.h
vtkm::cont::arg::TransportTagExecObject
Transport tag for execution objects.
Definition: TransportTagExecObject.h:32
vtkm::cont::arg::Transport< vtkm::cont::arg::TransportTagExecObject, ContObjectType, Device >::operator()
VTKM_CONT ExecObjectType operator()(ContObjectType &object, const InputDomainType &, vtkm::Id, vtkm::Id, vtkm::cont::Token &token) const
Definition: TransportTagExecObject.h:46
vtkm::cont::arg::Transport
Class for transporting from the control to the execution environment.
Definition: Transport.h:38
ExecutionObjectBase.h
vtkm::cont::arg::Transport< vtkm::cont::arg::TransportTagExecObject, ContObjectType, Device >::ExecObjectType
vtkm::cont::internal::ExecutionObjectType< ContObjectType, Device > ExecObjectType
Definition: TransportTagExecObject.h:44