Example #1
0
def find_tasklet_by_connector(sdfg: SDFG, name: str):
    for node, _ in sdfg.start_state.all_nodes_recursive():
        if name in node.in_connectors:
            return node
        elif name in node.out_connectors:
            return node

    raise NodeNotFoundError(f'Could not find connector "{name}"')
Example #2
0
def find_map_entry(sdfg: SDFG):
    for node, _ in sdfg.start_state.all_nodes_recursive():
        if isinstance(node, nodes.MapEntry):
            return node

    raise NodeNotFoundError(f'Could not find map entry')