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)?
Yves Surrel <yves(a)surrel.org> writes:
> Hi Andreas
> Before logging an issue, I just want to know whether I am simply stupid…
> AttributeError: module 'pyopencl' has no attribute ‘enqueue_task’. But it is in the doc at the same level as pyopencl.enqueue_nd_range_kernel
> So what’s wrong (it does not appear in __init__.py) ?
It's documented to be equivalent to be equivalent to
enqueue_nd_range_kernel with unit grid size. Commit
removed it, but (by the looks of it) left the docs in place. Do you see
a good reason to keep/reintroduce it?
removes the docs.