Skip to content

Commit

Permalink
Add note about Kernel constructor for oddly-named kernels
Browse files Browse the repository at this point in the history
Closes gh-782
  • Loading branch information
inducer committed Aug 27, 2024
1 parent 846fede commit 40230ea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/runtime_program.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ Program
in the same name space and take precedence over
:class:`Kernel` names.

.. note::

If you need to retrieve a kernel whose name includes non-identifier
characters, retrieving it as an attribute of
:class:`~pyopencl.Program` will
not work, for obvious reasons. In that case, you can use
the :class:`~pyopencl.Kernel` constructor directly.

.. method:: all_kernels()

Returns a list of all :class:`Kernel` objects in the :class:`Program`.
Expand Down

0 comments on commit 40230ea

Please sign in to comment.