36 "CL_DEVICE_NOT_FOUND",
37 "CL_DEVICE_NOT_AVAILABLE",
38 "CL_COMPILER_NOT_AVAILABLE",
39 "CL_MEM_OBJECT_ALLOCATION_FAILURE",
40 "CL_OUT_OF_RESOURCES",
41 "CL_OUT_OF_HOST_MEMORY",
42 "CL_PROFILING_INFO_NOT_AVAILABLE",
43 "CL_MEM_COPY_OVERLAP",
44 "CL_IMAGE_FORMAT_MISMATCH",
45 "CL_IMAGE_FORMAT_NOT_SUPPORTED",
46 "CL_BUILD_PROGRAM_FAILURE",
66 "CL_INVALID_DEVICE_TYPE",
67 "CL_INVALID_PLATFORM",
70 "CL_INVALID_QUEUE_PROPERTIES",
71 "CL_INVALID_COMMAND_QUEUE",
72 "CL_INVALID_HOST_PTR",
73 "CL_INVALID_MEM_OBJECT",
74 "CL_INVALID_IMAGE_FORMAT_DESCRIPTOR",
75 "CL_INVALID_IMAGE_SIZE",
78 "CL_INVALID_BUILD_OPTIONS",
80 "CL_INVALID_PROGRAM_EXECUTABLE",
81 "CL_INVALID_KERNEL_NAME",
82 "CL_INVALID_KERNEL_DEFINITION",
84 "CL_INVALID_ARG_INDEX",
85 "CL_INVALID_ARG_VALUE",
86 "CL_INVALID_ARG_SIZE",
87 "CL_INVALID_KERNEL_ARGS",
88 "CL_INVALID_WORK_DIMENSION",
89 "CL_INVALID_WORK_GROUP_SIZE",
90 "CL_INVALID_WORK_ITEM_SIZE",
91 "CL_INVALID_GLOBAL_OFFSET",
92 "CL_INVALID_EVENT_WAIT_LIST",
94 "CL_INVALID_OPERATION",
95 "CL_INVALID_GL_OBJECT",
96 "CL_INVALID_BUFFER_SIZE",
97 "CL_INVALID_MIP_LEVEL",
98 "CL_INVALID_GLOBAL_WORK_SIZE",
99 "CL_INVALID_PROPERTY",
100 "CL_INVALID_IMAGE_DESCRIPTOR",
101 "CL_INVALID_COMPILER_OPTIONS",
102 "CL_INVALID_LINKER_OPTIONS",
103 "CL_INVALID_DEVICE_PARTITION_COUNT",
105 #define checkOclErrors(err) __checkOclErrors((err), #err, __FILE__, __LINE__) 108 if (err != CL_SUCCESS)
110 fprintf(stderr,
"OpenCL error at %s:%d code=%d(%s) \"%s\" \n", file, line, err, -68 <= err && err < 0 ? errorString[-err] :
"Unspecified Error", func);
static const char * errorString[]
static void __checkOclErrors(const cl_int err, const char *const func, const char *const file, const int line)