25#ifndef itkOpenCLMacro_h
26#define itkOpenCLMacro_h
37#define itkOpenCLDebugMacro(x) itkOpenCLDebugWithObjectMacro(this, x)
42#define itkOpenCLWarningMacro(x) itkOpenCLWarningWithObjectMacro(this, x)
47#define itkOpenCLErrorMacro(x) itkOpenCLErrorWithObjectMacro(this, x)
52#define itkOpenCLDebugMacroGeneric(x) \
54 std::stringstream itkmsg; \
55 itkmsg << __FILE__ << "(" << __LINE__ << "): itkOpenCL generic debug." \
56 << "\nDebug: in function: " << __FUNCTION__ << "\nDetails: " x << "\n\n"; \
57 ::itk::OutputWindowDisplayDebugText(itkmsg.str().c_str()); \
63#define itkOpenCLWarningMacroGeneric(x) \
65 std::stringstream itkmsg; \
66 itkmsg << __FILE__ << "(" << __LINE__ << "): itkOpenCL generic warning." \
67 << "\nWarning: in function: " << __FUNCTION__ << "\nDetails: " x << "\n\n"; \
68 ::itk::OutputWindowDisplayWarningText(itkmsg.str().c_str()); \
74#define itkOpenCLErrorMacroGeneric(x) \
76 std::stringstream itkmsg; \
77 itkmsg << __FILE__ << "(" << __LINE__ << "): itkOpenCL generic error." \
78 << "\nError: in function: " << __FUNCTION__ << "\nDetails: " x << "\n\n"; \
79 ::itk::OutputWindowDisplayErrorText(itkmsg.str().c_str()); \
88#define itkOpenCLDebugWithObjectMacro(self, x) \
90 std::stringstream itkmsg; \
91 itkmsg << __FILE__ << "(" << __LINE__ << "): itkOpenCL debug." \
92 << "\nDebug: in function: " << __FUNCTION__ << "; Name: " << self->GetNameOfClass() << " (" << self << ")" \
93 << "\nDetails: " x << "\n\n"; \
94 ::itk::OutputWindowDisplayDebugText(itkmsg.str().c_str()); \
103#define itkOpenCLWarningWithObjectMacro(self, x) \
105 std::stringstream itkmsg; \
106 itkmsg << __FILE__ << "(" << __LINE__ << "): itkOpenCL warning." \
107 << "\nWarning: in function: " << __FUNCTION__ << "; Name: " << self->GetNameOfClass() << " (" << self \
109 << "\nDetails: " x << "\n\n"; \
110 ::itk::OutputWindowDisplayWarningText(itkmsg.str().c_str()); \
119#define itkOpenCLErrorWithObjectMacro(self, x) \
121 std::stringstream itkmsg; \
122 itkmsg << __FILE__ << "(" << __LINE__ << "): itkOpenCL error." \
123 << "\nError: in function: " << __FUNCTION__ << "; Name: " << self->GetNameOfClass() << " (" << self << ")" \
124 << "\nDetails: " x << "\n\n"; \
125 ::itk::OutputWindowDisplayErrorText(itkmsg.str().c_str()); \
143 : ExceptionObject(file, lineNumber)
148 : ExceptionObject(file, lineNumber)
157 return "OpenCLCompileError";
~OpenCLCompileError() override=default
OpenCLCompileError(const char *file, unsigned int lineNumber)
OpenCLCompileError(const std::string &file, unsigned int lineNumber)
const char * GetNameOfClass() const override