Skip to content

Commit

Permalink
Remove redundant methods
Browse files Browse the repository at this point in the history
  • Loading branch information
phschaad committed Aug 29, 2023
1 parent dc9510e commit 5e712c6
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions dace/sdfg/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -2077,15 +2077,8 @@ def add_state(self, label=None, is_start_block=False, parent_sdfg=None) -> SDFGS
self.add_node(state, is_start_block=is_start_block)
return state

# =============================================================================
# = Graph traversal methods ===================================================
# =============================================================================

#def all_nodes_recursive(self) -> Iterator[Tuple[SomeNodeT, SomeGraphT]]:
# for node in self.nodes():
# yield node, self
# if isinstance(node, (ScopeBlock, SDFGState)):
# yield from node.all_nodes_recursive()
###################################################################
# Traversal methods

def all_cfgs_recursive(self, recurse_into_sdfgs=True) -> Iterator['ControlFlowGraph']:
""" Iterate over this and all nested CFGs. """
Expand All @@ -2112,6 +2105,9 @@ def all_states_recursive(self) -> Iterator[SDFGState]:
elif isinstance(block, ControlFlowGraph):
yield from block.all_states_recursive()

###################################################################
# Getters & setters, overrides

@property
def start_block(self):
""" Returns the starting block of this ControlFlowGraph. """
Expand Down Expand Up @@ -2176,12 +2172,6 @@ def to_json(self, parent=None):
graph_json.update(block_json)
return graph_json

#def all_nodes_recursive(self):
# for node in self.nodes():
# yield node, self
# if isinstance(node, (ScopeBlock, BlockGraphView)):
# yield from node.all_nodes_recursive()

def __str__(self):
return ControlFlowBlock.__str__(self)

Expand Down

0 comments on commit 5e712c6

Please sign in to comment.