def build(self,cpu): g = graph() nodes = dict([(b.name,node(b.build(cpu))) for b in self.nodes]) for l in [link(nodes[n1],nodes[n2]) for (n1,n2) in self.links]: g.add_edge(l) return g
def __init__(self, prog): self.prog = prog self.G = cfg.graph() SIG_NODE.sender(self.G.add_vertex) SIG_EDGE.sender(self.G.add_edge)
def build(self, cpu): g = graph() nodes = dict([(b.name, node(b.build(cpu))) for b in self.nodes]) for l in [link(nodes[n1], nodes[n2]) for (n1, n2) in self.links]: g.add_edge(l) return g
def __init__(self,prog): self.prog = prog self.G = cfg.graph()