spinn_front_end_common.interface.buffer_management.storage_objects package¶
Module contents¶
-
class
spinn_front_end_common.interface.buffer_management.storage_objects.
BufferedSendingRegion
[source]¶ Bases:
object
A set of keys to be sent at given timestamps for a given region of data.
Note
Keys must be added in timestamp order or else an exception will be raised.
-
get_n_keys
(timestamp)[source]¶ Get the number of keys for a given timestamp.
Parameters: timestamp – the time stamp to check if there’s still keys to transmit
-
is_next_key
(timestamp)[source]¶ Determine if there is another key for the given timestamp.
Parameters: timestamp (bool) – the time stamp to check if there’s still keys to transmit
-
is_next_timestamp
¶ Whether the region is empty.
Returns: True if the region is empty, false otherwise. Return type: bool
-
-
class
spinn_front_end_common.interface.buffer_management.storage_objects.
BuffersSentDeque
(region, sent_stop_message=False, n_sequences_per_tranmission=64)[source]¶ Bases:
object
A tracker of buffers sent / to send for a region
Parameters: -
add_message_to_send
(message)[source]¶ Add a message to send. The message is converted to a sequenced message.
Parameters: message (AbstractEIEIOMessage) – The message to be added
-
is_full
¶ Whether the number of messages sent is at the limit for the sequencing system.
Return type: bool
-
messages
¶ The messages that have been added to the set.
Return type: iterable(HostSendSequencedData)
-
update_last_received_sequence_number
(last_received_sequence_no)[source]¶ Updates the last received sequence number. If the sequence number is within the valid window, packets before the sequence number within the window are removed, and the last received sequence number is updated, thus moving the window for the next call. If the sequence number is not within the valid window, it is assumed to be invalid and so is ignored.
Parameters: last_received_sequence_no (int) – The new sequence number Returns: True if update went ahead, False if it was ignored Return type: bool
-
-
class
spinn_front_end_common.interface.buffer_management.storage_objects.
BufferDatabase
(database_file=None, *, read_only=False, row_factory=<class 'sqlite3.Row'>, text_factory=<class 'memoryview'>)[source]¶ Bases:
spinn_front_end_common.utilities.base_database.BaseDatabase
Specific implementation of the Database for SQLite 3.
There should only ever be a single Database Object in use at any time. In the case of application_graph_changed the first should closed and a new one created.
If 2 database objects where opened with the database_file they hold the same data. Unless someone else deletes that file.
Note
Not thread safe on the same database file! Threads can access different DBs just fine.
Parameters: database_file (str) – The name of a file that contains (or will contain) an SQLite database holding the data. If omitted the default location will be used. -
clear_region
(x, y, p, region)[source]¶ Clears the data for a single region.
Note
This method loses information!
Parameters: Returns: True if any region was changed
Return type:
-
get_region_data
(x, y, p, region)[source]¶ Get the data stored for a given region of a given core.
Parameters: Returns: A buffer containing all the data received during the simulation, and a flag indicating if any data was missing.
Note
Implementations should not assume that the total buffer is necessarily shorter than 1GB.
Return type:
-