I having troubles including header files in kernel files! i am sure that we can use "#include "xx.h"" in .cl files, before that we should set option in function "clBuiltProgram(.....)".such as clBuildProgram(program, 0, NULL, "-I ../include", NULL, NULL).But it does't work at all! For AMD APP ADK 2.9.1 on R9 and cuda_5.5 on k20,I always get the same result :
:2:10: fatal error:'../include/global.h' file not found
buildLog ends here
"/tmp/OCL332T5.cl", line 2: catastrophic error: cannot open source file
1 catastrophic error detected in the compilation of "/tmp/OCL332T5.cl".
But it is strange that it works very fine even without setting the-I ../include option to function "clBuiltProgram(.....)" in TITAN X with cuda_7.0.
Since there are so many head files to be included,i must solve the problem! Is there anybody can help me ? Thaks very much!!!