1 Reply Latest reply on Mar 17, 2014 6:44 AM by nou

    Using STL Vector in .cl file?

    ifrah

      Hi, i am using a struct containing three values, one of which is an STL vector in my opencl code. I have defined this struct in my cpp file and i have to define it in my cl file as well and it does not seem to be straightforward.

       

      struct my_struct{

      int a;

      int b;

      std::vector<int> vec(2);

      }

       

      I am getting this error "type name requires a specifier or qualifier", may be because kernel does not know about vector library. Do i have to send the header file or is it just not possible to define this struct in the kernel file?