data_specification.enums package¶
Submodules¶
data_specification.enums.arithemetic_operation module¶
data_specification.enums.commands module¶
-
class
data_specification.enums.commands.
Commands
(value, exec_function, doc='')¶ Bases:
enum.Enum
Set of opcodes for the spec executor
-
ALIGN_WR_PTR
= 101¶
-
ARITH_OP
= 103¶
-
BLOCK_COPY
= 69¶
-
BREAK
= 0¶
-
BREAK_LOOP
= 82¶
-
CONSTRUCT
= 64¶
-
COPY_PARAM
= 113¶
-
COPY_STRUCT
= 112¶
-
DECLARE_RANDOM_DIST
= 6¶
-
DECLARE_RNG
= 5¶
-
ELSE
= 86¶
-
END_CONSTRUCTOR
= 37¶
-
END_IF
= 87¶
-
END_LOOP
= 83¶
-
END_SPEC
= 255¶
-
END_STRUCT
= 18¶
-
FREE
= 3¶
-
GET_RANDOM_NUMBER
= 7¶
-
GET_WR_PTR
= 99¶
-
IF
= 85¶
-
LOGIC_OP
= 104¶
-
LOOP
= 81¶
-
MV
= 96¶
-
NOP
= 1¶
-
PRINT_STRUCT
= 130¶
-
PRINT_TXT
= 129¶
-
PRINT_VAL
= 128¶
-
READ
= 65¶
-
READ_PARAM
= 115¶
-
REFORMAT
= 106¶
-
RESERVE
= 2¶
-
SET_WR_PTR
= 100¶
-
START_CONSTRUCTOR
= 32¶
-
START_STRUCT
= 16¶
-
STRUCT_ELEM
= 17¶
-
SWITCH_FOCUS
= 80¶
-
WRITE
= 66¶
-
WRITE_ARRAY
= 67¶
-
WRITE_PARAM
= 114¶
-
WRITE_PARAM_COMPONENT
= 116¶
-
WRITE_STRUCT
= 68¶
-
data_specification.enums.condition module¶
data_specification.enums.data_type module¶
-
class
data_specification.enums.data_type.
DataType
¶ Bases:
enum.Enum
Supported data types The first value is an identifier for the enum class; The second value is the size in bytes of the type; The third value is the minimum possible value for the type; The fourth value is the maximum possible value for the type; The fifth value is the scale of the input value to convert it in integer; The sixth value is the pattern to use following the struct package encodings to convert the data in binary format; The seventh value is whether to apply the scaling when converting to SpiNNaker’s binary format. The eighth value is the corresponding numpy type (or None to inhibit direct conversion via numpy, scaled conversion still supported); The ninth value is the text description of the type.
-
FLOAT_32
= 14¶
-
FLOAT_64
= 15¶
-
INT16
= 5¶
-
INT32
= 6¶
-
INT64
= 7¶
-
INT8
= 4¶
-
S015
= 21¶
-
S031
= 22¶
-
S063
= 23¶
-
S07
= 20¶
-
S1615
= 12¶
-
S3231
= 13¶
-
S87
= 11¶
-
U016
= 17¶
-
U032
= 18¶
-
U064
= 19¶
-
U08
= 16¶
-
U1616
= 9¶
-
U3232
= 10¶
-
U88
= 8¶
-
UINT16
= 1¶
-
UINT32
= 2¶
-
UINT64
= 3¶
-
UINT8
= 0¶
-
encode
(value)¶ Encode the Python value for SpiNNaker according to this type.
-
encode_as_int
(value)¶ Returns the value as an integer, according to this type.
-
max
¶
-
min
¶
-
numpy_typename
¶
-
scale
¶
-
size
¶
-
struct_encoding
¶
-
data_specification.enums.logic_operation module¶
data_specification.enums.random_number_generator module¶
Module contents¶
-
class
data_specification.enums.
ArithmeticOperation
(value, operator, doc='')¶ Bases:
enum.Enum
Arithmetic Operations
-
ADD
= 0¶
-
MULTIPLY
= 2¶
-
SUBTRACT
= 1¶
-
-
class
data_specification.enums.
Commands
(value, exec_function, doc='')¶ Bases:
enum.Enum
Set of opcodes for the spec executor
-
ALIGN_WR_PTR
= 101¶
-
ARITH_OP
= 103¶
-
BLOCK_COPY
= 69¶
-
BREAK
= 0¶
-
BREAK_LOOP
= 82¶
-
CONSTRUCT
= 64¶
-
COPY_PARAM
= 113¶
-
COPY_STRUCT
= 112¶
-
DECLARE_RANDOM_DIST
= 6¶
-
DECLARE_RNG
= 5¶
-
ELSE
= 86¶
-
END_CONSTRUCTOR
= 37¶
-
END_IF
= 87¶
-
END_LOOP
= 83¶
-
END_SPEC
= 255¶
-
END_STRUCT
= 18¶
-
FREE
= 3¶
-
GET_RANDOM_NUMBER
= 7¶
-
GET_WR_PTR
= 99¶
-
IF
= 85¶
-
LOGIC_OP
= 104¶
-
LOOP
= 81¶
-
MV
= 96¶
-
NOP
= 1¶
-
PRINT_STRUCT
= 130¶
-
PRINT_TXT
= 129¶
-
PRINT_VAL
= 128¶
-
READ
= 65¶
-
READ_PARAM
= 115¶
-
REFORMAT
= 106¶
-
RESERVE
= 2¶
-
SET_WR_PTR
= 100¶
-
START_CONSTRUCTOR
= 32¶
-
START_STRUCT
= 16¶
-
STRUCT_ELEM
= 17¶
-
SWITCH_FOCUS
= 80¶
-
WRITE
= 66¶
-
WRITE_ARRAY
= 67¶
-
WRITE_PARAM
= 114¶
-
WRITE_PARAM_COMPONENT
= 116¶
-
WRITE_STRUCT
= 68¶
-
-
class
data_specification.enums.
Condition
(value, operator, doc='')¶ Bases:
enum.Enum
Comparison Operations
-
EQUAL
= 0¶
-
GREATER_THAN
= 5¶
-
GREATER_THAN_OR_EQUAL
= 4¶
-
LESS_THAN
= 3¶
-
LESS_THAN_OR_EQUAL
= 2¶
-
NOT_EQUAL
= 1¶
-
-
class
data_specification.enums.
DataType
¶ Bases:
enum.Enum
Supported data types The first value is an identifier for the enum class; The second value is the size in bytes of the type; The third value is the minimum possible value for the type; The fourth value is the maximum possible value for the type; The fifth value is the scale of the input value to convert it in integer; The sixth value is the pattern to use following the struct package encodings to convert the data in binary format; The seventh value is whether to apply the scaling when converting to SpiNNaker’s binary format. The eighth value is the corresponding numpy type (or None to inhibit direct conversion via numpy, scaled conversion still supported); The ninth value is the text description of the type.
-
FLOAT_32
= 14¶
-
FLOAT_64
= 15¶
-
INT16
= 5¶
-
INT32
= 6¶
-
INT64
= 7¶
-
INT8
= 4¶
-
S015
= 21¶
-
S031
= 22¶
-
S063
= 23¶
-
S07
= 20¶
-
S1615
= 12¶
-
S3231
= 13¶
-
S87
= 11¶
-
U016
= 17¶
-
U032
= 18¶
-
U064
= 19¶
-
U08
= 16¶
-
U1616
= 9¶
-
U3232
= 10¶
-
U88
= 8¶
-
UINT16
= 1¶
-
UINT32
= 2¶
-
UINT64
= 3¶
-
UINT8
= 0¶
-
encode
(value)¶ Encode the Python value for SpiNNaker according to this type.
-
encode_as_int
(value)¶ Returns the value as an integer, according to this type.
-
max
¶
-
min
¶
-
numpy_typename
¶
-
scale
¶
-
size
¶
-
struct_encoding
¶
-