https://github.com/inducer/pyopencl/commit/a37681d424a268acfc107ebfe5443732b6d7dc61
Thanks! Andreas Yves Surrel <y...@surrel.org> writes: > Modified from > https://github.com/inducer/pyopencl/blob/master/pyopencl/__init__.py > > def enqueue_copy(queue, dest, src, **kwargs): > """Copy from :class:`Image`, :class:`Buffer` or the host to > :class:`Image`, :class:`Buffer` or the host. (Note: host-to-host > copies are unsupported.) > > The following keyword arguments are available: > > :arg wait_for: (optional, default empty) > :arg is_blocking: Wait for completion. Defaults to *True*. > (Available on any copy involving host memory) > > .. note:: > > Mind that when :param wait_for: is set to *False*, the deletion > of the :class:`NannyEvent` that is returned by the function > if the transfer involved a host-side buffer will block until > the transfer is complete, so be sure to keep a live reference > to this event as long as necessary. > > :return: A :class:`NannyEvent` if the transfer involved a > host-side buffer, otherwise an :class:`Event`. > > .. note:: > > Two types of 'buffer' occur in the arguments to this function, > :class:`Buffer` and 'host-side buffers'. The latter are > defined by Python and commonly called `buffer objects > <https://docs.python.org/3.4/c-api/buffer.html>`_. :mod:`numpy` > arrays are a very common example. > Make sure to always be clear on whether a :class:`Buffer` or a > Python buffer object is needed. > > >> Le 23 oct. 2019 à 17:19, Andreas Kloeckner <li...@informa.tiker.net> a écrit >> : >> >> Yves Surrel <y...@surrel.org> writes: >>> Got it! Thank you. >>> >>> Really deserves some info in the doc. >> >> I'd be happy to have this spelled out more clearly. Could you write up a >> patch/a segment of documentation to explain this? >> >> Thanks! >> Andreas >
signature.asc
Description: PGP signature
_______________________________________________ PyOpenCL mailing list -- pyopencl@tiker.net To unsubscribe send an email to pyopencl-le...@tiker.net