SpiNNFrontEndCommon 7.3.1
Common support code for user-facing front end systems.
|
Utilities for a single routing table. More...
Go to the source code of this file.
Data Structures | |
struct | key_mask_t |
Holds key and mask. More... | |
struct | entry_t |
Holds data for a routing table entry. More... | |
struct | table_t |
Holds a routing table description. More... | |
Functions | |
entry_t * | routing_table_get_entry (uint32_t entry_id_to_find) |
Gets a pointer to where this entry is stored. | |
bool | routing_table_get_entries (uint32_t start_entry, uint32_t n_entries, entry_t *output) |
Gets a pointer to several entries. | |
void | routing_table_wait_for_last_transfer (void) |
Waits for the last transfer from routing_table_get_entries to complete. | |
int | routing_table_get_n_entries (void) |
Get the number of entries in the routing table. | |
void | routing_table_remove_from_size (int size_to_remove) |
updates table stores accordingly. | |
static void | routing_table_put_entry (const entry_t *entry, int index) |
Write an entry to a specific index. | |
static void | routing_table_copy_entry (int new_index, int old_index) |
Copy an entry from one index to another. | |
static void | swap_entries (int a, int b) |
Swap a pair of entries at the given indices. | |
static uint32_t | key_mask_get_xs (key_mask_t km) |
Get a mask of the Xs in a key_mask. | |
static unsigned int | key_mask_count_xs (key_mask_t km) |
Get a count of the Xs in a key_mask. | |
static bool | key_mask_intersect (key_mask_t a, key_mask_t b) |
Determine if two key_masks would match any of the same keys. | |
static key_mask_t | key_mask_merge (key_mask_t a, key_mask_t b) |
Generate a new key-mask which is a combination of two other key_masks. | |
Utilities for a single routing table.
Definition in file routing_table.h.
struct key_mask_t |
Holds key and mask.
Definition at line 25 of file routing_table.h.
Data Fields | ||
---|---|---|
uint32_t | key | Key for the key_mask. |
uint32_t | mask | Mask for the key_mask. |
struct entry_t |
Holds data for a routing table entry.
Definition at line 34 of file routing_table.h.
Data Fields | ||
---|---|---|
key_mask_t | key_mask | Key and mask. |
uint32_t | route | Routing direction. |
uint32_t | source | Source of packets arriving at this entry. |
struct table_t |
Holds a routing table description.
Definition at line 46 of file routing_table.h.
Data Fields | ||
---|---|---|
uint32_t | size | Number of entries in the table. |
entry_t | entries[] | Entries in the table. |
Gets a pointer to where this entry is stored.
Will not check if there is an entry with this id but will RTE if the id is too large
[in] | entry_id_to_find | Id of entry to find pointer to |
Definition at line 110 of file rt_single.h.
Gets a pointer to several entries.
[in] | start_entry | The first entry to get |
[in] | n_entries | The number of entries to get |
[out] | output | Where to put the entries read - must have enough space! |
Definition at line 176 of file rt_single.h.
Waits for the last transfer from routing_table_get_entries to complete.
Returns immediately if the last transfer is already done
Definition at line 195 of file rt_single.h.
Get the number of entries in the routing table.
Definition at line 102 of file rt_single.h.
updates table stores accordingly.
will RTE if this causes the total entries to become negative.
[in] | size_to_remove | the amount of size to remove from the table sets |
Definition at line 106 of file rt_single.h.
Write an entry to a specific index.
[in] | entry | The entry to write |
[in] | index | Where to write it. |
Definition at line 86 of file routing_table.h.
Copy an entry from one index to another.
[in] | new_index | Where to copy to |
[in] | old_index | Where to copy from |
Definition at line 97 of file routing_table.h.
Swap a pair of entries at the given indices.
[in] | a | The first index where an entry is |
[in] | b | The second index where an entry is |
Definition at line 105 of file routing_table.h.
|
inlinestatic |
Get a mask of the Xs in a key_mask.
[in] | km | the key mask to get as xs |
Definition at line 123 of file routing_table.h.
|
inlinestatic |
Get a count of the Xs in a key_mask.
[in] | km | the key mask struct to count |
Definition at line 131 of file routing_table.h.
|
inlinestatic |
Determine if two key_masks would match any of the same keys.
[in] | a | key mask struct a |
[in] | b | key mask struct b |
Definition at line 140 of file routing_table.h.
|
inlinestatic |
Generate a new key-mask which is a combination of two other key_masks.
c := a | b
[in] | a | the first key mask struct |
[in] | b | the second key mask struct |
Definition at line 149 of file routing_table.h.