OpenCL run-time loader header. More...
Defines | |
#define | CLEW_SUCCESS 0 |
Success error code. | |
#define | CLEW_ERROR_OPEN_FAILED -1 |
Error code for failing to open the dynamic library. | |
#define | CLEW_ERROR_ATEXIT_FAILED -2 |
Error code for failing to queue the closing of the dynamic library to atexit() | |
#define | CLEW_ERROR_IMPORT_FAILED -3 |
Error code for failing to import a named function from the dll. | |
Functions | |
int | clewInit (const char *) |
Load OpenCL dynamic library and set function entry points. | |
const char * | clewErrorString (cl_int error) |
Convert an OpenCL error code to its string equivalent. |
OpenCL run-time loader header.
This file contains a copy of the contents of CL.H and CL_PLATFORM.H from the official OpenCL spec. The purpose of this code is to load the OpenCL dynamic library at run-time and thus allow the executable to function on many platforms regardless of the vendor of the OpenCL driver actually installed. Some of the techniques used here were inspired by work done in the GLEW library (http://glew.sourceforge.net/)
const char* clewErrorString | ( | cl_int | error ) |
Convert an OpenCL error code to its string equivalent.
error | CL error code |
int clewInit | ( | const char * | path ) |
Load OpenCL dynamic library and set function entry points.
path | path to dynamic library to load |