sPyNNaker neural_modelling 7.3.1
Loading...
Searching...
No Matches
input_type_conductance.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015 The University of Manchester
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * https://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
19#ifndef _INPUT_TYPE_CONDUCTANCE_H_
20#define _INPUT_TYPE_CONDUCTANCE_H_
21
22#include "input_type.h"
23
31
39
40static inline void input_type_initialise(input_type_t *state, input_type_params_t *params,
41 UNUSED uint32_t n_steps_per_timestep) {
42 state->V_rev_E = params->V_rev_E;
43 state->V_rev_I = params->V_rev_I;
44}
45
46static inline void input_type_save_state(UNUSED input_type_t *state,
48}
49
59 input_t *restrict value, UNUSED input_type_t *input_type,
60 uint16_t num_receptors) {
61 for (int i = 0; i < num_receptors; i++) {
62 value[i] = value[i] >> 10;
63 }
64 return &value[0];
65}
66
74 input_t *restrict exc_input, const input_type_t *input_type,
75 state_t membrane_voltage) {
76 for (int i=0; i < NUM_EXCITATORY_RECEPTORS; i++) {
77 exc_input[i] = exc_input[i] *
78 (input_type->V_rev_E - membrane_voltage);
79 }
80}
81
89 input_t *restrict inh_input, const input_type_t *input_type,
90 state_t membrane_voltage) {
91 for (int i=0; i < NUM_INHIBITORY_RECEPTORS; i++) {
92 inh_input[i] = -inh_input[i] *
93 (input_type->V_rev_I - membrane_voltage);
94 }
95}
96
97#endif // _INPUT_TYPE_CONDUCTANCE_H_
API for synaptic inputs (see also src/neuron/synapse_types)
#define NUM_INHIBITORY_RECEPTORS
The number of inhibitory receptors.
Definition input_type.h:37
#define NUM_EXCITATORY_RECEPTORS
The number of excitatory receptors.
Definition input_type.h:28
static void input_type_convert_inhibitory_input_to_current(input_t *restrict inh_input, const input_type_t *input_type, state_t membrane_voltage)
Converts an inhibitory input into an inhibitory current.
static input_t * input_type_get_input_value(input_t *restrict value, input_type_t *input_type, uint16_t num_receptors)
Gets the actual input value. This allows any scaling to take place.
static void input_type_convert_excitatory_input_to_current(input_t *restrict exc_input, const input_type_t *input_type, state_t membrane_voltage)
Converts an excitatory input into an excitatory current.
REAL V_rev_I
reversal voltage - Inhibitory [mV]
REAL V_rev_I
reversal voltage - Inhibitory [mV]
REAL V_rev_E
reversal voltage - Excitatory [mV]
REAL V_rev_E
reversal voltage - Excitatory [mV]
Conductance input parameters.
Conductance state.
accum REAL
Type used for "real" numbers.
Definition maths-util.h:91
REAL state_t
The type of a state variable.
REAL input_t
The type of an input.
static uint n_steps_per_timestep
The number of steps to run per timestep.
static stdp_params params
Configuration parameters.