pacman.operations.rigged_algorithms package¶
Submodules¶
pacman.operations.rigged_algorithms.hilbert_placer module¶
pacman.operations.rigged_algorithms.hilbert_state module¶
-
class
pacman.operations.rigged_algorithms.hilbert_state.
HilbertState
(xpos=0, ypos=0, xchange=1, ychange=0)[source]¶ Bases:
object
A mutable self object for the Hilbert placer algorithm.
Parameters: - xpos (int) – the x coordinate on the generated curve
- ypos (int) – the y coordinate on the generated curve
- xchange (int) – the change in x coordinate on the generated curve
- ychange (int) – the change in y coordinate on the generated curve
-
move_forward
()[source]¶ Move forward in the generation of a Hilbert curve
Returns: the x,y coordinates on the generated curve
-
turn_left
(angle)[source]¶ Turn left in the generation of a Hilbert curve
Parameters: angle (int) – determines the direction in which the curve turns Returns: the x,y coordinates on the generated curve
-
turn_right
(angle)[source]¶ Turn right in the generation of a Hilbert curve
Parameters: angle (int) – determines the direction in which the curve turns Returns: the x,y coordinates on the generated curve
-
x_pos
¶
-
y_pos
¶
pacman.operations.rigged_algorithms.isomorph_check module¶
-
class
pacman.operations.rigged_algorithms.isomorph_check.
IsomorphicChecker
[source]¶ Bases:
object
A short algorithm to check if there is an isomorphism of the placement of vertices by two separate placement algorithms. One of the algorithms must output to memory placements_copy in its method and <param_type>MemoryPlacements2</param_type> in algorithms_metadata.xml.
-
check
(placements, placements_copy)[source]¶ Checks if the placements on each processor are the same for two placement algorithms.
Parameters: - placements (
pacman.model.placements.Placements
) – Placements of vertices on the machine - placements_copy (
pacman.model.placements.Placements
) – memory copy of placements of vertices on the machine
Returns: True if the placements are the same
Return type: bool
- placements (
-
pacman.operations.rigged_algorithms.random_placer module¶
Module contents¶
-
class
pacman.operations.rigged_algorithms.
HilbertPlacer
[source]¶ Bases:
object
A simple placing algorithm using the Hilbert space-filling curve, translated from RIG.
-
class
pacman.operations.rigged_algorithms.
HilbertState
(xpos=0, ypos=0, xchange=1, ychange=0)[source]¶ Bases:
object
A mutable self object for the Hilbert placer algorithm.
Parameters: - xpos (int) – the x coordinate on the generated curve
- ypos (int) – the y coordinate on the generated curve
- xchange (int) – the change in x coordinate on the generated curve
- ychange (int) – the change in y coordinate on the generated curve
-
move_forward
()[source]¶ Move forward in the generation of a Hilbert curve
Returns: the x,y coordinates on the generated curve
-
turn_left
(angle)[source]¶ Turn left in the generation of a Hilbert curve
Parameters: angle (int) – determines the direction in which the curve turns Returns: the x,y coordinates on the generated curve
-
turn_right
(angle)[source]¶ Turn right in the generation of a Hilbert curve
Parameters: angle (int) – determines the direction in which the curve turns Returns: the x,y coordinates on the generated curve
-
x_pos
¶
-
y_pos
¶
-
class
pacman.operations.rigged_algorithms.
IsomorphicChecker
[source]¶ Bases:
object
A short algorithm to check if there is an isomorphism of the placement of vertices by two separate placement algorithms. One of the algorithms must output to memory placements_copy in its method and <param_type>MemoryPlacements2</param_type> in algorithms_metadata.xml.
-
check
(placements, placements_copy)[source]¶ Checks if the placements on each processor are the same for two placement algorithms.
Parameters: - placements (
pacman.model.placements.Placements
) – Placements of vertices on the machine - placements_copy (
pacman.model.placements.Placements
) – memory copy of placements of vertices on the machine
Returns: True if the placements are the same
Return type: bool
- placements (
-