Enum MachineVersion
- All Implemented Interfaces:
Serializable
,Comparable<MachineVersion>
public enum MachineVersion extends Enum<MachineVersion>
Known types of machine. Properly this should be an open set.
- Author:
- Christian-B
-
Enum Constant Summary
Enum Constants Enum Constant Description EXTENDED_SMALL
Unexpected small board probably created by adding a virtual chip to a 2 by 2 board.FIVE
Single common style 48 chip board.FOUR
Original style 48 chip board.NONE_TRIAD_LARGE
Unexpected combination of common style 48 chips boards not in made up of standard Triads.ONE_THOUSAND_TWO_HUNDRED_BOARD
Assumed Combination of 1200 common style 48 chips boards.ONE_TWENTY_BOARD
Combination of 120 common style 48 chips boards.SIX_HUNDRED_BOARD
Combination of 600 common style 48 chips boards.THREE
Common style 4 chip board.THREE_BOARD
Combination of 3 common style 48 chips boards in a Toroid.TRIAD_NO_WRAPAROUND
Combination of multiple common style 48 chips boards but made up of Triads without wrap-arounds.TRIAD_WITH_HORIZONTAL_WRAP
Combination of multiple common style 48 chips boards but made up of Triads which only wrap-arounds on the Horizontal / X axis.TRIAD_WITH_VERTICAL_WRAP
Combination of multiple common style 48 chips boards but made up of Triads which only wrap-arounds on the Vertical / Y axis.TRIAD_WITH_WRAPAROUND
Unknown combination of common style 48 chips boards but made up of Triads with both wrap-arounds.TWENTYFOUR_BOARD
Combination of 24 common style 48 chips boards.TWO
Original style 4 chip board. -
Field Summary
Fields Modifier and Type Field Description boolean
horizontalWrap
Indicates if this machine is expected to have wrap-arounds on the X axis.Integer
id
Python ID for this version ornull
if no matching ID in python.boolean
isFourChip
Indicates if this machine has exactly 4 chips is a 2 by 2 layout.boolean
isFourtyeightChip
Indicates if this machine has exactly one 48 chip board.boolean
isTriad
Indicates if this board is made up of triads, i.e., one or more groups of three boards in the typical layout.MachineDimensions
machineDimensions
The only possible dimensions for this version ornull
if multiple sizes allowed.boolean
verticalWrap
Indicates if this machine is expected to have wrap-arounds on the Y axis. -
Method Summary
Modifier and Type Method Description static MachineVersion
byId(Integer id)
Converts a python board ID into a MachineVersion.static MachineVersion
bySize(int width, int height)
Calculate the machine version based on the size.static MachineVersion
bySize(MachineDimensions dimensions)
Calculate the machine version based on the size.int
hardwareVersion()
Get the version number of the SpiNN boards in the hardware configuration.static MachineVersion
valueOf(String name)
Returns the enum constant of this type with the specified name.static MachineVersion[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
TWO
Original style 4 chip board. -
THREE
Common style 4 chip board. -
FOUR
Original style 48 chip board. -
FIVE
Single common style 48 chip board. -
THREE_BOARD
Combination of 3 common style 48 chips boards in a Toroid. -
TWENTYFOUR_BOARD
Combination of 24 common style 48 chips boards. -
ONE_TWENTY_BOARD
Combination of 120 common style 48 chips boards. -
SIX_HUNDRED_BOARD
Combination of 600 common style 48 chips boards. -
ONE_THOUSAND_TWO_HUNDRED_BOARD
Assumed Combination of 1200 common style 48 chips boards. -
TRIAD_NO_WRAPAROUND
Combination of multiple common style 48 chips boards but made up of Triads without wrap-arounds.This is typically what spalloc provides when returning part of a larger machine.
-
TRIAD_WITH_WRAPAROUND
Unknown combination of common style 48 chips boards but made up of Triads with both wrap-arounds.All known machine sizes with both wrap-arounds have unique
MachineVersion
s.Note: While this is physically possible with standards boards there is no known case then such a machine would be obtained. The assumption that this version has wrap-arounds is purely based on the size.
-
TRIAD_WITH_HORIZONTAL_WRAP
Combination of multiple common style 48 chips boards but made up of Triads which only wrap-arounds on the Horizontal / X axis.This is possible when spalloc returns a large part of a machine.
-
TRIAD_WITH_VERTICAL_WRAP
Combination of multiple common style 48 chips boards but made up of Triads which only wrap-arounds on the Vertical / Y axis.This is possible when spalloc returns a large part of a machine.
-
NONE_TRIAD_LARGE
Unexpected combination of common style 48 chips boards not in made up of standard Triads.Note: While this is physically possible with standards boards there is no known case then such a machine would be obtained. The assumption that this version does not have wrap-arounds is purely based on the size.
-
EXTENDED_SMALL
Unexpected small board probably created by adding a virtual chip to a 2 by 2 board.
-
-
Field Details
-
id
Python ID for this version ornull
if no matching ID in python. -
isFourChip
public final boolean isFourChipIndicates if this machine has exactly 4 chips is a 2 by 2 layout. -
isFourtyeightChip
public final boolean isFourtyeightChipIndicates if this machine has exactly one 48 chip board. -
horizontalWrap
public final boolean horizontalWrapIndicates if this machine is expected to have wrap-arounds on the X axis. -
verticalWrap
public final boolean verticalWrapIndicates if this machine is expected to have wrap-arounds on the Y axis. -
isTriad
public final boolean isTriadIndicates if this board is made up of triads, i.e., one or more groups of three boards in the typical layout. -
machineDimensions
The only possible dimensions for this version ornull
if multiple sizes allowed.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
byId
Converts a python board ID into a MachineVersion.- Parameters:
id
- Python board version.- Returns:
- Machine version assuming just a single board.
- Throws:
IllegalArgumentException
- If the ID doesn't correspond to a supported version.
-
bySize
Calculate the machine version based on the size.- Parameters:
width
- The width of the machine to find the version for.height
- The height of the machine to find the version for.- Returns:
- A Board version.
- Throws:
IllegalArgumentException
- if the size is not valid.
-
bySize
Calculate the machine version based on the size.- Parameters:
dimensions
- The width and height of the machine to find the version for.- Returns:
- A Board version.
- Throws:
IllegalArgumentException
- if the size is not valid.
-
hardwareVersion
public int hardwareVersion()Get the version number of the SpiNN boards in the hardware configuration.- Returns:
- 2, 3, 4 or 5.
-