From f7ac80a98b185538ae34cecfd93e810fb1689634 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Wed, 26 Nov 2014 14:35:36 -0600
Subject: [PATCH] Progress on native-Py3

---
 examples/hello-loopy.py |  2 +-
 examples/sem_reagan.py  |  4 ++--
 loopy/__init__.py       |  4 ++--
 loopy/check.py          | 10 +++++-----
 loopy/compiled.py       |  2 +-
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/examples/hello-loopy.py b/examples/hello-loopy.py
index efdbf1315..82ff2e60d 100644
--- a/examples/hello-loopy.py
+++ b/examples/hello-loopy.py
@@ -27,4 +27,4 @@ evt, (out,) = knl(queue, a=a)
 # ENDEXAMPLE
 
 cknl = lp.CompiledKernel(ctx, knl)
-print cknl.get_highlighted_code({"a": np.float32})
+print(cknl.get_highlighted_code({"a": np.float32}))
diff --git a/examples/sem_reagan.py b/examples/sem_reagan.py
index 06d2072f6..39a9ea809 100644
--- a/examples/sem_reagan.py
+++ b/examples/sem_reagan.py
@@ -92,7 +92,7 @@ def cannot_schedule_test_tim3d_slab(ctx_factory):
 
         knl = duplicate_os(knl)
 
-        print knl
+        print(knl)
 
         return knl
 
@@ -192,7 +192,7 @@ def test_tim3d_slab(ctx_factory):
         # prefetch the derivative matrix
         knl = lp.add_prefetch(knl, "D[:,:]")
 
-        print knl
+        print(knl)
 
         return knl
 
diff --git a/loopy/__init__.py b/loopy/__init__.py
index b74219daf..97dcaa73f 100644
--- a/loopy/__init__.py
+++ b/loopy/__init__.py
@@ -697,8 +697,8 @@ def link_inames(knl, inames, new_iname, within=None, tag=None):
     all_equal = True
     first_proj = projections[0]
     for proj in projections[1:]:
-        print proj.gist(first_proj)
-        print first_proj.gist(proj)
+        print(proj.gist(first_proj))
+        print(first_proj.gist(proj))
         all_equal = all_equal and (proj <= first_proj and first_proj <= proj)
 
     if not all_equal:
diff --git a/loopy/check.py b/loopy/check.py
index 45e429450..0f1627ad3 100644
--- a/loopy/check.py
+++ b/loopy/check.py
@@ -546,12 +546,12 @@ def check_implemented_domains(kernel, implemented_domains, code=None):
                         "sample point %s: %s" % (kind, ", ".join(point_axes)))
 
             if code is not None:
-                print 79*"-"
-                print "CODE:"
-                print 79*"-"
+                print(79*"-")
+                print("CODE:")
+                print(79*"-")
                 from loopy.compiled import get_highlighted_cl_code
-                print get_highlighted_cl_code(code)
-                print 79*"-"
+                print(get_highlighted_cl_code(code))
+                print(79*"-")
 
             raise LoopyError("sanity check failed--implemented and desired "
                     "domain for instruction '%s' do not match\n\n"
diff --git a/loopy/compiled.py b/loopy/compiled.py
index 3e6b50647..02e95c26a 100644
--- a/loopy/compiled.py
+++ b/loopy/compiled.py
@@ -699,7 +699,7 @@ class CompiledKernel:
                 output = get_highlighted_cl_code(output)
 
             if self.kernel.options.write_cl is True:
-                print output
+                print(output)
             else:
                 with open(self.kernel.options.write_cl, "w") as outf:
                     outf.write(output)
-- 
GitLab