Mercurial > hg > CbC > CbC_llvm
diff examples/Kaleidoscope/MCJIT/lazy/genk-timing.py @ 148:63bd29f05246
merged
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 14 Aug 2019 19:46:37 +0900 |
parents | c2174574ed3a |
children |
line wrap: on
line diff
--- a/examples/Kaleidoscope/MCJIT/lazy/genk-timing.py Sun Dec 23 19:23:36 2018 +0900 +++ b/examples/Kaleidoscope/MCJIT/lazy/genk-timing.py Wed Aug 14 19:46:37 2019 +0900 @@ -1,5 +1,7 @@ #!/usr/bin/env python +from __future__ import print_function + import sys import random @@ -173,7 +175,7 @@ def generateKScript(filename, numFuncs, elementsPerFunc, funcsBetweenExec, callWeighting, timingScript): """ Generate a random Kaleidoscope script based on the given parameters """ - print "Generating " + filename + print("Generating " + filename) print(" %d functions, %d elements per function, %d functions between execution" % (numFuncs, elementsPerFunc, funcsBetweenExec)) print(" Call weighting = %f" % callWeighting) @@ -200,7 +202,7 @@ script.writeEmptyLine() script.writeFinalFunctionCounts() funcsCalled = len(script.calledFunctions) - print " Called %d of %d functions, %d total" % (funcsCalled, numFuncs, script.totalCallsExecuted) + print(" Called %d of %d functions, %d total" % (funcsCalled, numFuncs, script.totalCallsExecuted)) timingScript.writeTimingCall(filename, numFuncs, funcsCalled, script.totalCallsExecuted) # Execution begins here @@ -216,4 +218,4 @@ for (numFuncs, elementsPerFunc, funcsBetweenExec, callWeighting) in dataSets: filename = "test-%d-%d-%d-%d.k" % (numFuncs, elementsPerFunc, funcsBetweenExec, int(callWeighting * 100)) generateKScript(filename, numFuncs, elementsPerFunc, funcsBetweenExec, callWeighting, timingScript) -print "All done!" +print("All done!")