Hello,
I compile my .cl source with :
clCreateProgramWithSource
clBuildProgram
and then I use clCreateKernel for some kernels in my .cl files.
[b]The problem
- If there is a C+±style comment in .cl file ‘//’, clCreateKernel fails (it’s ok with old style multiline comments “/* comment */”)
- If there is a #define in .cl file, clBuildProgram fails[/b]
The examples from the SDK are OK, but they use neither clCreateProgramWithSource nor clCreateKernel.
Any idea ? This is quite impossible to work with these restrictions External Image External Image
(I use OpenCL 1.1)
It seems I must use clCreateKernelsInProgram for now, but I don’t understand how to get a specific kernel among all ? (for example, what is the third kernel in the array returned by clCreateKernelsInProgram ? I only have the names of the kernels)