17 #ifndef __mitkOclUtils_h
18 #define __mitkOclUtils_h
23 #include <MitkOpenCLExports.h>
25 #define CHECK_OCL_ERR(_er) oclCheckError(_er, __FILE__, __LINE__);
36 MITKOPENCL_EXPORT
unsigned int iDivUp(
unsigned int dividend,
unsigned int divisor);
68 MITKOPENCL_EXPORT
bool oclCheckError(
int _err,
const char*,
int);
75 MITKOPENCL_EXPORT
void oclLogBinary(cl_program clProg, cl_device_id clDev);
82 MITKOPENCL_EXPORT
void oclLogBuildInfo(cl_program clProg, cl_device_id clDev);
96 #endif //mitkOclUtils_h
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 void oclPrintMemObjectInfo(cl_mem memobj)
Prints the available memory info about the given object to std::cout.
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 GetOclError(int _clErr)
Checks whether the given value corresponds to an OpenCL Error value and prints this message out as MI...
MITKOPENCL_EXPORT void oclPrintDeviceInfo(cl_device_id)
Prints out the essential support information about current device.
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.