cf4ocl (C Framework for OpenCL)  v2.1.0
Object-oriented framework for developing and benchmarking OpenCL projects in C/C++
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Errors

This module offers a function to convert OpenCL error codes into human-readable strings. More...

Functions

const char * ccl_err (int code)
 Convert OpenCL error code to a readable string. More...
 

Detailed Description

This module offers a function to convert OpenCL error codes into human-readable strings.

It is widely used by other cf4ocl modules, but may also be useful to client code which directly uses OpenCL functions.

Example:

cl_int status;
cl_event event;
status = clWaitForEvents(1, &event);
if (status != CL_SUCCESS) {
fprintf(stderr, "OpenCL error %d: %s", status, ccl_err(status));
}

Function Documentation

const char * ccl_err ( int  code)

Convert OpenCL error code to a readable string.

Parameters
[in]codeOpenCL error code.
Returns
A readable string.

Definition at line 118 of file ccl_errors.c.