sPyNNaker neural_modelling 7.2.2
|
The implementation of the matrix generator. More...
#include "matrix_generator.h"
#include <spin1_api.h>
#include <debug.h>
#include "generator_types.h"
#include "matrix_generators/matrix_generator_static.h"
#include "matrix_generators/matrix_generator_stdp.h"
#include "matrix_generators/matrix_generator_neuromodulation.h"
#include <delay_extension/delay_extension.h>
Go to the source code of this file.
Data Structures | |
struct | matrix_generator_info |
A "class" for matrix generators. More... | |
struct | matrix_generator_t |
The data for a matrix generator. More... | |
Enumerations | |
enum | { STATIC_MATRIX_GENERATOR , PLASTIC_MATRIX_GENERATOR , NEUROMODULATION_MATRIX_GENERATOR , N_MATRIX_GENERATORS } |
The "hashes" for synaptic matrix generators. More... | |
Functions | |
matrix_generator_t | matrix_generator_init (uint32_t hash, void **in_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. | |
Variables | |
static const struct matrix_generator_info | matrix_generators [] |
An Array of known generators. | |
The implementation of the matrix generator.
Definition in file matrix_generator.c.
struct matrix_generator_info |
A "class" for matrix generators.
Definition at line 48 of file matrix_generator.c.
Data Fields | ||
---|---|---|
generator_hash_t | hash |
The hash of the generator. For now, hash is just an index agreed between Python and here. |
initialize_matrix_func * | initialize | Initialise the generator. |
write_synapse_func * | write_synapse | Generate a row of a matrix with a matrix generator. |
free_func * | free | Free any data for the generator. |
struct matrix_generator |
The data for a matrix generator.
Data type for matrix generator.
Definition at line 69 of file matrix_generator.c.
Data Fields | ||
---|---|---|
const matrix_generator_info * | type | |
void * | data |
anonymous enum |
The "hashes" for synaptic matrix generators.
Definition at line 32 of file matrix_generator.c.
matrix_generator_t matrix_generator_init | ( | uint32_t | hash, |
void ** | region, | ||
void * | synaptic_matrix | ||
) |
Initialise a specific matrix generator.
[in] | hash | The identifier of the generator to initialise |
[in,out] | region | The address to read data from; updated to position after data has been read |
[in] | synaptic_matrix | The address of the base of the synaptic matrix |
Definition at line 92 of file matrix_generator.c.
void matrix_generator_free | ( | matrix_generator_t | generator | ) |
Finish with a matrix generator.
[in] | generator | The generator to free |
Definition at line 120 of file matrix_generator.c.
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.
[in] | generator | The generator to use to generate the matrix |
[in] | pre_index | The index of the pre-neuron relative to the start of the matrix |
[in] | post_index | The index of the post-neuron on this core |
[in] | weight | The weight of the synapse in raw form |
[in] | delay | The delay of the synapse in time steps |
[in] | weight_scale | The scale to apply to the weight if needed |
Definition at line 126 of file matrix_generator.c.
|
static |
An Array of known generators.
Definition at line 77 of file matrix_generator.c.