SpiNNFrontEndCommon 7.3.1
Common support code for user-facing front end systems.
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
merge.h File Reference

How to merge routing table entries. More...

#include "bit_set.h"
#include "../common/routing_table.h"

Go to the source code of this file.

Data Structures

struct  merge_t
 merge struct. entries which can be merged More...
 

Macros

#define FULL   0xffffffff
 the ful key
 
#define EMPTY   0x00000000
 the empty mask
 
#define INIT_SOURCE   0x0
 the init for sources of entries
 
#define INIT_ROUTE   0x0
 the init for routes of entries
 

Functions

static int merge_goodness (merge_t *merge)
 Get the goodness for a merge.
 
static void merge_clear (merge_t *m)
 Clear a merge.
 
static bool merge_init (merge_t *m, uint32_t n_entries_in_table)
 Initialise a merge.
 
static void merge_delete (merge_t *m)
 Destroy a merge.
 
static void merge_add (merge_t *m, unsigned int i)
 Add an entry to the merge.
 
static bool merge_contains (merge_t *m, unsigned int i)
 See if an entry is contained within a merge.
 
static void merge_remove (merge_t *m, unsigned int i)
 Remove an entry from the merge.
 

Detailed Description

How to merge routing table entries.

Definition in file merge.h.


Data Structure Documentation

◆ merge_t

struct merge_t

merge struct. entries which can be merged

Definition at line 26 of file merge.h.

Data Fields
bit_set_t entries Set of entries included in the merge.
key_mask_t key_mask key_mask resulting from the merge
uint32_t route Route taken by entries in the merge.
uint32_t source Collective source of entries in the route.

Macro Definition Documentation

◆ FULL

#define FULL   0xffffffff

the ful key

Definition at line 41 of file merge.h.

◆ EMPTY

#define EMPTY   0x00000000

the empty mask

Definition at line 44 of file merge.h.

◆ INIT_SOURCE

#define INIT_SOURCE   0x0

the init for sources of entries

Definition at line 47 of file merge.h.

◆ INIT_ROUTE

#define INIT_ROUTE   0x0

the init for routes of entries

Definition at line 50 of file merge.h.

Function Documentation

◆ merge_goodness()

static int merge_goodness ( merge_t merge)
static

Get the goodness for a merge.

Parameters
[in]mergethe merge
Returns
the goodness of the merge.

Definition at line 55 of file merge.h.

◆ merge_clear()

static void merge_clear ( merge_t m)
inlinestatic

Clear a merge.

Parameters
[in]mthe merge to clear

Definition at line 61 of file merge.h.

◆ merge_init()

static bool merge_init ( merge_t m,
uint32_t  n_entries_in_table 
)
inlinestatic

Initialise a merge.

Parameters
[in]mthe merge pointer to init
[in]n_entries_in_tablethe possible number of entries in the merge
Returns
whether the merge was initialised

Definition at line 76 of file merge.h.

◆ merge_delete()

static void merge_delete ( merge_t m)
inlinestatic

Destroy a merge.

Parameters
[in]mthe merge to delete

Definition at line 88 of file merge.h.

◆ merge_add()

static void merge_add ( merge_t m,
unsigned int  i 
)
inlinestatic

Add an entry to the merge.

Parameters
[in]mthe merge to add to
[in]ithe entry bit to flag as potential merge-able entry

Definition at line 96 of file merge.h.

◆ merge_contains()

static bool merge_contains ( merge_t m,
unsigned int  i 
)
inlinestatic

See if an entry is contained within a merge.

Parameters
[in]mthe merge to check if a bit is set
[in]ithe bit to check
Returns
true if the bit is set false otherwise.

Definition at line 121 of file merge.h.

◆ merge_remove()

static void merge_remove ( merge_t m,
unsigned int  i 
)
inlinestatic

Remove an entry from the merge.

Parameters
[in]mthe merge to unset a bit from
[in]ithe entry id to unset

Definition at line 129 of file merge.h.