25 #ifndef __itkOpenCLMacro_h
26 #define __itkOpenCLMacro_h
37 #define itkOpenCLDebugMacro( x ) \
38 itkOpenCLDebugWithObjectMacro( this, x )
43 #define itkOpenCLWarningMacro( x ) \
44 itkOpenCLWarningWithObjectMacro( this, x )
49 #define itkOpenCLErrorMacro( x ) \
50 itkOpenCLErrorWithObjectMacro( this, x )
55 #define itkOpenCLDebugMacroGeneric( x ) \
57 std::stringstream itkmsg; \
59 << "(" << __LINE__ << "): itkOpenCL generic debug." \
60 << "\nDebug: in function: " << __FUNCTION__ \
61 << "\nDetails: " x << "\n\n"; \
62 ::itk::OutputWindowDisplayDebugText( itkmsg.str().c_str() ); \
68 #define itkOpenCLWarningMacroGeneric( x ) \
70 std::stringstream itkmsg; \
72 << "(" << __LINE__ << "): itkOpenCL generic warning." \
73 << "\nWarning: in function: " << __FUNCTION__ \
74 << "\nDetails: " x << "\n\n"; \
75 ::itk::OutputWindowDisplayWarningText( itkmsg.str().c_str() ); \
81 #define itkOpenCLErrorMacroGeneric( x ) \
83 std::stringstream itkmsg; \
85 << "(" << __LINE__ << "): itkOpenCL generic error." \
86 << "\nError: in function: " << __FUNCTION__ \
87 << "\nDetails: " x << "\n\n"; \
88 ::itk::OutputWindowDisplayErrorText( itkmsg.str().c_str() ); \
97 #define itkOpenCLDebugWithObjectMacro( self, x ) \
99 std::stringstream itkmsg; \
101 << "(" << __LINE__ << "): itkOpenCL debug." \
102 << "\nDebug: in function: " << __FUNCTION__ \
103 << "; Name: " << self->GetNameOfClass() << " (" << self << ")" \
104 << "\nDetails: " x << "\n\n"; \
105 ::itk::OutputWindowDisplayDebugText( itkmsg.str().c_str() ); \
114 #define itkOpenCLWarningWithObjectMacro( self, x ) \
116 std::stringstream itkmsg; \
118 << "(" << __LINE__ << "): itkOpenCL warning." \
119 << "\nWarning: in function: " << __FUNCTION__ \
120 << "; Name: " << self->GetNameOfClass() << " (" << self << ")" \
121 << "\nDetails: " x << "\n\n"; \
122 ::itk::OutputWindowDisplayWarningText( itkmsg.str().c_str() ); \
131 #define itkOpenCLErrorWithObjectMacro( self, x ) \
133 std::stringstream itkmsg; \
135 << "(" << __LINE__ << "): itkOpenCL error." \
136 << "\nError: in function: " << __FUNCTION__ \
137 << "; Name: " << self->GetNameOfClass() << " (" << self << ")" \
138 << "\nDetails: " x << "\n\n"; \
139 ::itk::OutputWindowDisplayErrorText( itkmsg.str().c_str() ); \
155 OpenCLCompileError(
const char * file,
unsigned int lineNumber ) : ExceptionObject( file, lineNumber ) {}
158 OpenCLCompileError(
const std::string & file,
unsigned int lineNumber ) : ExceptionObject( file, lineNumber ) {}
164 {
return "OpenCLCompileError"; }
const char * GetNameOfClass() const override
~OpenCLCompileError() override
OpenCLCompileError(const char *file, unsigned int lineNumber)
OpenCLCompileError(const std::string &file, unsigned int lineNumber)