SpiNNFrontEndCommon 7.3.1
Common support code for user-facing front end systems.
|
An ordered covering of routing table entries. More...
#include <malloc_extras.h>
#include <debug.h>
#include "aliases.h"
#include "bit_set.h"
#include "merge.h"
#include "../common/routing_table.h"
Go to the source code of this file.
Functions | |
static unsigned int | oc_get_insertion_point (const unsigned int generality) |
Get the index where the routing table entry resulting from a merge should be inserted. | |
static bool | oc_up_check (merge_t *merge, int min_goodness, volatile bool *stop_compressing, bool *changed) |
Remove from a merge any entries which would be covered by being existing entries if they were included in the given merge. | |
static bool | oc_down_check (merge_t *merge, int min_goodness, aliases_t *aliases, bool *failed_by_malloc, volatile bool *stop_compressing) |
Remove entries from a merge such that the merge would not cover existing entries positioned below the merge. | |
static bool | oc_get_best_merge (aliases_t *aliases, merge_t *best, bool *failed_by_malloc, volatile bool *stop_compressing) |
Get the best merge which can be applied to a routing table. | |
static bool | oc_merge_apply (merge_t *merge, aliases_t *aliases, bool *failed_by_malloc) |
Apply a merge to the table against which it is defined. | |
bool | minimise_run (int target_length, bool *failed_by_malloc, volatile bool *stop_compressing) |
Apply the ordered covering algorithm to a routing table. | |
An ordered covering of routing table entries.
Definition in file ordered_covering.h.
Get the index where the routing table entry resulting from a merge should be inserted.
[in] | generality | The number of least-significant bits masked out |
Definition at line 39 of file ordered_covering.h.
|
inlinestatic |
Remove from a merge any entries which would be covered by being existing entries if they were included in the given merge.
[in] | merge | The merge to consider |
[in] | min_goodness | Minimum goodness factor for a merge to be performed |
[in] | stop_compressing | Whether the compressor should stop; points to a variable set by interrupt |
[out] | changed | Whether the merge drops below goodness level |
Definition at line 94 of file ordered_covering.h.
|
static |
Remove entries from a merge such that the merge would not cover existing entries positioned below the merge.
[in] | merge | The merge to eventually apply |
[in] | min_goodness | The minimum number of bits to mask out for removal to be considered |
[in] | aliases | Describes what entries alias what other entries |
[out] | failed_by_malloc | Flag saying if it failed due to running out of memory |
[in] | stop_compressing | Variable saying whether the compressor should stop, set by interrupt |
Definition at line 255 of file ordered_covering.h.
|
inlinestatic |
Get the best merge which can be applied to a routing table.
[in] | aliases | Describes what entries alias what other entries |
[in,out] | best | The best merge found |
[out] | failed_by_malloc | Flag saying failed by memory exhaustion |
[in] | stop_compressing | Variable saying if compression should stop; set by interrupt |
Definition at line 451 of file ordered_covering.h.
|
inlinestatic |
Apply a merge to the table against which it is defined.
[in] | merge | The merge to apply to the routing tables |
[in] | aliases | Describes what entries alias what other entries |
[out] | failed_by_malloc | Flag saying failed by memory exhaustion |
Definition at line 630 of file ordered_covering.h.
Apply the ordered covering algorithm to a routing table.
Minimise the table until either the table is shorter than the target length or no more merges are possible.
[in] | target_length | The length to reach |
[out] | failed_by_malloc | Flag stating that it failed due to malloc |
[out] | stop_compressing | Variable saying if the compressor should stop and return false; set by interrupt DURING the run of this method! |
Definition at line 773 of file ordered_covering.h.