pacman.model.graphs.application.abstract package

Module contents

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

Bases: pacman.model.graphs.application.application_vertex.ApplicationVertex

An application vertex that has a fixed singleton MachineVertex.

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

Provides access to the machine vertex at all times

Return type:MachineVertex
n_atoms

The number of atoms in the vertex.

Return type:int
remember_machine_vertex(machine_vertex)[source]

Adds the machine vertex to the iterable returned by machine_vertices

Parameters:machine_vertex (MachineVertex) – A pointer to a machine_vertex
reset()[source]

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

class pacman.model.graphs.application.abstract.Abstract2DDeviceVertex[source]

Bases: object

A helper for 2D input devices.

Note

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.