Creates an OpenCL program from a source code.
An overloaded function version creates an OpenCL program and writes compiler messages into the passed string.
[in] Handle of the OpenCL context.
[in] String with the source code of the OpenCL program.
[in] A string for receiving the OpenCL compiler messages.
A handle to an OpenCL object if successful. In case of error -1 is returned. For information about the error, use the GetLastError() function.
At the moment, the following error codes are used:
In some graphic cards working with the double type numbers is disabled by default. This can lead to compilation error 5105. To enable support for the double type numbers, please add the following directive to your OpenCL program: #pragma OPENCL EXTENSION cl_khr_fp64 : enable. However if a graphic card doesn't support double, enabling this directive won't be of help.