From 50899209f6944b805dba44569f644872a68d60eb Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Sun, 27 Nov 2016 01:04:12 -0600 Subject: [PATCH] Fix signature --- doc/ref_transform.rst | 2 ++ loopy/transform/save.py | 13 ++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/doc/ref_transform.rst b/doc/ref_transform.rst index 5609fc253..0ce59b630 100644 --- a/doc/ref_transform.rst +++ b/doc/ref_transform.rst @@ -106,6 +106,8 @@ Creating Batches of Operations Finishing up ------------ +.. automodule:: loopy.transform.save + .. currentmodule:: loopy .. autofunction:: preprocess_kernel diff --git a/loopy/transform/save.py b/loopy/transform/save.py index 5ae366905..603f6c4c7 100644 --- a/loopy/transform/save.py +++ b/loopy/transform/save.py @@ -39,6 +39,11 @@ import logging logger = logging.getLogger(__name__) +__doc__ = """ +.. autofunction:: save_and_reload +""" + + # {{{ liveness analysis class LivenessResult(dict): @@ -512,18 +517,18 @@ class TemporarySaver(object): # {{{ auto save and reload across kernel calls -def save_and_reload(knl, **kwargs): +def save_and_reload(knl): """ Add instructions to save and reload temporary variables that are live across kernel calls. - The basic code transformation turns schedule segments: + The basic code transformation turns schedule segments:: t = <...> <...> = t - into this code: + into this code:: t = <...> t_save_slot = t @@ -533,8 +538,6 @@ def save_and_reload(knl, **kwargs): where `t_save_slot` is a newly-created global temporary variable. - :arg knl: - :arg barriers: :returns: """ liveness = LivenessAnalysis(knl) -- GitLab