go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkOpenCLMacro.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
25#ifndef __itkOpenCLMacro_h
26#define __itkOpenCLMacro_h
27
28#include "itkMacro.h"
29#include "itkOpenCLExport.h"
30
31#include <string>
32#include <sstream>
33
37#define itkOpenCLDebugMacro( x ) \
38 itkOpenCLDebugWithObjectMacro( this, x )
39
43#define itkOpenCLWarningMacro( x ) \
44 itkOpenCLWarningWithObjectMacro( this, x )
45
49#define itkOpenCLErrorMacro( x ) \
50 itkOpenCLErrorWithObjectMacro( this, x )
51
55#define itkOpenCLDebugMacroGeneric( x ) \
56 { \
57 std::stringstream itkmsg; \
58 itkmsg << __FILE__ \
59 << "(" << __LINE__ << "): itkOpenCL generic debug." \
60 << "\nDebug: in function: " << __FUNCTION__ \
61 << "\nDetails: " x << "\n\n"; \
62 ::itk::OutputWindowDisplayDebugText( itkmsg.str().c_str() ); \
63 }
64
68#define itkOpenCLWarningMacroGeneric( x ) \
69 { \
70 std::stringstream itkmsg; \
71 itkmsg << __FILE__ \
72 << "(" << __LINE__ << "): itkOpenCL generic warning." \
73 << "\nWarning: in function: " << __FUNCTION__ \
74 << "\nDetails: " x << "\n\n"; \
75 ::itk::OutputWindowDisplayWarningText( itkmsg.str().c_str() ); \
76 }
77
81#define itkOpenCLErrorMacroGeneric( x ) \
82 { \
83 std::stringstream itkmsg; \
84 itkmsg << __FILE__ \
85 << "(" << __LINE__ << "): itkOpenCL generic error." \
86 << "\nError: in function: " << __FUNCTION__ \
87 << "\nDetails: " x << "\n\n"; \
88 ::itk::OutputWindowDisplayErrorText( itkmsg.str().c_str() ); \
89 }
90
97#define itkOpenCLDebugWithObjectMacro( self, x ) \
98 { \
99 std::stringstream itkmsg; \
100 itkmsg << __FILE__ \
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() ); \
106 }
107
114#define itkOpenCLWarningWithObjectMacro( self, x ) \
115 { \
116 std::stringstream itkmsg; \
117 itkmsg << __FILE__ \
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() ); \
123 }
124
131#define itkOpenCLErrorWithObjectMacro( self, x ) \
132 { \
133 std::stringstream itkmsg; \
134 itkmsg << __FILE__ \
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() ); \
140 }
141
142namespace itk
143{
147class ITKOpenCL_EXPORT OpenCLCompileError : public ExceptionObject
148{
149public:
150
152 OpenCLCompileError() : ExceptionObject() {}
153
155 OpenCLCompileError( const char * file, unsigned int lineNumber ) : ExceptionObject( file, lineNumber ) {}
156
158 OpenCLCompileError( const std::string & file, unsigned int lineNumber ) : ExceptionObject( file, lineNumber ) {}
159
162
163 const char * GetNameOfClass() const override
164 { return "OpenCLCompileError"; }
165};
166
167}
168#endif /* __itkOpenCLMacro_h */
OpenCLCompileError(const char *file, unsigned int lineNumber)
OpenCLCompileError(const std::string &file, unsigned int lineNumber)
const char * GetNameOfClass() const override
#define ITKOpenCL_EXPORT


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo