I am trying to make a class that would be passable to Kernel's set_arg()
and otherwise behave like a Buffer (it will have a real pyopencl.Buffer
inside). Has someone done that before? I am having a hard time going
through the C++/generated code in pyopencl, and still don't understand what
exactly is required from such a class. The docs for Kernel.set_arg() list a
number of types that it accepts, but these are all defined at the C level
and are not very easy to subclass.

A question to Andreas: in PyCUDA, it is enough for a kernel argument to
just have a `.gpudata` attribute that is convertible to integer - would it
be possible to do the same in PyOpenCL (at least the first part, where
set_arg() would use duck typing and look for a specific attribute)?
_______________________________________________
PyOpenCL mailing list -- pyopencl@tiker.net
To unsubscribe send an email to pyopencl-le...@tiker.net

Reply via email to