From 530e4275dd0219899d8495350649cf8c38d039f1 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Fri, 10 Jun 2011 12:53:10 -0400 Subject: [PATCH] Add note about persistency of set_scalar_arg_dtypes() to docs. --- doc/source/runtime.rst | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/source/runtime.rst b/doc/source/runtime.rst index 14b35f46..538ae09d 100644 --- a/doc/source/runtime.rst +++ b/doc/source/runtime.rst @@ -707,7 +707,7 @@ Programs and Kernels Returns a list of all :class:`Kernel` objects in the :class:`Program`. -.. function:: unload_compiler() + .. class:: Kernel(program, name) @@ -770,6 +770,18 @@ Programs and Kernels most suitable number types will automatically be cast to the right type for kernel invocation. + .. note :: + + The information set by this rountine is attached to a single kernel + instance. A new kernel instance is created every time you use + `program.kernel` attribute access. The following will therefore not + work:: + + prg = cl.Program(...).build() + prg.kernel.set_scalar_arg_dtypes(...) + prg.kernel(queue, n_globals, None, args) + + .. method:: __call__(queue, global_size, local_size, *args, global_offset=None, wait_for=None) Use :func:`enqueue_nd_range_kernel` to enqueue a kernel execution, after using -- GitLab