36 #include <OpenCL/cl.h>
54 (*program) = clCreateProgramWithSource((cl_context)
glb_ctx, 1,
58 err = clBuildProgram((*program), 1, (cl_device_id *) &
glb_device_id,
61 if (err == CL_BUILD_PROGRAM_FAILURE) {
64 CL_PROGRAM_BUILD_LOG, 0, NULL, &
log_size);
66 char *log = (
char *) malloc(
log_size);
69 CL_PROGRAM_BUILD_LOG,
log_size, log, NULL);
71 fprintf(stderr,
"%s\n", log);
void opencl_kernel_jit(const char *kernel, cl_program *program)
integer, parameter, public log_size