pacman.model.partitioner_interfaces package


pacman.model.partitioner_interfaces.abstract_slices_connect module

Module contents

class pacman.model.partitioner_interfaces.AbstractSlicesConnect

Bases: object

An object that can check if a pre-slice and a post-slice could connect.

Typically used to determine if a Machine Edge should be created by checking that at least one of the indexes in the source slice could connect to at least one of the indexes in the destination slice.

could_connect(src_machine_vertex, dest_machine_vertex)[source]

Determine if there is a chance that one of the indexes in the pre-slice could connect to at least one of the indexes in the post-slice.


This method should never return a false negative, but may return a false positives


True if a connection could be possible

Return type:


class pacman.model.partitioner_interfaces.AbstractSplitterPartitioner

Bases: object

Splitter API to allow other Partitioner’s to add more stuff to the edge creation process.

This makes sure that the methods the superclass expects to be there are not removed.

class pacman.model.partitioner_interfaces.LegacyPartitionerAPI

Bases: object

API used by the vertices which dont have their own splitters but use what master did before the self partitioning stuff came to be.

static abstract_methods()[source]

Exposes the abstract methods and properties defined in this class.

:rtype frozenset(str)

create_machine_vertex(vertex_slice, sdram, label=None, constraints=None)[source]

Create a machine vertex from this application vertex.

  • vertex_slice (Slice) – The slice of atoms that the machine vertex will cover.
  • sdram (resourcesAbstractSDRAM) – The sdram used by the machine vertex.
  • label (str or None) – human readable label for the machine vertex
  • constraints (iterable(AbstractConstraint)) – Constraints to be passed on to the machine vertex.

The created machine vertex

Return type:



Get the separate sdram requirements for a range of atoms.

Parameters:vertex_slice (Slice) – the low value of atoms to calculate resources from
Return type:AbstractSDRAM

The number of atoms in the vertex

Returns:The number of atoms
Return type:int