12 Replies Latest reply on May 25, 2011 7:39 PM by laobrasuca

    Unable to use complex float

    tball
      float,complex,variables

      Hello

      I have a problem defining complex numbers in my kernel.

      See my attached code.

      I get the following error when compiling the kernel:

      /tmp/OCL3OF8Ri.cl(13): error: this declaration has no storage class or type
                specifier
            complex float data[40];
            ^

      /tmp/OCL3OF8Ri.cl(13): error: expected a ";"
            complex float data[40];
                         ^

       

      I might have misunderstood the type declaration stated in the OpenCL api reference guide. Could anyone lead me to the right track?

       

      typedef struct gf { complex float data[40]; } gaborFeature; __kernel void fub(__global int bar) { }