11#!/usr/bin/env python
2+ from __future__ import print_function
3+
24import argparse , isl , os
35import 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
1517def 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
3739def 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
4749def __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