20typedef int16_t lc_weight_t;
23typedef int16_t lc_dim_t;
62static inline uint32_t div_by_const(uint32_t i,
div_const d) {
63 uint32_t t1 = (i * d.m) >> 16;
64 uint32_t isubt1 = (i - t1) >> d.sh1;
65 return (t1 + isubt1) >> d.sh2;
68static inline uint32_t get_core_id(uint32_t spike,
key_info k_info) {
72static inline uint32_t get_local_id(uint32_t spike,
key_info k_info) {
74 uint32_t local = spike & local_mask;
Structure for constants for precise constant integer division (see div_by_const)
uint32_t n_colour_bits
The number of bits of key used for colour (0 if no colour)
uint32_t start
The index into connectors for this entry.
uint32_t count
The number of entries in connectors for this entry.
uint32_t key
The key to match against the incoming message.
uint32_t mask_shift
The shift to apply to the key to get the core part.
uint32_t mask
The mask to select the relevant bits of key for matching.
uint32_t core_mask
The mask to apply to the key once shifted to get the core index.
A coordinate in terms of rows and columns (y and x)
A shape in terms of height and width.