Skip to content

Commit e943a57

Browse files
committed
Even things out even more
1 parent a3edee7 commit e943a57

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

spynnaker/pyNN/extra_algorithms/splitter_components/splitter_population_vertex_neurons_synapses.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -539,21 +539,20 @@ def get_source_specific_in_coming_vertices(
539539
sources_per_vertex = max(1, int(2 ** math.ceil(math.log2(
540540
n_sources / n_synapse_cores))))
541541

542-
# Start on a different index each time to "even things out"
543-
index = self.__next_synapse_index
544-
self.__next_synapse_index = (
545-
(self.__next_synapse_index + 1) % n_synapse_cores)
546542
result: List[Tuple[MachineVertex, List[MachineVertex]]] = list()
547543
for start in range(0, n_sources, sources_per_vertex):
548544
end = min(start + sources_per_vertex, n_sources)
549545
source_range = sources[start:end]
550-
for s_vertex in self.__incoming_vertices[index]:
546+
for s_vertex in self.__incoming_vertices[self.__next_synapse_index]:
551547
targets_filtered = targets[s_vertex]
552548
filtered = [s for s in source_range
553549
if (s in targets_filtered or
554550
s.app_vertex in targets_filtered)]
555551
result.append((s_vertex, filtered))
556-
index = (index + 1) % n_synapse_cores
552+
553+
# Start on a different index each time to "even things out"
554+
self.__next_synapse_index = (
555+
(self.__next_synapse_index + 1) % n_synapse_cores)
557556

558557
return result
559558

0 commit comments

Comments
 (0)