2 Replies Latest reply on Mar 20, 2013 11:25 AM by LeeHowes

    How to link Macros defined in the host code to the kernel code?


      I am trying to execute a bitonic sort code from the book OpenCL in Action__Matthew Scarpino. In the cl code they have defined two macros and have called these macros in the kernel code(I have attached an image of this code below). But I think macros can't be defined in kernel code, so we need to define them in the host code. If this is so how do we link them to the kernel code..? i mean how do we give it as an argument to the kernel code..?

         I have also attached a pdf of this book  below, this part is given in section 11.2(chapter name : Coding Practical in OpenCL->  Bitonic Sort).

      I have one more doubt... Can I see what values do the variables possess as the kernel code progresses.. how do we do this... giving breakpoints doesn't work...!