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

Common functions for matrix generation. More...

#include <debug.h>

Go to the source code of this file.

Data Structures

struct  delay_value
 A converted final delay value and delay stage. More...
 

Macros

#define N_HEADER_WORDS   3
 The number of header words per row.
 

Functions

static struct delay_value get_delay (uint16_t delay_value, uint32_t max_stage, uint32_t max_delay_per_stage)
 Get a converted delay value and stage.
 
static void * get_row (uint32_t *synaptic_matrix, uint32_t max_row_n_words, uint32_t pre_index)
 Get a synaptic row for a given neuron.
 
static void * get_delay_row (uint32_t *delayed_synaptic_matrix, uint32_t max_delayed_row_n_words, uint32_t pre_index, uint32_t delay_stage, uint32_t n_pre_neurons_per_core, uint32_t max_delay_stage, uint32_t n_pre_neurons)
 Get a delayed synaptic row for a given neuron and delay stage.
 

Detailed Description

Common functions for matrix generation.

Definition in file matrix_generator_common.h.


Data Structure Documentation

◆ delay_value

struct delay_value

A converted final delay value and delay stage.

Definition at line 35 of file matrix_generator_common.h.

Data Fields
uint16_t delay
uint16_t stage

Macro Definition Documentation

◆ N_HEADER_WORDS

#define N_HEADER_WORDS   3

The number of header words per row.

Definition at line 30 of file matrix_generator_common.h.

Function Documentation

◆ get_delay()

static struct delay_value get_delay ( uint16_t  delay_value,
uint32_t  max_stage,
uint32_t  max_delay_per_stage 
)
static

Get a converted delay value and stage.

Parameters
[in]delay_valueThe value to convert
[in]max_stageThe maximum delay stage allowed
[in]max_delay_per_stageThe max delay in a delay stage
Returns
The converted delay value

Definition at line 47 of file matrix_generator_common.h.

◆ get_row()

static void * get_row ( uint32_t *  synaptic_matrix,
uint32_t  max_row_n_words,
uint32_t  pre_index 
)
static

Get a synaptic row for a given neuron.

Parameters
[in]synaptic_matrixthe address of the synaptic matrix
[in]max_row_n_wordsthe maximum number of words (excluding headers) in each row of the table
[in]pre_indexthe index of the pre-neuron relative to the start of the matrix
Returns
A pointer to the row of the matrix to write to

Definition at line 80 of file matrix_generator_common.h.

◆ get_delay_row()

static void * get_delay_row ( uint32_t *  delayed_synaptic_matrix,
uint32_t  max_delayed_row_n_words,
uint32_t  pre_index,
uint32_t  delay_stage,
uint32_t  n_pre_neurons_per_core,
uint32_t  max_delay_stage,
uint32_t  n_pre_neurons 
)
static

Get a delayed synaptic row for a given neuron and delay stage.

Parameters
[in]delayedsynaptic_matrix the address of the delayed synaptic matrix
[in]max_delayed_row_n_wordsthe maximum number of words (excluding headers) in each delayed row of the table
[in]pre_indexthe index of the pre-neuron relative to the start of the matrix
[in]delay_stagethe delay stage, where 0 means the undelayed stage
[in]n_pre_neurons_per_coreThe number of neurons per core in the pre-population
[in]max_delay_stageThe maximum delay stage
[in]n_pre_neuronsThe number of neurons in the pre-population
Returns
A pointer to the row of the delayed matrix to write to

Definition at line 99 of file matrix_generator_common.h.