Skip to content
Snippets Groups Projects
Commit 79e89966 authored by Rafael Ravedutti Lucio Machado's avatar Rafael Ravedutti Lucio Machado
Browse files

Small adjustments on graph generation

parent 0d946ca1
Branches
No related tags found
No related merge requests found
......@@ -8,8 +8,8 @@ from ast.visitor import Visitor
from graphviz import Digraph
class ASTGraph:
def __init__(self, ast_node, filename, ref="G", max_depth=0):
self.graph = Digraph(ref, filename, node_attr={'color': 'lightblue2', 'style': 'filled'})
def __init__(self, ast_node, filename, ref="AST", max_depth=0):
self.graph = Digraph(ref, filename=filename, node_attr={'color': 'lightblue2', 'style': 'filled'})
self.graph.attr(size='6,6')
self.visitor = Visitor(ast_node, max_depth=max_depth)
......
......@@ -8,6 +8,7 @@ from ast.properties import Properties
from ast.transform import Transform
from ast.variables import Variables
from sim.arrays import ArraysDecl
from graph.graphviz import ASTGraph
from sim.cell_lists import CellLists, CellListsBuild, CellListsStencilBuild
from sim.grid import Grid2D, Grid3D
from sim.kernel_wrapper import KernelWrapper
......@@ -200,5 +201,5 @@ class ParticleSimulation:
#Transform.apply(program, Transform.reuse_array_access_expressions)
#Transform.apply(program, Transform.move_loop_invariant_expressions)
ASTGraph(self.kernels.lower(), "kernels").generate_and_view()
self.code_gen.generate_program(self, program)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment