From 855c451d80503379c38a0a50255c1f8e9e0b4c1c Mon Sep 17 00:00:00 2001 From: Alex Rothberg <agrothberg@gmail.com> Date: Fri, 18 Jul 2014 17:50:53 -0400 Subject: [PATCH] Renamed new magics --- doc/misc.rst | 2 +- pyopencl/ipython_ext.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/misc.rst b/doc/misc.rst index 7a6a9665..950e27da 100644 --- a/doc/misc.rst +++ b/doc/misc.rst @@ -39,7 +39,7 @@ and then use the ``%%cl_kernel`` 'cell-magic' command. See `this notebook You can pass build options to be used for building the program executable by using the ``-o`` flag on the first line of the cell (next to the ``%%cl_kernel`` directive). For example: `%%cl_kernel -o "-cl-fast-relaxed-math"``. -There are also line magics: ``cl_load_kernel`` which will load a file into the next cell (adding ``cl_kernel`` to the first line) and ``cl_run_kernel`` which will compile kernels from a file (as if you copy-and-pasted the contents of the file to a cell with ``cl_kernel``). Boths of these magics take options ``-f`` to specify the file and optionally ``-o`` for build options. +There are also line magics: ``cl_load_edit_kernel`` which will load a file into the next cell (adding ``cl_kernel`` to the first line) and ``cl_kernel_from_file`` which will compile kernels from a file (as if you copy-and-pasted the contents of the file to a cell with ``cl_kernel``). Boths of these magics take options ``-f`` to specify the file and optionally ``-o`` for build options. .. versionadded:: 2014.1 diff --git a/pyopencl/ipython_ext.py b/pyopencl/ipython_ext.py index a61d7be7..0ceb04f8 100644 --- a/pyopencl/ipython_ext.py +++ b/pyopencl/ipython_ext.py @@ -60,13 +60,13 @@ class PyOpenCLMagics(Magics): @line_magic - def cl_run_kernel(self, line): + def cl_kernel_from_file(self, line): kernel, build_options = self._load_kernel_and_options(line) self._run_kernel(kernel, build_options) @line_magic - def cl_load_kernel(self, line): + def cl_load_edit_kernel(self, line): kernel, build_options = self._load_kernel_and_options(line) header = "%%cl_kernel" -- GitLab