From 583dc25f4d7b4fdf75bcda9657d37bc455b49031 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Mon, 23 Dec 2013 21:24:12 -0600 Subject: [PATCH] Better documentation for kernel_data argument of make_kernel --- loopy/kernel/creation.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/loopy/kernel/creation.py b/loopy/kernel/creation.py index f3e1eb01d..8da34b880 100644 --- a/loopy/kernel/creation.py +++ b/loopy/kernel/creation.py @@ -949,6 +949,19 @@ def make_kernel(device, domains, instructions, kernel_data=["..."], **kwargs): May also contain :class:`TemporaryVariable` instances(which do not give rise to kernel-level arguments). + The string ``"..."`` may be passed as one of the entries + of the list, in which case loopy will infer names, shapes, + and types of arguments from the kernel code. It is + possible to just pass the list ``["..."]``, in which case + all arguments are inferred. + + In Python 3, the string ``"..."`` may be spelled somewhat more sensibly + as just ``...`` (the ellipsis), for the same meaning. + + As an additional option, each argument may be specified as just a name + (a string). This is useful to specify argument ordering. All other + characteristics of the named arguments are inferred. + The following keyword arguments are recognized: :arg preambles: a list of (tag, code) tuples that identify preamble -- GitLab