max_atoms = incoming_edge.pre_vertex.n_atoms
// Get the number of likely vertices
n_machine_vertices = int(math.ceil(
float(incoming_edge.pre_vertex.n_atoms) /
float(max_atoms)))
n_atoms_per_machine_vertex = int(math.ceil(
float(incoming_edge.pre_vertex.n_atoms) /
n_machine_vertices))
After Change
n_machine_vertices = len(slices)
// TODO im sure this can be merged into the max function. but meh
slice_atoms = list()
for vertex_slice in slices:
slice_atoms.append(vertex_slice.n_atoms)
n_atoms_per_machine_vertex = max(slice_atoms)
if isinstance(incoming_edge.pre_vertex, DelayExtensionVertex):
n_atoms_per_machine_vertex *= \
incoming_edge.pre_vertex.n_delay_stages