Results 1 to 2 of 2

Thread: Problem Including Headers in Kernels

  1. #1
    Senior Member
    Join Date
    Mar 2011

    Problem Including Headers in Kernels

    When I write #include "kernel.h" at the very top of my file, clBuildProgram() doesn't seem to pull in the header file by default. I expected clBuildProgram() to obey the include path search rules for #include "kernel.h" and #include <kernel.h>, but it doesn't seem to do so implicitly. Is this how it's suppose to be, always explicitly passing "-I./" or such as a program build option when using header files?

  2. #2

    Re: Problem Including Headers in Kernels

    What I do is include the path, like:

    #include "/Developer/Projects/MyProject/MyHeader.h"

    That works under xcode with cpu and nVidia; not sure yet about AMD because I pulled the whole header file into the kernel to play with it while debugging on my 5870.

Similar Threads

  1. problem with openCL/multiple kernels
    By pelliegia in forum OpenCL
    Replies: 6
    Last Post: 10-18-2012, 12:51 AM
  2. The problem of including OpenMAXAL_IID.h
    By JaeUnHong in forum OpenMAX
    Replies: 1
    Last Post: 05-29-2008, 07:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean