sPyNNaker neural_modelling 7.1.1
Loading...
Searching...
No Matches
Data Structures | Functions
connection_generator_fixed_post.h File Reference

Fixed-Number-Post (fan-out) Connection generator implementation. More...

#include <log.h>
#include <synapse_expander/rng.h>

Go to the source code of this file.

Data Structures

struct  fixed_post_params
 The parameters that can be copied from SDRAM. More...
 
struct  fixed_post
 The state of this connection generator. More...
 

Functions

static void * connection_generator_fixed_post_initialise (void **region)
 Initialise the fixed-post connection generator.
 
static void connection_generator_fixed_post_free (void *generator)
 Free the fixed-post connection generator.
 
static uint32_t post_random_in_range (rng_t *rng, uint32_t range)
 Generates a uniformly-distributed random number.
 
static bool fixed_post_write (uint32_t pre, uint32_t post, accum weight_scale, accum timestep_per_delay, param_generator_t weight_generator, param_generator_t delay_generator, matrix_generator_t matrix_generator)
 
static bool connection_generator_fixed_post_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-post connection generator.
 

Detailed Description

Fixed-Number-Post (fan-out) Connection generator implementation.

Each post-neuron is connected to exactly n_pre pre-neurons (chosen at random)

Definition in file connection_generator_fixed_post.h.


Data Structure Documentation

◆ fixed_post_params

struct fixed_post_params

The parameters that can be copied from SDRAM.

Definition at line 28 of file connection_generator_fixed_post.h.

Data Fields
uint32_t allow_self_connections Do we allow self connections?
uint32_t with_replacement Do we allow any neuron to be multiply connected by this connector?
uint32_t n_post Number of connections per pre-neuron in total.

◆ fixed_post

struct fixed_post

The state of this connection generator.

This includes the parameters, and the RNG of the connector.

Definition at line 42 of file connection_generator_fixed_post.h.

Data Fields
struct fixed_post_params params Parameters read from SDRAM.

Function Documentation

◆ connection_generator_fixed_post_initialise()

static void * connection_generator_fixed_post_initialise ( void **  region)
static

Initialise the fixed-post connection generator.

Parameters
[in,out]regionRegion 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 53 of file connection_generator_fixed_post.h.

◆ connection_generator_fixed_post_free()

static void connection_generator_fixed_post_free ( void *  generator)
static

Free the fixed-post connection generator.

Parameters
[in]generatorThe data to free

Definition at line 73 of file connection_generator_fixed_post.h.

◆ post_random_in_range()

static uint32_t post_random_in_range ( rng_t rng,
uint32_t  range 
)
static

Generates a uniformly-distributed random number.

Parameters
[in]rngthe RNG to generate with
[in]rangethe (upper, exclusive) limit of the range of random numbers that may be generated. Should be in range 0..65536
Returns
a random integer in the given input range.

Definition at line 84 of file connection_generator_fixed_post.h.

◆ fixed_post_write()

static bool fixed_post_write ( uint32_t  pre,
uint32_t  post,
accum  weight_scale,
accum  timestep_per_delay,
param_generator_t  weight_generator,
param_generator_t  delay_generator,
matrix_generator_t  matrix_generator 
)
static

Definition at line 89 of file connection_generator_fixed_post.h.

◆ connection_generator_fixed_post_generate()

static bool connection_generator_fixed_post_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-post connection generator.

Parameters
[in]generatorThe generator to use to generate connections
[in]pre_slice_startThe start of the slice of the pre-population being generated
[in]pre_slice_countThe number of neurons in the slice of the pre-population being generated
[in]pre_neuron_indexThe index of the neuron in the pre-population being generated
[in]post_slice_startThe start of the slice of the post-population being generated
[in]post_slice_countThe number of neurons in the slice of the post-population being generated
[in]max_row_lengthThe maximum number of connections to generate
[in,out]indicesAn 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 118 of file connection_generator_fixed_post.h.