97 uint32_t pre_spike, uint16_t synapse_type) {
101 const uint32_t new_index = events->
count++;
102 events->
traces[new_index].weight_change = weight_change;
103 events->
traces[new_index].pre_spike = pre_spike;
104 events->
traces[new_index].synapse_type = synapse_type;
105 log_debug(
"Added pre spike %u with weight change %d to index %d", pre_spike,
106 weight_change, new_index);
118 log_debug(
"Added pre spike %u with weight change %d to index %d", pre_spike,
static post_event_history_t * post_events_init_buffers(uint32_t n_neurons)
Initialise an array of post-synaptic event histories.
static void post_events_add(post_event_history_t *events, uint16_t weight_change, uint32_t pre_spike, uint16_t synapse_type)
Add a post-synaptic event to the history.
int16_t weight_change
The amount to change the weight by (positive or negative)
uint32_t pre_spike
The pre-spike to look out for in doing the update.
#define MAX_EVENTS
Maximum number of pre-synaptic events per post neuron.
post_trace_t traces[MAX_POST_SYNAPTIC_EVENTS]
Event traces.
Trace history of post-synaptic events.