Skip to content

Instantly share code, notes, and snippets.

@dylanvee
Created May 31, 2013 22:14
Show Gist options
  • Save dylanvee/5688326 to your computer and use it in GitHub Desktop.
Save dylanvee/5688326 to your computer and use it in GitHub Desktop.
if (status == CL_BUILD_PROGRAM_FAILURE) {
// Determine the size of the log
size_t log_size;
clGetProgramBuildInfo(program, devices[0], CL_PROGRAM_BUILD_LOG, 0, NULL, &log_size);
// Allocate memory for the log
char *log = (char *) malloc(log_size);
// Get the log
clGetProgramBuildInfo(program, devices[0], CL_PROGRAM_BUILD_LOG, log_size, log, NULL);
// Print the log
printf("%s\n", log);
exit(1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment