Fixed-Total-Number (Multapse) Connection generator implementation.
More...
Go to the source code of this file.
|
static void * | connection_generator_fixed_total_initialise (void **region) |
| Draw from a binomial distribution i.e. with replacement.
|
|
static void | connection_generator_fixed_total_free (void *generator) |
| Free the fixed-total connection generator.
|
|
static uint32_t | random_in_range (rng_t *rng, uint32_t range) |
|
static void | fixed_total_next (uint32_t *pre, uint32_t *post, uint32_t pre_lo, uint32_t pre_hi) |
|
static bool | connection_generator_fixed_total_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 fixed-total connection generator.
|
|
Fixed-Total-Number (Multapse) Connection generator implementation.
Definition in file connection_generator_fixed_total.h.
◆ fixed_total_params
struct fixed_total_params |
The parameters that can be copied from SDRAM.
Definition at line 27 of file connection_generator_fixed_total.h.
Data Fields |
uint32_t |
allow_self_connections |
|
uint32_t |
with_replacement |
|
uint32_t |
n_synapses_total |
|
◆ fixed_total
◆ connection_generator_fixed_total_initialise()
static void * connection_generator_fixed_total_initialise |
( |
void ** |
region | ) |
|
|
static |
Draw from a binomial distribution i.e. with replacement.
- Parameters
-
[in] | n | The number of times the experiment is run |
[in] | N | The number of items in the bag |
[in] | K | The number of items that are valid |
[in] | rng | The uniform random number generator |
- Returns
- The number of times a valid item was drawn
Draw from a hyper-geometric distribution i.e. without replacement
- Parameters
-
[in] | n | The number of times the experiment is run |
[in] | N | The number of items in the bag at the start |
[in] | K | The number of valid items in the bag at the start |
[in] | rng | The uniform random number generator |
- Returns
- The number of times a valid item was drawn
Initialise the fixed-total connection generator
- Parameters
-
[in,out] | region | Region to read parameters from. Should be updated to position just after parameters after calling. |
- Returns
- A data item to be passed in to other functions later on
Definition at line 100 of file connection_generator_fixed_total.h.
◆ connection_generator_fixed_total_free()
static void connection_generator_fixed_total_free |
( |
void * |
generator | ) |
|
|
static |
◆ random_in_range()
static uint32_t random_in_range |
( |
rng_t * |
rng, |
|
|
uint32_t |
range |
|
) |
| |
|
static |
◆ fixed_total_next()
static void fixed_total_next |
( |
uint32_t * |
pre, |
|
|
uint32_t * |
post, |
|
|
uint32_t |
pre_lo, |
|
|
uint32_t |
pre_hi |
|
) |
| |
|
static |
◆ connection_generator_fixed_total_generate()
static bool connection_generator_fixed_total_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 |
|
) |
| |
|
static |
Generate connections with the fixed-total connection generator.
- Parameters
-
[in] | generator | The generator to use to generate connections |
[in] | pre_slice_start | The start of the slice of the pre-population being generated |
[in] | pre_slice_count | The number of neurons in the slice of the pre-population being generated |
[in] | pre_neuron_index | The index of the neuron in the pre-population being generated |
[in] | post_slice_start | The start of the slice of the post-population being generated |
[in] | post_slice_count | The number of neurons in the slice of the post-population being generated |
[in] | max_row_length | The maximum number of connections to generate |
[in,out] | indices | An array into which the core-relative post-indices should be placed. This will be initialised to be max_row_length in size |
- Returns
- The number of connections generated
Definition at line 177 of file connection_generator_fixed_total.h.