From 0307cb9537e39e9064543e91f90ebd56ec0948c7 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Sat, 28 Nov 2015 17:58:11 -0600
Subject: [PATCH] Accept more iterables for sweep_inames in add_prefetch()

---
 loopy/__init__.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/loopy/__init__.py b/loopy/__init__.py
index 69a17104c..1a3fe2cec 100644
--- a/loopy/__init__.py
+++ b/loopy/__init__.py
@@ -1127,6 +1127,9 @@ def add_prefetch(kernel, var_name, sweep_inames=[], dim_arg_names=None,
 
     if isinstance(sweep_inames, str):
         sweep_inames = [s.strip() for s in sweep_inames.split(",")]
+    else:
+        # copy, standardize to list
+        sweep_inames = list(sweep_inames)
 
     kernel, subst_use, sweep_inames, inames_to_be_removed = \
             _process_footprint_subscripts(
-- 
GitLab