Skip to content

Commit 53e8159

Browse files
committed
polly: Fix Python 3 SyntaxErrors
1 parent 89c5576 commit 53e8159

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

polly/utils/jscop2cloog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def writeCloog(scop):
5050
context = scop['context']
5151
domains = getDomains(scop)
5252
schedules = getSchedules(scop)
53-
print template % (context, domains, schedules)
53+
print(template % (context, domains, schedules))
5454

5555
def __main__():
5656
description = 'Translate JSCoP into iscc input'

polly/utils/pyscop/jscop2iscc.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env python
2+
from __future__ import print_function
3+
24
import argparse, isl, os
35
import json
46

@@ -9,8 +11,8 @@ def printDomain(scop):
911
for statement in scop['statements']:
1012
domain = domain.union(isl.USet(statement['domain']))
1113

12-
print "D :=",
13-
print str(domain) + ";"
14+
print("D :=", end=" ")
15+
print(str(domain) + ";")
1416

1517
def printAccesses(scop):
1618

@@ -21,8 +23,8 @@ def printAccesses(scop):
2123
if access['kind'] == 'read':
2224
read = read.union(isl.UMap(access['relation']))
2325

24-
print "R :=",
25-
print str(read) + ";"
26+
print("R :=", end=" ")
27+
print(str(read) + ";")
2628

2729
write = isl.UMap('{}')
2830

@@ -31,8 +33,8 @@ def printAccesses(scop):
3133
if access['kind'] == 'write':
3234
write = write.union(isl.UMap(access['relation']))
3335

34-
print "W :=",
35-
print str(write) + ";"
36+
print("W :=", end=" ")
37+
print(str(write) + ";")
3638

3739
def printSchedule(scop):
3840

@@ -41,8 +43,8 @@ def printSchedule(scop):
4143
for statement in scop['statements']:
4244
schedule = schedule.union(isl.UMap(statement['schedule']))
4345

44-
print "S :=",
45-
print str(schedule) + ";"
46+
print("S :=", end=" ")
47+
print(str(schedule) + ";")
4648

4749
def __main__():
4850
description = 'Translate JSCoP into iscc input'
@@ -58,10 +60,10 @@ def __main__():
5860
printAccesses(scop)
5961
printSchedule(scop)
6062

61-
print 'R := R * D;'
62-
print 'W := W * D;'
63-
print 'Dep := (last W before R under S)[0];'
64-
print 'schedule D respecting Dep minimizing Dep;'
63+
print('R := R * D;')
64+
print('W := W * D;')
65+
print('Dep := (last W before R under S)[0];')
66+
print('schedule D respecting Dep minimizing Dep;')
6567

6668

6769
__main__()

0 commit comments

Comments
 (0)