Skip to content

Commit 377269d

Browse files
committed
print() is a function in Python 3
1 parent e92a069 commit 377269d

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

openmp/runtime/tools/summarizeStats.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def draw_circle_frame(self, x0, y0, r):
3737

3838
frame_dict = {'polygon': draw_poly_frame, 'circle': draw_circle_frame}
3939
if frame not in frame_dict:
40-
raise ValueError, 'unknown value for `frame`: %s' % frame
40+
raise ValueError('unknown value for `frame`: %s' % frame)
4141

4242
class RadarAxes(PolarAxes):
4343
"""
@@ -143,7 +143,7 @@ def readFile(fname):
143143
res["counters"] = readCounters(f)
144144
return res
145145
except (OSError, IOError):
146-
print "Cannot open " + fname
146+
print("Cannot open " + fname)
147147
return None
148148

149149
def usefulValues(l):
@@ -235,7 +235,7 @@ def compPie(data):
235235
compKeys[key] = data[key]
236236
else:
237237
nonCompKeys[key] = data[key]
238-
print "comp keys:", compKeys, "\n\n non comp keys:", nonCompKeys
238+
print("comp keys:", compKeys, "\n\n non comp keys:", nonCompKeys)
239239
return [compKeys, nonCompKeys]
240240

241241
def drawMainPie(data, filebase, colors):
@@ -301,7 +301,7 @@ def main():
301301
"""radar Charts finish here"""
302302
plt.savefig(filebase+"_"+s+"_"+chartType, bbox_inches='tight')
303303
elif s == 'timers':
304-
print "overheads in "+filebase
304+
print("overheads in "+filebase)
305305
numThreads = tmp[s]['SampleCount']['Total_OMP_parallel']
306306
for key in data.keys():
307307
if key[0:5] == 'Total':

polly/lib/External/isl/imath/tools/findthreshold.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ def compute_stats():
8686
stats = compute_stats()
8787
stats.sort(key=lambda s: s[3] / s[2])
8888
for prec, thresh, trec, tnorm in stats:
89-
print "%d\t%d\t%.3f\t%.3f\t%.4f" % (prec, thresh, trec, tnorm,
90-
tnorm / trec)
89+
print("%d\t%d\t%.3f\t%.3f\t%.4f" % (prec, thresh, trec, tnorm,
90+
tnorm / trec))
9191

92-
print
92+
print()
9393

9494
# Here there be dragons

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: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ def printDomain(scop):
99
for statement in scop['statements']:
1010
domain = domain.union(isl.USet(statement['domain']))
1111

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

1515
def printAccesses(scop):
1616

@@ -21,8 +21,8 @@ def printAccesses(scop):
2121
if access['kind'] == 'read':
2222
read = read.union(isl.UMap(access['relation']))
2323

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

2727
write = isl.UMap('{}')
2828

@@ -31,8 +31,8 @@ def printAccesses(scop):
3131
if access['kind'] == 'write':
3232
write = write.union(isl.UMap(access['relation']))
3333

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

3737
def printSchedule(scop):
3838

@@ -41,8 +41,8 @@ def printSchedule(scop):
4141
for statement in scop['statements']:
4242
schedule = schedule.union(isl.UMap(statement['schedule']))
4343

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

4747
def __main__():
4848
description = 'Translate JSCoP into iscc input'
@@ -58,10 +58,10 @@ def __main__():
5858
printAccesses(scop)
5959
printSchedule(scop)
6060

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;'
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;')
6565

6666

6767
__main__()

0 commit comments

Comments
 (0)