From f547363667f8c6bc08ae97c30fc52c72d921b0fa Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 24 Dec 2013 05:03:34 +0100 Subject: [PATCH] Improve documentation of CompiledKernel.__call__ --- loopy/compiled.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/loopy/compiled.py b/loopy/compiled.py index 6b351ba59..ac5ca1f1d 100644 --- a/loopy/compiled.py +++ b/loopy/compiled.py @@ -764,12 +764,28 @@ class CompiledKernel: # }}} def __call__(self, queue, **kwargs): - """If all array arguments are :mod:`numpy` arrays, defaults to - returning numpy arrays as well. - + """ :arg allocator: :arg wait_for: :arg out_host: + + Decides whether output arguments (i.e. arguments + written by the kernel) are to be returned as + :mod:`numpy` arrays. *True* for yes, *False* for no. + + For the default value of *None*, if all (input) array + arguments are :mod:`numpy` arrays, defaults to + returning :mod:`numpy` arrays as well. + + :returns: ``(evt, output)`` where *evt* is a :class:`pyopencl.Event` + associated with the execution of the kernel, and + output is a tuple of output arguments (arguments that + are written as part of the kernel). The order is given + by the order of kernel arguments. If this order is unspecified + (such as when kernel arguments are inferred automatically), + enable :attr:`loopy.Flags.return_dict` to make *output* a + :class:`dict` instead, with keys of argument names and values + of the returned arrays. """ allocator = kwargs.pop("allocator", None) -- GitLab