diff --git a/doc/source/array.rst b/doc/source/array.rst index 93e558778fab5b37017d0a09a915c8b69c31b7a8..819ba895ea4ecc0f93472280ad7f5f474b6c6704 100644 --- a/doc/source/array.rst +++ b/doc/source/array.rst @@ -298,7 +298,7 @@ intermediate result. The functionality in the module :mod:`pyopencl.elementwise` contains tools to help generate kernels that evaluate multi-stage expressions on one or several operands in a single pass. -.. class:: ElementwiseKernel(context, arguments, operation, name="kernel", options=[]) +.. class:: ElementwiseKernel(context, arguments, operation, name="kernel", preamble="", options=[]) Generate a kernel that takes a number of scalar or vector *arguments* and performs the scalar *operation* on each entry of its arguments, if that @@ -311,6 +311,9 @@ on one or several operands in a single pass. *name* specifies the name as which the kernel is compiled, and *options* are passed unmodified to :meth:`pyopencl.Program.build`. + *preamble* is a piece of C source code that gets inserted outside of the + function context in the elementwise operation's kernel source code. + .. method:: __call__(*args) Invoke the generated scalar kernel. The arguments may either be scalars or