Is it possible to use self-defined C ++ classes in the OpenCL kernel? It should work as follows:
#include "element.cpp"
__kernel void do_something(__global element* input, __global element* output);
{
int index = get_global_id(0);
output[index] = input[index].update(index);
}
This is interesting because you can specify the work to be done in the :: update (int no) element afterwards.
I did not get a job. This is what OpenCL-Compiler tells me:
unknown type name 'class'
In CUDA, this works. Are there any other ideas if the approach with objects in the OpenCL kernel does not work?
Thanks for your tips in advance!
source
share