From 1fcd98c91758e3c02d5bcb1cd9be1de0021c38a1 Mon Sep 17 00:00:00 2001 From: Kaushik Kulkarni Date: Mon, 26 Mar 2018 16:41:09 -0500 Subject: [PATCH] Added docstrings explaing `hidden_functions` --- loopy/library/reduction.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/loopy/library/reduction.py b/loopy/library/reduction.py index f1c5607fe..d2a4e90ac 100644 --- a/loopy/library/reduction.py +++ b/loopy/library/reduction.py @@ -52,6 +52,13 @@ class ReductionOperation(object): raise NotImplementedError def hidden_function(self): + """ + A reduction may result into a scalar callable during the codegen phase. + This function would return an instance of :class:`str` to scope such + functions that may result during "realize_reduction". For example: + `reduce(max(...))` results into another callable `max(a, b)` which is + the "hidden function" the operation is pointing to. + """ return None def __hash__(self): -- GitLab