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

Interface for matrix generation. More...

#include <common-typedefs.h>

Go to the source code of this file.

Functions

matrix_generator_t matrix_generator_init (uint32_t hash, void **region, void *synaptic_matrix)
 Initialise a specific matrix generator.
 
void matrix_generator_free (matrix_generator_t generator)
 Finish with a matrix generator.
 
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.
 

Detailed Description

Interface for matrix generation.

Definition in file matrix_generator.h.

Function Documentation

◆ matrix_generator_init()

matrix_generator_t matrix_generator_init ( uint32_t  hash,
void **  region,
void *  synaptic_matrix 
)

Initialise a specific matrix 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
[in]synaptic_matrixThe address of the base of the synaptic matrix
Returns
An initialised matrix generator that can be used with other functions, or NULL if it couldn't be initialised for any reason

Definition at line 99 of file matrix_generator.c.

◆ matrix_generator_free()

void matrix_generator_free ( matrix_generator_t  generator)

Finish with a matrix generator.

Parameters
[in]generatorThe generator to free

Definition at line 127 of file matrix_generator.c.

◆ matrix_generator_write_synapse()

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.

Parameters
[in]generatorThe generator to use to generate the matrix
[in]pre_indexThe index of the pre-neuron relative to the start of the matrix
[in]post_indexThe index of the post-neuron on this core
[in]weightThe weight of the synapse in raw form
[in]delayThe delay of the synapse in time steps
[in]weight_scaleThe scale to apply to the weight if needed

Definition at line 133 of file matrix_generator.c.