Skip to content

Commit

Permalink
Merge pull request #822 from SpiNNakerManchester/graph_view
Browse files Browse the repository at this point in the history
Graph view
  • Loading branch information
Christian-B authored Jun 8, 2021
2 parents 0dcdaaf + 0ef780c commit 09274ba
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions spinn_front_end_common/interface/abstract_spinnaker_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@
from pacman.executor.injection_decorator import (
clear_injectables, provide_injectables)
from pacman.model.graphs.application import (
ApplicationGraph, ApplicationEdge, ApplicationVertex)
from pacman.model.graphs.machine import MachineGraph, MachineVertex
ApplicationGraph, ApplicationGraphView, ApplicationEdge, ApplicationVertex)
from pacman.model.graphs.machine import (
MachineGraph, MachineGraphView, MachineVertex)
from pacman.model.resources import (
PreAllocatedResourceContainer, ConstantSDRAM)
from pacman import __version__ as pacman_version
Expand Down Expand Up @@ -2465,10 +2466,10 @@ def no_machine_time_steps(self):
@property
def machine_graph(self):
"""
Returns a frozen clone of the machine_graph
Returns a protected view of the machine_graph
:rtype: ~pacman.model.graphs.machine.MachineGraph
"""
return self._machine_graph.clone(frozen=True)
return MachineGraphView(self._machine_graph)

@property
def original_machine_graph(self):
Expand All @@ -2486,12 +2487,12 @@ def original_application_graph(self):

@property
def application_graph(self):
""" The frozen clone of the application graph used to derive the
""" The protected view of the application graph used to derive the
runtime machine configuration.
:rtype: ~pacman.model.graphs.application.ApplicationGraph
"""
return self._application_graph.clone(frozen=True)
return ApplicationGraphView(self._application_graph)

@property
def routing_infos(self):
Expand Down

0 comments on commit 09274ba

Please sign in to comment.