32 log_debug(
"One to one connector");
65 UNUSED
void *generator, uint32_t pre_lo, uint32_t pre_hi,
66 uint32_t post_lo, uint32_t post_hi, UNUSED uint32_t post_index,
67 uint32_t post_slice_start, uint32_t post_slice_count,
68 unsigned long accum weight_scale, accum timestep_per_delay,
69 param_generator_t weight_generator, param_generator_t delay_generator,
73 uint32_t post_slice_end = post_slice_start + post_slice_count - 1;
74 if (post_lo > post_slice_end || post_hi < post_slice_start) {
79 uint32_t post_start = max(post_slice_start, post_lo);
80 uint32_t post_end = min(post_slice_end, post_hi);
83 uint32_t offset = post_start - post_lo;
84 uint32_t length = post_end - post_start;
87 uint32_t pre_start = pre_lo + offset;
88 uint32_t pre_end = min(pre_start + length, pre_hi);
90 for (uint32_t pre = pre_start, post = post_start; pre <= pre_end; pre++, post++) {
91 uint32_t local_post = post - post_slice_start;
96 weight, delay, weight_scale)) {
97 log_error(
"Matrix size is wrong!");
static bool connection_generator_one_to_one_generate(void *generator, uint32_t pre_lo, uint32_t pre_hi, uint32_t post_lo, uint32_t post_hi, uint32_t post_index, uint32_t post_slice_start, uint32_t post_slice_count, unsigned long accum weight_scale, accum timestep_per_delay, param_generator_t weight_generator, param_generator_t delay_generator, matrix_generator_t matrix_generator)
Generate connections with the one-to-one connection generator.
static void connection_generator_one_to_one_free(void *generator)
Free the one-to-one connection generator.
static void * connection_generator_one_to_one_initialise(void **region)
Initialise the one-to-one connection generator.
General types associated with generators.
static uint16_t rescale_delay(accum delay, accum timestep_per_delay)
Rescales a delay to account for timesteps and type-converts it.
bool matrix_generator_write_synapse(matrix_generator_t generator, uint32_t pre_index, uint16_t post_index, accum weight, uint16_t delay, unsigned long accum weight_scale)
Write a synapse with a matrix generator.
The data for a matrix generator.
accum param_generator_generate(param_generator_t generator)
Generate value with a parameter generator.
region
spike source array region IDs in human readable form