Loading...
Searching...
No Matches
itkOpenCLMacro.h
Go to the documentation of this file.
/*=========================================================================
*
* Copyright UMC Utrecht and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef itkOpenCLMacro_h
#define itkOpenCLMacro_h
#include "itkMacro.h"
#include "itkOpenCLExport.h"
#include <string>
#include <sstream>
#define itkOpenCLDebugMacro(x) itkOpenCLDebugWithObjectMacro(this, x)
#define itkOpenCLWarningMacro(x) itkOpenCLWarningWithObjectMacro(this, x)
#define itkOpenCLErrorMacro(x) itkOpenCLErrorWithObjectMacro(this, x)
#define itkOpenCLDebugMacroGeneric(x) \
{ \
std::stringstream itkmsg; \
itkmsg << __FILE__ << "(" << __LINE__ << "): itkOpenCL generic debug." \
<< "\nDebug: in function: " << __FUNCTION__ << "\nDetails: " x << "\n\n"; \
::itk::OutputWindowDisplayDebugText(itkmsg.str().c_str()); \
}
#define itkOpenCLWarningMacroGeneric(x) \
{ \
std::stringstream itkmsg; \
itkmsg << __FILE__ << "(" << __LINE__ << "): itkOpenCL generic warning." \
<< "\nWarning: in function: " << __FUNCTION__ << "\nDetails: " x << "\n\n"; \
::itk::OutputWindowDisplayWarningText(itkmsg.str().c_str()); \
}
#define itkOpenCLErrorMacroGeneric(x) \
{ \
std::stringstream itkmsg; \
itkmsg << __FILE__ << "(" << __LINE__ << "): itkOpenCL generic error." \
<< "\nError: in function: " << __FUNCTION__ << "\nDetails: " x << "\n\n"; \
::itk::OutputWindowDisplayErrorText(itkmsg.str().c_str()); \
}
#define itkOpenCLDebugWithObjectMacro(self, x) \
{ \
std::stringstream itkmsg; \
itkmsg << __FILE__ << "(" << __LINE__ << "): itkOpenCL debug." \
<< "\nDebug: in function: " << __FUNCTION__ << "; Name: " << self->GetNameOfClass() << " (" << self << ")" \
<< "\nDetails: " x << "\n\n"; \
::itk::OutputWindowDisplayDebugText(itkmsg.str().c_str()); \
}
#define itkOpenCLWarningWithObjectMacro(self, x) \
{ \
std::stringstream itkmsg; \
itkmsg << __FILE__ << "(" << __LINE__ << "): itkOpenCL warning." \
<< "\nWarning: in function: " << __FUNCTION__ << "; Name: " << self->GetNameOfClass() << " (" << self \
<< ")" \
<< "\nDetails: " x << "\n\n"; \
::itk::OutputWindowDisplayWarningText(itkmsg.str().c_str()); \
}
#define itkOpenCLErrorWithObjectMacro(self, x) \
{ \
std::stringstream itkmsg; \
itkmsg << __FILE__ << "(" << __LINE__ << "): itkOpenCL error." \
<< "\nError: in function: " << __FUNCTION__ << "; Name: " << self->GetNameOfClass() << " (" << self << ")" \
<< "\nDetails: " x << "\n\n"; \
::itk::OutputWindowDisplayErrorText(itkmsg.str().c_str()); \
}
namespace itk
{
class ITKOpenCL_EXPORT OpenCLCompileError : public ExceptionObject
{
public:
OpenCLCompileError()
: ExceptionObject()
{}
OpenCLCompileError(const char * file, unsigned int lineNumber)
: ExceptionObject(file, lineNumber)
{}
OpenCLCompileError(const std::string & file, unsigned int lineNumber)
: ExceptionObject(file, lineNumber)
{}
~OpenCLCompileError() override = default;
const char *
GetNameOfClass() const override
{
return "OpenCLCompileError";
}
};
} // namespace itk
#endif /* itkOpenCLMacro_h */
itk::OpenCLCompileError::OpenCLCompileError
OpenCLCompileError()
Definition itkOpenCLMacro.h:137
itk::OpenCLCompileError::~OpenCLCompileError
~OpenCLCompileError() override=default
itk::OpenCLCompileError::OpenCLCompileError
OpenCLCompileError(const char *file, unsigned int lineNumber)
Definition itkOpenCLMacro.h:142
itk::OpenCLCompileError::OpenCLCompileError
OpenCLCompileError(const std::string &file, unsigned int lineNumber)
Definition itkOpenCLMacro.h:147
itk::OpenCLCompileError::GetNameOfClass
const char * GetNameOfClass() const override
Definition itkOpenCLMacro.h:155
itkOpenCLExport.h
ITKOpenCL_EXPORT
#define ITKOpenCL_EXPORT
Definition itkOpenCLExport.h:33
itk
Definition itkAdvancedImageToImageMetric.h:43

Generated on 1768596610 for elastix by 1.15.0 |