I've written an OpenCL kernel in a .cl file. It attempts to #include several headers.
Its compilation fails, since the included header files are "not found".
I am aware that clBuildProgram can take the -I dir option, which adds the directory dir to the list of directories to be searched for the header files.
In the khronus site forum this post http://www.khronos.org/message_boards/viewtopic.php?f=37&t=2535 talks about the issue.
They propose to use clCreateProgramWithSource which specifies all sources (including .h files).
I have a questions regarding this issue:
- Which option is better? (
clBuildProgramvs.clCreateProgramWithSource, as described above) - If I use
clCreateProgramWithSourcehow does the compiler know what to include? I mean, which source stands for which included file name? - If I use
clBuildProgramand there are several directories with include files, how do I specify them?
Aucun commentaire:
Enregistrer un commentaire