spinn_front_end_common.interface.buffer_management.buffer_models package¶
Module contents¶
-
class
spinn_front_end_common.interface.buffer_management.buffer_models.
AbstractReceiveBuffersToHost
[source]¶ Bases:
object
Indicates that this
MachineVertex
can receive buffers.
-
class
spinn_front_end_common.interface.buffer_management.buffer_models.
AbstractSendsBuffersFromHost
[source]¶ Bases:
object
A vertex that sends buffers of keys to be transmitted at given timestamps in the simulation.
-
buffering_input
()[source]¶ Return True if the input of this vertex is to be buffered.
Return type: bool
-
get_next_key
(region)[source]¶ Get the next key in the given region.
Parameters: region (int) – The region to get the next key from Returns: The next key, or None if there are no more keys Return type: int
-
get_next_timestamp
(region)[source]¶ Get the next timestamp at which there are still keys to be sent for the given region.
Parameters: region (int) – The region to get the timestamp for Returns: The timestamp of the next available keys Return type: int
-
get_region_buffer_size
(region)[source]¶ Get the size of the buffer to be used in SDRAM on the machine for the region in bytes.
Parameters: region (int) – The region to get the buffer size of Returns: The size of the buffer space in bytes Return type: int
-
get_regions
()[source]¶ Get the set of regions for which there are keys to be sent.
Returns: Iterable of region IDs Return type: iterable(int)
-
is_empty
(region)[source]¶ Return true if there are no spikes to be buffered for the specified region.
Parameters: region (int) – The region to get the next key from Returns: Whether there are no keys to send for the region Return type: bool
-
is_next_key
(region, timestamp)[source]¶ Determine if there are still keys to be sent at the given timestamp for the given region.
Parameters: Returns: Whether there are more keys to send for the parameters
Return type:
-
-
class
spinn_front_end_common.interface.buffer_management.buffer_models.
SendsBuffersFromHostPreBufferedImpl
[source]¶ Bases:
spinn_front_end_common.interface.buffer_management.buffer_models.abstract_sends_buffers_from_host.AbstractSendsBuffersFromHost
Implementation of
AbstractReceiveBuffersToHost
that uses an existing set of buffers for the details.-
buffering_input
()[source]¶ Return True if the input of this vertex is to be buffered.
Return type: bool
-
get_next_key
(region)[source]¶ Get the next key in the given region.
Parameters: region (int) – The region to get the next key from Returns: The next key, or None if there are no more keys Return type: int
-
get_next_timestamp
(region)[source]¶ Get the next timestamp at which there are still keys to be sent for the given region.
Parameters: region (int) – The region to get the timestamp for Returns: The timestamp of the next available keys Return type: int
-
get_regions
()[source]¶ Get the set of regions for which there are keys to be sent.
Returns: Iterable of region IDs Return type: iterable(int)
-
is_empty
(region)[source]¶ Return true if there are no spikes to be buffered for the specified region.
Parameters: region (int) – The region to get the next key from Returns: Whether there are no keys to send for the region Return type: bool
-
is_next_key
(region, timestamp)[source]¶ Determine if there are still keys to be sent at the given timestamp for the given region.
Parameters: Returns: Whether there are more keys to send for the parameters
Return type:
-
is_next_timestamp
(region)[source]¶ Determine if there is another timestamp with data to be sent.
Parameters: region (int) – The region to determine if there is more data for Returns: Whether there is more data Return type: bool
-
rewind
(region)[source]¶ Rewinds the internal buffer in preparation of re-sending the spikes.
Parameters: region (int) – The region to rewind
-
send_buffers
¶ The buffer for each region that has keys to send.
Return type: dict(int, BufferedSendingRegion)
-