pacman.model.graphs.common package¶
Submodules¶
pacman.model.graphs.common.edge_traffic_type module¶
- class pacman.model.graphs.common.edge_traffic_type.EdgeTrafficType(value)[source]¶
Bases:
IntEnum
Indicates the traffic type of an Edge in a graph.
- FIXED_ROUTE = 2¶
Edge communicates using fixed route packets
- MULTICAST = 1¶
Edge communicates using multicast packets
- SDRAM = 3¶
Edge communicates using shared memory
Module contents¶
- class pacman.model.graphs.common.ChipAndCore(x, y, p=None)[source]¶
Bases:
object
A constraint to place a vertex on a specific chip and, optionally, a specific core on that chip.
- Parameters:
- class pacman.model.graphs.common.Slice(lo_atom, hi_atom, shape=None, start=None)[source]¶
Bases:
Slice
Represents a slice of a vertex.
- Attr int lo_atom:
The lowest atom represented in the slice.
- Attr int hi_atom:
The highest atom represented in the slice.
- Attr int n_atoms:
The number of atoms represented by the slice.
- Attr slice as_slice:
This slice represented as a slice object (for use in indexing lists, arrays, etc.)
- Attr tuple(int,…) shape:
The shape of the atoms over multiple dimensions. By default the shape will be 1-dimensional.
- Attr tuple(int,…) start:
The start coordinates of the slice. By default this will be lo_atom in 1 dimension.
Create a new Slice object.
- Parameters:
- Raises:
PacmanValueError – If the bounds of the slice are invalid.
- property as_slice¶
- property end¶
The end positions of the slice in each dimension.
- get_raster_ids(atoms_shape)[source]¶
Get the IDs of the atoms in the slice as they would appear in a “raster scan” of the atoms over the whole shape.