sPyNNaker neural_modelling 7.1.1
Loading...
Searching...
No Matches
Typedefs | Functions
neuron-typedefs.h File Reference

Data type definitions for SpiNNaker Neuron-modelling. More...

#include <common-typedefs.h>
#include "maths-util.h"

Go to the source code of this file.

Typedefs

typedef uint32_t key_t
 The type of a SpiNNaker multicast message key word.
 
typedef uint32_t payload_t
 The type of a SpiNNaker multicast message payload word.
 
typedef uint32_t spike_t
 The type of a spike.
 
typedef struct synaptic_row * synaptic_row_t
 The type of a synaptic row.
 
typedef REAL input_t
 The type of an input.
 
typedef REAL state_t
 The type of a state variable.
 

Functions

static key_t spike_key (spike_t s)
 helper method to retrieve the key from a spike
 
static payload_t spike_payload (spike_t s)
 helper method to retrieve the pay-load from a spike
 

Detailed Description

Data type definitions for SpiNNaker Neuron-modelling.

Defines a spike with either a payload or not and implements the functionality to extract the key and payload in both cases. If the spike is compiled as not having a payload, the payload will always be returned as 0.

Definition in file neuron-typedefs.h.

Typedef Documentation

◆ key_t

typedef uint32_t key_t

The type of a SpiNNaker multicast message key word.

Definition at line 39 of file neuron-typedefs.h.

◆ payload_t

typedef uint32_t payload_t

The type of a SpiNNaker multicast message payload word.

Definition at line 41 of file neuron-typedefs.h.

◆ spike_t

typedef uint32_t spike_t

The type of a spike.

Definition at line 78 of file neuron-typedefs.h.

◆ synaptic_row_t

typedef struct synaptic_row* synaptic_row_t

The type of a synaptic row.

There is no definition of struct synaptic row because it is a form of memory structure that C cannot encode as a single struct.

It's actually this, with multiple variable length arrays intermixed with size counts:

struct synaptic_row {
uint32_t n_plastic_synapse_words;
uint32_t plastic_synapse_data[n_plastic_synapse_words]; // VLA
uint32_t n_fixed_synapse_words;
uint32_t n_plastic_controls;
uint32_t fixed_synapse_data[n_fixed_synapse_words]; // VLA
control_t plastic_control_data[n_plastic_controls]; // VLA
}
uint16_t control_t
Define the type of the control data.

The relevant implementation structures are:

Definition at line 118 of file neuron-typedefs.h.

◆ input_t

typedef REAL input_t

The type of an input.

Definition at line 121 of file neuron-typedefs.h.

◆ state_t

typedef REAL state_t

The type of a state variable.

Definition at line 124 of file neuron-typedefs.h.

Function Documentation

◆ spike_key()

static key_t spike_key ( spike_t  s)
inlinestatic

helper method to retrieve the key from a spike

Parameters
[in]sthe spike to get the key from
Returns
key_t: the key from the spike

Definition at line 83 of file neuron-typedefs.h.

◆ spike_payload()

static payload_t spike_payload ( spike_t  s)
inlinestatic

helper method to retrieve the pay-load from a spike

Parameters
[in]sthe spike to get the pay-load from
Returns
payload_t: the pay-load from the spike (default-ly set to zero if the model is not compiled with SPIKES_WITH_PAYLOADS)

Definition at line 91 of file neuron-typedefs.h.