VTK-m  2.0
FunctorBase.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_exec_FunctorBase_h
11 #define vtk_m_exec_FunctorBase_h
12 
13 #include <vtkm/Types.h>
14 
16 
17 #include <vtkm/cont/vtkm_cont_export.h>
18 
19 namespace vtkm
20 {
21 namespace exec
22 {
23 
31 {
32 public:
35  : ErrorMessage()
36  {
37  }
38 
39  VTKM_EXEC
40  void RaiseError(const char* message) const { this->ErrorMessage.RaiseError(message); }
41 
46  VTKM_CONT
47  void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer& buffer)
48  {
49  this->ErrorMessage = buffer;
50  }
51 
52 private:
53  vtkm::exec::internal::ErrorMessageBuffer ErrorMessage;
54 };
55 }
56 } // namespace vtkm::exec
57 
58 #endif //vtk_m_exec_FunctorBase_h
VTKM_EXEC
#define VTKM_EXEC
Definition: ExportMacros.h:51
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
Types.h
VTKM_EXEC_CONT
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
vtkm::exec::FunctorBase::ErrorMessage
vtkm::exec::internal::ErrorMessageBuffer ErrorMessage
Definition: FunctorBase.h:53
ErrorMessageBuffer.h
vtkm::exec::FunctorBase::SetErrorMessageBuffer
VTKM_CONT void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer &buffer)
Set the error message buffer so that running algorithms can report errors.
Definition: FunctorBase.h:47
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::exec::FunctorBase
Base class for all user worklets invoked in the execution environment from a call to vtkm::cont::Devi...
Definition: FunctorBase.h:30
vtkm::exec::FunctorBase::FunctorBase
VTKM_EXEC_CONT FunctorBase()
Definition: FunctorBase.h:34
VTKM_ALWAYS_EXPORT
#define VTKM_ALWAYS_EXPORT
Definition: ExportMacros.h:92
vtkm::exec::FunctorBase::RaiseError
VTKM_EXEC void RaiseError(const char *message) const
Definition: FunctorBase.h:40