I have been working with OpenCL 1.2 and I'm having a trouble with the OpenCL C++ Wrapper API (https://www.khronos.org/registry/OpenCL/specs/opencl-cplusplus-1.2.pdf).
It doesn't tell any restriction about include a class "class MyClass" in the kerenel (cl) file, and I suppose that it is possible since the Platform, Device and Context are "Classes" (If not, what is its objetive then? X_X)
Well, I have the following simple class in a "printer.h" file:
class Printer{
public:
void print();
}
And in the cl file I have the following lines:
#include "printer.h"
__kernel void hello()
{
Printer myPrinter;
//myPrinter.print();
}
But when I build this kernel file in my cpp program it brings the error: unknown type name 'class'. I have read the post Passing Class to a Kernel in Intel Opencl that suggest use SYCL, but, Is there no other way "easier" according to the standard and the wrapper?
Thanks for your help