From e3e5da42f8d1f32a55904b9da64444ab372de5cd Mon Sep 17 00:00:00 2001 From: Francis Russell Date: Mon, 6 Feb 2012 12:33:15 +0000 Subject: [PATCH] Beautify some debug output. --- src/ofc/generators/Onetep.scala | 3 +-- src/ofc/generators/onetep/CodeGenerator.scala | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/ofc/generators/Onetep.scala b/src/ofc/generators/Onetep.scala index a127e7d..306b003 100644 --- a/src/ofc/generators/Onetep.scala +++ b/src/ofc/generators/Onetep.scala @@ -11,7 +11,7 @@ class Onetep extends Generator { var dictionary = new Dictionary def acceptInput(program : List[parser.Statement]) = { - println(program.mkString("\n") + "\n") + println("Parsed input:\n"+program.mkString("\n") + "\n") buildDictionary(program) buildDefinitions(program) } @@ -84,7 +84,6 @@ class Onetep extends Generator { } def buildDefinition(definition : parser.Definition) { - println(definition) val builder = new TreeBuilder(dictionary) val assignment = builder(definition.term, definition.expr) val codeGenerator = new CodeGenerator() diff --git a/src/ofc/generators/onetep/CodeGenerator.scala b/src/ofc/generators/onetep/CodeGenerator.scala index 5aa32bc..f83b6f3 100644 --- a/src/ofc/generators/onetep/CodeGenerator.scala +++ b/src/ofc/generators/onetep/CodeGenerator.scala @@ -48,17 +48,17 @@ class CodeGenerator { val allSpaces = IterationSpace.flattenPostorder(space) val allIndices = allSpaces flatMap (_.getIndices) - println("dumping operations") + println("Operations:") for(op <- IterationSpace.sort(allSpaces)) println(op) - println("finished dumping operations\n\ndumping indices") + println("\nIndices:") for (i <- Index.sort(allIndices)) println(i) - println("finished dumping indices") + println("") val loopNest = LoopNest(space) - println(loopNest.getTree) - println(loopNest.generateCode) + println("Loop Nest:\n"+ loopNest.getTree + "\n") + println("Code:\n"+loopNest.generateCode) // Next: we dump all these things into a prefix map System.exit(0) -- 2.47.3