PDA

View Full Version : clBuildProgram pfn_notify



Banjobeni
06-27-2011, 03:15 AM
The OpenCL spec states that when using pfn_notify, "clBuildProgram does not need to wait for the build to complete and can return immediately".

But if the call returns immediately, how can i find out whether the program was successfully built or not? There is no such thing as a cl_int passed as argument to the callback to indicate the success of the compilation.

affie
06-27-2011, 05:13 PM
The pfn_notify function you specified will be called when the program build has finished. You can then query the build status to see if the program was built successfully or not.

david.garcia
07-06-2011, 05:25 AM
More specifically, you want to call clGetProgramBuildInfo(..., CL_PROGRAM_BUILD_STATUS, ...);