title: Can I embed C++ Classes in OpenCL Kernels?
body: <p>is there a possibility to use self-defined C++ - classes in an OpenCL kernel?
  It should work like this:</p>
  
  <pre><code>#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);
  }
  </code></pre>
  
  <p>This is interesting, because you can specify the work that must be done in element::update(int no) afterwards.</p>
  
  <p>I did not get it to work. This is what the OpenCL-Compiler tells me:</p>
  
  <blockquote>
    <p>unknown type name 'class'</p>
  </blockquote>
  
  <p>In CUDA this works. Are there any other ideas, if the approach with objects in the OpenCL kernel does not work?</p>
  
  <p>Thanks for your hints in advance!</p>