Skip to content

Commit

Permalink
Fix here too
Browse files Browse the repository at this point in the history
  • Loading branch information
rowleya committed Nov 3, 2023
1 parent ea7491a commit 493fe1f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pacman/model/routing_info/app_vertex_routing_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,25 @@ def __init__(
self.__max_machine_index = max_machine_index

def merge_machine_entries(self, entries: List[Tuple[
MachineVertex, str, MulticastRoutingEntry,
MulticastRoutingEntry,
MachineVertexRoutingInfo]]) -> Iterable[MulticastRoutingEntry]:
"""
Merge the machine entries.
:param entries:
The entries to merge
:type entries:
list(tuple(MachineVertex, str,
~spinn_machine.MulticastRoutingEntry, VertexRoutingInfo))
list(tuple(
~spinn_machine.MulticastRoutingEntry, VertexRoutingInfo))
:rtype: iterable(~spinn_machine.MulticastRoutingEntry)
"""
n_entries = len(entries)
(_, _, _, last_r_info) = entries[-1]
(_, last_r_info) = entries[-1]
is_last = last_r_info.index == self.__max_machine_index
i = 0
while i < n_entries:
# The maximum number of next entries
(_, _, entry, r_info) = entries[i]
(entry, r_info) = entries[i]
next_entries = self.__n_sequential_entries(r_info.index, n_entries)

# If that is OK, we can just use them
Expand All @@ -92,7 +92,7 @@ def merge_machine_entries(self, entries: List[Tuple[
while entries_to_go > 0:
next_entries = 2 ** int(math.log2(entries_to_go))
mask = self.__group_mask(next_entries)
(_, _, entry, r_info) = entries[i]
(entry, r_info) = entries[i]
yield MulticastRoutingEntry(
r_info.key, mask,
defaultable=entry.defaultable,
Expand Down

0 comments on commit 493fe1f

Please sign in to comment.