pacman.operations.router_compressors package

Module contents

class pacman.operations.router_compressors.AbstractCompressor(ordered=True, accept_overflow=False)

Bases: object

compress_table(router_table)[source]
Parameters:router_table (UnCompressedMulticastRoutingTable) – Original routing table for a single chip
Returns:Raw compressed routing table entries for the same chip
Return type:list(Entry)
compress_tables(router_tables, progress)[source]

Compress all the unordered routing tables

Tables who start of smaller than target_length are not compressed

Parameters:
Returns:

The compressed but still unordered routing tables

Return type:

MulticastRoutingTables

Raises:

MinimisationFailedError – on failure

class pacman.operations.router_compressors.Entry(key, mask, defaultable, spinnaker_route)

Bases: object

Parameters:
  • key (int) –
  • mask (int) –
  • defaultable (bool) –
  • spinnaker_route (int) –
defaultable
static from_MulticastRoutingEntry(mre)[source]
Parameters:mre (MulticastRoutingEntry) –
Return type:Entry
key
mask
spinnaker_route
to_MulticastRoutingEntry()[source]
Return type:MulticastRoutingEntry
pacman.operations.router_compressors.pair_compressor(ordered=True, accept_overflow=False, verify=False)
Parameters:
  • accept_overflow (bool) – A flag which should only be used in testing to stop raising an exception if result is too big
  • verify (bool) – If set to true will verify the length before returning
Return type:

MulticastRoutingTables

class pacman.operations.router_compressors.RangeCompressor

Bases: object

compress_table(uncompressed)[source]

Compresses all the entries for a single table.

Compressed the entries for this unordered table returning a new table with possibly fewer entries

Parameters:uncompressed (UnCompressedMulticastRoutingTable) – Original Routing table for a single chip
Returns:Compressed routing table for the same chip
Return type:list(Entry)
static cut_off(key, power)[source]
static next_power(number)[source]
pacman.operations.router_compressors.range_compressor(accept_overflow=True)
Parameters:
  • router_tables (MulticastRoutingTables) –
  • accept_overflow (bool) – A flag which should only be used in testing to stop raising an exception if result is too big
Return type:

MulticastRoutingTables