From 343372fec4dfe3e54d6a6093faf77afe7761870d Mon Sep 17 00:00:00 2001
From: Matt Wala <wala1@illinois.edu>
Date: Sat, 8 Apr 2017 00:50:12 -0500
Subject: [PATCH] Document subkernel helpers.

---
 loopy/kernel/tools.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/loopy/kernel/tools.py b/loopy/kernel/tools.py
index 32b589e5a..df0f3c931 100644
--- a/loopy/kernel/tools.py
+++ b/loopy/kernel/tools.py
@@ -1508,6 +1508,11 @@ def find_most_recent_global_barrier(kernel, insn_id):
 
 @memoize_on_first_arg
 def get_subkernels(kernel):
+    """Return a :class:`tuple` of the names of the subkernels in the kernel. The
+    kernel must be scheduled.
+
+    See also :class:`loopy.schedule.CallKernel`.
+    """
     from loopy.kernel import kernel_state
     if kernel.state != kernel_state.SCHEDULED:
         raise LoopyError("Kernel must be scheduled")
@@ -1521,6 +1526,10 @@ def get_subkernels(kernel):
 
 @memoize_on_first_arg
 def get_subkernel_to_insn_id_map(kernel):
+    """Return a :class:`dict` mapping subkernel names to a :class:`frozenset`
+    consisting of the instruction ids scheduled within the subkernel. The
+    kernel must be scheduled.
+    """
     from loopy.kernel import kernel_state
     if kernel.state != kernel_state.SCHEDULED:
         raise LoopyError("Kernel must be scheduled")
-- 
GitLab