Medical Imaging Interaction Toolkit
2023.12.00
Medical Imaging Interaction Toolkit
|
Go to the documentation of this file.
13 #ifndef mitkOclUtils_h
14 #define mitkOclUtils_h
19 #include <MitkOpenCLExports.h>
21 #define CHECK_OCL_ERR(_er) oclCheckError(_er, __FILE__, __LINE__);
32 MITKOPENCL_EXPORT
unsigned int iDivUp(
unsigned int dividend,
unsigned int divisor);
67 MITKOPENCL_EXPORT
bool oclCheckError(
int _err,
const char*,
int);
74 MITKOPENCL_EXPORT
void oclLogBinary(cl_program clProg, cl_device_id clDev);
81 MITKOPENCL_EXPORT
void oclLogBuildInfo(cl_program clProg, cl_device_id clDev);
MITKOPENCL_EXPORT void oclLogBuildInfo(cl_program clProg, cl_device_id clDev)
Shows the OpenCL-Program build info, called if clBuildProgram != CL_SUCCES.
MITKOPENCL_EXPORT void oclLogBinary(cl_program clProg, cl_device_id clDev)
Logs the GPU Program binary code.
MITKOPENCL_EXPORT void GetSupportedImageFormats(cl_context _context, cl_mem_object_type _type)
Print out all supported image formats for given image type.
MITKOPENCL_EXPORT cl_int oclGetPlatformID(cl_platform_id *selectedPlatform)
Returns a platform ID of an OpenCL-capable GPU, or throws an exception.
MITKOPENCL_EXPORT std::string GetImageTypeAsString(const unsigned int _in)
Translates the internal image type identifier to a human readable description string.
MITKOPENCL_EXPORT bool oclCheckError(int _err, const char *, int)
Checks the given code for errors and produces a std::cout output if the _err does not equal CL_SUCCES...
MITKOPENCL_EXPORT std::string GetOclErrorAsString(int _clErr)
Returns the name of an OpenCL Error as a string.
MITKOPENCL_EXPORT unsigned int iDivUp(unsigned int dividend, unsigned int divisor)
Method to estimate an integer quotient C from given dividend and divisor higher or equal to the corre...
MITKOPENCL_EXPORT void oclPrintMemObjectInfo(cl_mem memobj)
Prints the available memory info about the given object to std::cout.
MITKOPENCL_EXPORT void GetOclError(int _clErr)
Checks whether the given value corresponds to an OpenCL Error value and prints this message out as MI...
MITKOPENCL_EXPORT cl_ulong oclGetGlobalMemSize(cl_device_id device)
Returns the Global memory size of the current device.
MITKOPENCL_EXPORT void oclPrintDeviceInfo(cl_device_id)
Prints out the essential support information about current device.