pacman.model.graphs.application.abstract package

Module contents

class pacman.model.graphs.application.abstract.AbstractOneAppOneMachineVertex(machine_vertex, label, n_atoms=1)

Bases: pacman.model.graphs.application.ApplicationVertex

An application vertex that has a fixed singleton MachineVertex.

  • machine_vertex (MachineVertex) – The fixed machine vertex.
  • label (str) – The optional name of the vertex.

Provides access to the machine vertex at all times

Return type:MachineVertex

The number of atoms in the vertex.

Return type:int

Adds the machine vertex to the iterable returned by machine_vertices

Parameters:machine_vertex (MachineVertex) – A pointer to a machine_vertex

Forget all machine vertices in the application vertex, and reset the splitter (if any).

class pacman.model.graphs.application.abstract.Abstract2DDeviceVertex

Bases: object

A helper for 2D input devices.


This assumes that the input keys will contain a field for each of the X and Y dimensions with X field in the LSBs and the Y field in the next adjacent bits. If the fields are in different places, override the methods: _source_x_shift, _source_y_shift, _source_x_mask and _source_y_mask. If the key has bits in addition to the X and Y values, you can also override _key_shift.


The “shape” of the atoms in the vertex i.e. how the atoms are split between the dimensions of the vertex. By default everything is 1-dimensional, so the value will be a 1-tuple but can be overridden by a vertex that supports multiple dimensions.

Return type:tuple(int, ..)