tball

Unable to use complex float

Discussion created by tball on Mar 3, 2010
Latest reply on May 25, 2011 by laobrasuca
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) { }

Outcomes