sPyNNaker neural_modelling 7.3.1
Loading...
Searching...
No Matches
Functions
connection_generator.h File Reference

Connection Generator interface. More...

#include <stdint.h>
#include <common-typedefs.h>
#include "param_generator.h"
#include "matrix_generator.h"

Go to the source code of this file.

Functions

connection_generator_t connection_generator_init (uint32_t hash, void **region)
 Initialise a specific connection generator.
 
void connection_generator_free (connection_generator_t generator)
 Finish with a connection generator.
 
bool connection_generator_generate (connection_generator_t 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 a connection generator.
 

Detailed Description

Connection Generator interface.

Definition in file connection_generator.h.

Function Documentation

◆ connection_generator_init()

connection_generator_t connection_generator_init ( uint32_t  hash,
void **  region 
)

Initialise a specific connection generator.

Parameters
[in]hashThe identifier of the generator to initialise
[in,out]regionThe address to read data from; updated to position after data has been read
Returns
An initialised connection generator that can be used with other functions, or NULL if it couldn't be initialised for any reason

Definition at line 114 of file connection_generator.c.

◆ connection_generator_free()

void connection_generator_free ( connection_generator_t  generator)

Finish with a connection generator.

Parameters
[in]generatorThe generator to free

Definition at line 155 of file connection_generator.c.

◆ connection_generator_generate()

bool connection_generator_generate ( connection_generator_t  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 a 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 142 of file connection_generator.c.