CARLsim
5.0.0
CARLsim: a GPU-accelerated SNN simulator
|
Contains all of CARLsim's core functionality. More...
#include <snn.h>
Public Member Functions | |
SNN (const std::string &name, SimMode preferredSimMode, LoggerMode loggerMode, int randSeed) | |
SNN Constructor. More... | |
~SNN () | |
SNN Destructor. More... | |
void | biasWeights (short int connId, float bias, bool updateWeightRange=false) |
short int | connect (int gIDpre, int gIDpost, ConnectionGeneratorCore *conn, float mulSynFast, float mulSynSlow, bool synWtType) |
short int | connect (int gIDpre, int gIDpost, const std::string &_type, float initWt, float maxWt, float prob, uint8_t minDelay, uint8_t maxDelay, RadiusRF radius, float mulSynFast, float mulSynSlow, bool synWtType) |
make from each neuron in grpId1 to 'numPostSynapses' neurons in grpId2 More... | |
short int | connectCompartments (int grpIdLower, int grpIdUpper) |
int | createGroup (const std::string &grpName, const Grid3D &grid, int neurType, int preferredPartition, ComputingBackend preferredBackend) |
Creates a group of Izhikevich spiking neurons. More... | |
int | createGroupLIF (const std::string &grpName, const Grid3D &grid, int neurType, int preferredPartition, ComputingBackend preferredBackend) |
Creates a group of LIF spiking neurons. More... | |
int | createSpikeGeneratorGroup (const std::string &grpName, const Grid3D &grid, int neurType, int preferredPartition, ComputingBackend preferredBackend) |
Creates a spike generator group (dummy-neurons, not Izhikevich spiking neurons) More... | |
void | exitSimulation (int val=1) |
deallocates all dynamical structures and exits More... | |
std::vector< float > | getConductanceAMPA (int grpId) |
std::vector< float > | getConductanceGABAa (int grpId) |
std::vector< float > | getConductanceGABAb (int grpId) |
std::vector< float > | getConductanceNMDA (int grpId) |
ConnectConfig | getConnectConfig (short int connectId) |
required for homeostasis More... | |
short int | getConnectId (int grpIdPre, int grpIdPost) |
find connection ID based on pre-post group pair, O(N) More... | |
float * | getCurrent () |
temporary getter to return pointer to current[] More... | |
RangeDelay | getDelayRange (short int connId) |
returns the RangeDelay struct of a connection More... | |
uint8_t * | getDelays (int gGrpIdPre, int gGrpIdPost, int &numPreN, int &numPostN) |
Returns the delay information for all synaptic connections between a pre-synaptic and a post-synaptic neuron group. More... | |
int | getGroupEndNeuronId (int gGrpId) |
Grid3D | getGroupGrid3D (int grpId) |
int | getGroupId (std::string grpName) |
std::string | getGroupName (int grpId) |
GroupNeuromodulatorInfo | getGroupNeuromodulatorInfo (int grpId) |
int | getGroupNumNeurons (int gGrpId) |
int | getGroupStartNeuronId (int gGrpId) |
GroupSTDPInfo | getGroupSTDPInfo (int grpId) |
const FILE * | getLogFpDeb () |
returns file pointer to debug log More... | |
const FILE * | getLogFpErr () |
returns file pointer to error log More... | |
const FILE * | getLogFpInf () |
function writes population weights from gIDpre to gIDpost to file fname in binary. More... | |
const FILE * | getLogFpLog () |
returns file pointer to log file More... | |
LoggerMode | getLoggerMode () |
std::string | getNetworkName () |
Point3D | getNeuronLocation3D (int grpId, int relNeurId) |
Point3D | getNeuronLocation3D (int neurId) |
NeuronMonitor * | getNeuronMonitor (int grpId) |
Returns pointer to existing NeuronMonitor object, NULL else. More... | |
NeuronMonitorCore * | getNeuronMonitorCore (int grpId) |
int | getNumCompartmentConnections () |
int | getNumConnections () |
int | getNumGroups () |
int | getNumNeurons () |
int | getNumNeuronsGen () |
int | getNumNeuronsGenExc () |
int | getNumNeuronsGenInh () |
int | getNumNeuronsReg () |
int | getNumNeuronsRegExc () |
int | getNumNeuronsRegInh () |
int | getNumSynapses () |
int | getNumSynapticConnections (short int connectionId) |
gets number of connections associated with a connection ID More... | |
int | getRandSeed () |
double | getRFDist3D (const RadiusRF &radius, const Point3D &pre, const Point3D &post) |
checks whether a point pre lies in the receptive field for point post More... | |
int | getSimTime () |
int | getSimTimeMs () |
int | getSimTimeSec () |
SpikeMonitor * | getSpikeMonitor (int grpId) |
Returns pointer to existing SpikeMonitor object, NULL else. More... | |
SpikeMonitorCore * | getSpikeMonitorCore (int grpId) |
float * | getSTPu () |
temporary getter to return pointer to stpu[] More... | |
float * | getSTPx () |
temporary getter to return pointer to stpx[] More... | |
std::vector< std::vector< float > > | getWeightMatrix2D (short int connId) |
RangeWeight | getWeightRange (short int connId) |
returns RangeWeight struct of a connection More... | |
bool | isConnectionPlastic (short int connId) |
returns whether synapses in connection are fixed (false) or plastic (true) More... | |
bool | isDopaminergicGroup (int gGrpId) |
bool | isExcitatoryGroup (int gGrpId) |
bool | isGroupWithHomeostasis (int grpId) |
returns whether group has homeostasis enabled (true) or not (false) More... | |
bool | isInhibitoryGroup (int gGrpId) |
bool | isPoint3DinRF (const RadiusRF &radius, const Point3D &pre, const Point3D &post) |
bool | isPoissonGroup (int gGrpId) |
bool | isSimulationWithCOBA () |
bool | isSimulationWithCompartments () |
bool | isSimulationWithCUBA () |
bool | isSimulationWithFixedWeightsOnly () |
bool | isSimulationWithGABAbRise () |
bool | isSimulationWithHomeostasis () |
bool | isSimulationWithNMDARise () |
bool | isSimulationWithPlasticWeights () |
bool | isSimulationWithSTDP () |
bool | isSimulationWithSTP () |
void | loadSimulation (FILE *fid) |
int | runNetwork (int _nsec, int _nmsec, bool printRunSummary) |
run the simulation for n sec More... | |
void | saveSimulation (FILE *fid, bool saveSynapseInfo=false) |
stores the pre and post synaptic neuron ids with the weight and delay More... | |
void | scaleWeights (short int connId, float scale, bool updateWeightRange=false) |
void | setCompartmentParameters (int grpId, float couplingUp, float couplingDown) |
Coupling constants for the compartment are set using this method. More... | |
void | setConductances (bool isSet, int tdAMPA, int trNMDA, int tdNMDA, int tdGABAa, int trGABAb, int tdGABAb) |
Sets custom values for conductance decay (\tau_decay) or disables conductances alltogether These will be applied to all connections in a network For details on the ODE that is implemented refer to (Izhikevich et al, 2004), and for suitable values see (Dayan & Abbott, 2001). More... | |
ConnectionMonitor * | setConnectionMonitor (int grpIdPre, int grpIdPost, FILE *fid) |
sets up a network monitor registered with a callback to process the spikes. More... | |
void | setESTDP (int grpId, bool isSet, STDPType type, STDPCurve curve, float alphaPlus, float tauPlus, float alphaMinus, float tauMinus, float gamma) |
Set the spike-timing-dependent plasticity (STDP) for a neuron group. More... | |
void | setExternalCurrent (int grpId, const std::vector< float > ¤t) |
injects current (mA) into the soma of every neuron in the group More... | |
GroupMonitor * | setGroupMonitor (int grpId, FILE *fid) |
sets up a group monitor registered with a callback to process the spikes. More... | |
void | setHomeoBaseFiringRate (int groupId, float baseFiring, float baseFiringSD) |
Sets homeostatic target firing rate (enforced through homeostatic synaptic scaling) More... | |
void | setHomeostasis (int grpId, bool isSet, float homeoScale, float avgTimeScale) |
Sets the homeostasis parameters. g is the grpID, enable=true(false) enables(disables) homeostasis, homeostasisScale is strength of homeostasis compared to the strength of normal LTP/LTD from STDP (which is 1), and avgTimeScale is the time frame over which the average firing rate is averaged (it should be larger in scale than STDP timescales). More... | |
void | setIntegrationMethod (integrationMethod_t method, int numStepsPerMs) |
Sets the integration method and the number of integration steps per 1ms simulation time step. More... | |
void | setISTDP (int grpId, bool isSet, STDPType type, STDPCurve curve, float ab1, float ab2, float tau1, float tau2) |
Set the inhibitory spike-timing-dependent plasticity (STDP) with anti-hebbian curve for a neuron group. More... | |
void | setLogsFp (FILE *fpInf=NULL, FILE *fpErr=NULL, FILE *fpDeb=NULL, FILE *fpLog=NULL) |
Sets the file pointers for all log files file pointer NULL means don't change it. More... | |
void | setNeuromodulator (int grpId, float baseDP, float tauDP, float base5HT, float tau5HT, float baseACh, float tauACh, float baseNE, float tauNE) |
Sets baseline concentration and decay time constant of neuromodulators (DP, 5HT, ACh, NE) for a neuron group. More... | |
NeuronMonitor * | setNeuronMonitor (int gid, FILE *fid) |
sets up a neuron monitor registered with a callback to process the neuron state values, there can only be one NeuronMonitor per group More... | |
void | setNeuronParameters (int grpId, float izh_a, float izh_a_sd, float izh_b, float izh_b_sd, float izh_c, float izh_c_sd, float izh_d, float izh_d_sd) |
Sets the Izhikevich parameters a, b, c, and d of a neuron group. More... | |
void | setNeuronParameters (int grpId, float izh_C, float izh_C_sd, float izh_k, float izh_k_sd, float izh_vr, float izh_vr_sd, float izh_vt, float izh_vt_sd, float izh_a, float izh_a_sd, float izh_b, float izh_b_sd, float izh_vpeak, float izh_vpeak_sd, float izh_c, float izh_c_sd, float izh_d, float izh_d_sd) |
Sets the Izhikevich parameters C, k, vr, vt, a, b, vpeak, c, and d of a neuron group. More... | |
void | setNeuronParametersLIF (int grpId, int tau_m, int tau_ref, float vTh, float vReset, double minRmem, double maxRmem) |
Sets neuron parameters for a group of LIF spiking neurons. More... | |
void | setSpikeGenerator (int grpId, SpikeGeneratorCore *spikeGenFunc) |
sets up a spike generator More... | |
SpikeMonitor * | setSpikeMonitor (int gid, FILE *fid) |
sets up a spike monitor registered with a callback to process the spikes, there can only be one SpikeMonitor per group More... | |
void | setSpikeRate (int grpId, PoissonRate *spikeRate, int refPeriod) |
Sets the Poisson spike rate for a group. For information on how to set up spikeRate, see Section Poisson spike generators in the Tutorial. More... | |
void | setSTP (int grpId, bool isSet, float STP_U, float STP_tau_u, float STP_tau_x) |
Sets STP params U, tau_u, and tau_x of a neuron group (pre-synaptically) CARLsim implements the short-term plasticity model of (Tsodyks & Markram, 1998; Mongillo, Barak, & Tsodyks, 2008) du/dt = -u/STP_tau_u + STP_U * (1-u-) * \delta(t-t_spk) dx/dt = (1-x)/STP_tau_x - u+ * x- * \delta(t-t_spk) dI/dt = -I/tau_S + A * u+ * x- * \delta(t-t_spk) where u- means value of variable u right before spike update, and x+ means value of variable x right after the spike update, and A is the synaptic weight. The STD effect is modeled by a normalized variable (0<=x<=1), denoting the fraction of resources that remain available after neurotransmitter depletion. The STF effect is modeled by a utilization parameter u, representing the fraction of available resources ready for use (release probability). Following a spike, (i) u increases due to spike-induced calcium influx to the presynaptic terminal, after which (ii) a fraction u of available resources is consumed to produce the post-synaptic current. Between spikes, u decays back to zero with time constant STP_tau_u (\tau_F), and x recovers to value one with time constant STP_tau_x (\tau_D). More... | |
void | setupNetwork () |
build the network More... | |
void | setWeight (short int connId, int neurIdPre, int neurIdPost, float weight, bool updateWeightRange=false) |
sets the weight value of a specific synapse More... | |
void | setWeightAndWeightChangeUpdate (UpdateInterval wtANDwtChangeUpdateInterval, bool enableWtChangeDecay, float wtChangeDecay) |
Sets the weight and weight change update parameters. More... | |
void | startTesting (bool shallUpdateWeights=true) |
enters a testing phase, where all weight updates are disabled More... | |
void | stopTesting () |
exits a testing phase, making weight updates possible again More... | |
void | updateConnectionMonitor (short int connId=ALL) |
polls connection weights More... | |
void | updateGroupMonitor (int grpId=ALL) |
access group status (currently the concentration of neuromodulator) More... | |
void | updateNeuronMonitor (int grpId=ALL) |
copy required neuron state values from ??? buffer to ??? buffer More... | |
void | updateSpikeMonitor (int grpId=ALL) |
copy required spikes from firing buffer to spike buffer More... | |
Static Public Attributes | |
static const unsigned int | MAJOR_VERSION = 4 |
major release version, as in CARLsim X More... | |
static const unsigned int | MINOR_VERSION = 0 |
minor release version, as in CARLsim 2.X More... | |
**************************************************************************************************************** /// CPUSNN CORE CLASS **************************************************************************************************************** ///
This is a more elaborate description of our main class.
SNN | ( | const std::string & | name, |
SimMode | preferredSimMode, | ||
LoggerMode | loggerMode, | ||
int | randSeed | ||
) |
**************************************************************************************************************** /// PUBLIC METHODS **************************************************************************************************************** ///
name | the symbolic name of a spiking neural network |
loggerMode | log mode |
randSeed | randomize seed of the random number generator |
**************************************************************************************************************** /// CONSTRUCTOR / DESTRUCTOR **************************************************************************************************************** ///
Definition at line 77 of file snn_manager.cpp.
~SNN | ( | ) |
clean up all allocated resource
Definition at line 86 of file snn_manager.cpp.
void biasWeights | ( | short int | connId, |
float | bias, | ||
bool | updateWeightRange = false |
||
) |
************************************************************************************************************ /// PUBLIC METHODS: INTERACTING WITH A SIMULATION ************************************************************************************************************ ///
Definition at line 916 of file snn_manager.cpp.
short int connect | ( | int | gIDpre, |
int | gIDpost, | ||
ConnectionGeneratorCore * | conn, | ||
float | mulSynFast, | ||
float | mulSynSlow, | ||
bool | synWtType | ||
) |
Definition at line 178 of file snn_manager.cpp.
short int connect | ( | int | grpId1, |
int | grpId2, | ||
const std::string & | _type, | ||
float | initWt, | ||
float | maxWt, | ||
float | prob, | ||
uint8_t | minDelay, | ||
uint8_t | maxDelay, | ||
RadiusRF | radius, | ||
float | _mulSynFast, | ||
float | _mulSynSlow, | ||
bool | synWtType | ||
) |
Creates synaptic projections from a pre-synaptic group to a post-synaptic group using a pre-defined primitive type.
grpIdPre | ID of the pre-synaptic group |
grpIdPost | ID of the post-synaptic group |
connType | connection type. "random": random connectivity. "one-to-one": connect the i-th neuron in pre to the i-th neuron in post. "full": connect all neurons in pre to all neurons in post (no self-connections). |
initWt | initial weight strength (arbitrary units); should be negative for inhibitory connections |
maxWt | upper bound on weight strength (arbitrary units); should be negative for inhibitory connections |
connProb | connection probability |
minDelay | the minimum delay allowed (ms) |
maxdelay | the maximum delay allowed (ms) |
synWtType | (optional) connection type, either SYN_FIXED or SYN_PLASTIC, default = SYN_FIXED. |
wtType | (optional) DEPRECATED |
************************************************************************************************************ /// PUBLIC METHODS: SETTING UP A SIMULATION ************************************************************************************************************ ///
Definition at line 96 of file snn_manager.cpp.
short int connectCompartments | ( | int | grpIdLower, |
int | grpIdUpper | ||
) |
Definition at line 217 of file snn_manager.cpp.
int createGroup | ( | const std::string & | grpName, |
const Grid3D & | grid, | ||
int | neurType, | ||
int | preferredPartition, | ||
ComputingBackend | preferredBackend | ||
) |
name | the symbolic name of a group |
grid | Grid3D struct to create neurons on a 3D grid (x,y,z) |
nType | the type of neuron |
Definition at line 252 of file snn_manager.cpp.
int createGroupLIF | ( | const std::string & | grpName, |
const Grid3D & | grid, | ||
int | neurType, | ||
int | preferredPartition, | ||
ComputingBackend | preferredBackend | ||
) |
grpName | the symbolic name of a group |
grid | Grid3D struct to create neurons on a 3D grid (x,y,z) |
neurType | the type of neuron |
preferredPartition | defines the desired runtime partition for the group |
preferredBackend | defines whether the group will be placed on CPU or GPU |
Definition at line 302 of file snn_manager.cpp.
int createSpikeGeneratorGroup | ( | const std::string & | grpName, |
const Grid3D & | grid, | ||
int | neurType, | ||
int | preferredPartition, | ||
ComputingBackend | preferredBackend | ||
) |
name | the symbolic name of a group |
grid | Grid3D struct to create neurons on a 3D grid (x,y,z) |
nType | the type of neuron, currently only support EXCITATORY NEURON |
Definition at line 349 of file snn_manager.cpp.
void exitSimulation | ( | int | val = 1 | ) |
Definition at line 995 of file snn_manager.cpp.
std::vector< float > getConductanceAMPA | ( | int | grpId | ) |
Definition at line 1728 of file snn_manager.cpp.
std::vector< float > getConductanceGABAa | ( | int | grpId | ) |
Definition at line 1761 of file snn_manager.cpp.
std::vector< float > getConductanceGABAb | ( | int | grpId | ) |
Definition at line 1774 of file snn_manager.cpp.
std::vector< float > getConductanceNMDA | ( | int | grpId | ) |
Definition at line 1741 of file snn_manager.cpp.
ConnectConfig getConnectConfig | ( | short int | connectId | ) |
Definition at line 1717 of file snn_manager.cpp.
short int getConnectId | ( | int | grpIdPre, |
int | grpIdPost | ||
) |
**************************************************************************************************************** /// GETTERS / SETTERS **************************************************************************************************************** ///
Definition at line 1704 of file snn_manager.cpp.
|
inline |
RangeDelay getDelayRange | ( | short int | connId | ) |
Definition at line 1795 of file snn_manager.cpp.
uint8_t * getDelays | ( | int | gGrpIdPre, |
int | gGrpIdPost, | ||
int & | numPreN, | ||
int & | numPostN | ||
) |
gGrpIdPre | ID of pre-synaptic group |
gGrpIdPost | ID of post-synaptic group |
numPreN | return the number of pre-synaptic neurons |
numPostN | retrun the number of post-synaptic neurons |
delays | (optional) return the delay information for all synapses, default = NULL |
Definition at line 1802 of file snn_manager.cpp.
Grid3D getGroupGrid3D | ( | int | grpId | ) |
Definition at line 1846 of file snn_manager.cpp.
int getGroupId | ( | std::string | grpName | ) |
Definition at line 1853 of file snn_manager.cpp.
std::string getGroupName | ( | int | grpId | ) |
Definition at line 1865 of file snn_manager.cpp.
GroupNeuromodulatorInfo getGroupNeuromodulatorInfo | ( | int | grpId | ) |
Definition at line 1901 of file snn_manager.cpp.
GroupSTDPInfo getGroupSTDPInfo | ( | int | grpId | ) |
Definition at line 1874 of file snn_manager.cpp.
|
inline |
|
inline |
Point3D getNeuronLocation3D | ( | int | grpId, |
int | relNeurId | ||
) |
Definition at line 1932 of file snn_manager.cpp.
Point3D getNeuronLocation3D | ( | int | neurId | ) |
Definition at line 1916 of file snn_manager.cpp.
NeuronMonitor * getNeuronMonitor | ( | int | grpId | ) |
Definition at line 1981 of file snn_manager.cpp.
NeuronMonitorCore * getNeuronMonitorCore | ( | int | grpId | ) |
Returns pointer to existing NeuronMonitorCore object, NULL else. Should not be exposed to user interface
Definition at line 1992 of file snn_manager.cpp.
int getNumSynapticConnections | ( | short int | connectionId | ) |
Definition at line 1949 of file snn_manager.cpp.
Definition at line 5071 of file snn_manager.cpp.
SpikeMonitor * getSpikeMonitor | ( | int | grpId | ) |
Definition at line 1960 of file snn_manager.cpp.
SpikeMonitorCore * getSpikeMonitorCore | ( | int | grpId | ) |
Returns pointer to existing SpikeMonitorCore object, NULL else. Should not be exposed to user interface
Definition at line 1970 of file snn_manager.cpp.
|
inline |
|
inline |
std::vector< std::vector< float > > getWeightMatrix2D | ( | short int | connId | ) |
Definition at line 6233 of file snn_manager.cpp.
RangeWeight getWeightRange | ( | short int | connId | ) |
Definition at line 2003 of file snn_manager.cpp.
bool isConnectionPlastic | ( | short int | connId | ) |
Definition at line 4884 of file snn_manager.cpp.
bool isGroupWithHomeostasis | ( | int | grpId | ) |
Definition at line 4894 of file snn_manager.cpp.
Definition at line 5062 of file snn_manager.cpp.
void loadSimulation | ( | FILE * | fid | ) |
reads the network state from file Reads a CARLsim network file. Such a file can be created using SNN:writeNetwork.
Definition at line 1001 of file snn_manager.cpp.
int runNetwork | ( | int | _nsec, |
int | _nmsec, | ||
bool | printRunSummary | ||
) |
[in] | printRunSummary | whether to print a basic summary of the run at the end |
************************************************************************************************************ /// PUBLIC METHODS: RUNNING A SIMULATION ************************************************************************************************************ ///
Definition at line 794 of file snn_manager.cpp.
void saveSimulation | ( | FILE * | fid, |
bool | saveSynapseInfo = false |
||
) |
Definition at line 1411 of file snn_manager.cpp.
void scaleWeights | ( | short int | connId, |
float | scale, | ||
bool | updateWeightRange = false |
||
) |
Definition at line 1006 of file snn_manager.cpp.
void setCompartmentParameters | ( | int | grpId, |
float | couplingUp, | ||
float | couplingDown | ||
) |
grpId | the symbolic name of a group |
couplingUp | the coupling constant for upper connections |
couplingDown | the coupling constant for lower connections |
Definition at line 393 of file snn_manager.cpp.
void setConductances | ( | bool | isSet, |
int | tdAMPA, | ||
int | trNMDA, | ||
int | tdNMDA, | ||
int | tdGABAa, | ||
int | trGABAb, | ||
int | tdGABAb | ||
) |
isSet | enables the use of COBA mode |
tAMPA | time _constant of AMPA decay (ms); for example, 5.0 |
tNMDA | time constant of NMDA decay (ms); for example, 150.0 |
tGABAa | time constant of GABAa decay (ms); for example, 6.0 |
tGABAb | time constant of GABAb decay (ms); for example, 150.0 |
Definition at line 409 of file snn_manager.cpp.
ConnectionMonitor * setConnectionMonitor | ( | int | grpIdPre, |
int | grpIdPost, | ||
FILE * | fid | ||
) |
[in] | grpIdPre | ID of the pre-synaptic neuron group |
[in] | grpIdPost | ID of the post-synaptic neuron group |
[in] | connectionMon | ConnectionMonitorCore class |
Definition at line 1125 of file snn_manager.cpp.
void setESTDP | ( | int | grpId, |
bool | isSet, | ||
STDPType | type, | ||
STDPCurve | curve, | ||
float | alphaPlus, | ||
float | tauPlus, | ||
float | alphaMinus, | ||
float | tauMinus, | ||
float | gamma | ||
) |
Definition at line 621 of file snn_manager.cpp.
void setExternalCurrent | ( | int | grpId, |
const std::vector< float > & | current | ||
) |
Definition at line 1378 of file snn_manager.cpp.
GroupMonitor * setGroupMonitor | ( | int | gGrpId, |
FILE * | fid | ||
) |
[in] | grpId | ID of the neuron group |
[in] | fid | file pointer for recording group status (neuromodulators) |
Definition at line 1088 of file snn_manager.cpp.
void setHomeoBaseFiringRate | ( | int | groupId, |
float | baseFiring, | ||
float | baseFiringSD | ||
) |
Definition at line 481 of file snn_manager.cpp.
void setHomeostasis | ( | int | grpId, |
bool | isSet, | ||
float | homeoScale, | ||
float | avgTimeScale | ||
) |
Definition at line 461 of file snn_manager.cpp.
void setIntegrationMethod | ( | integrationMethod_t | method, |
int | numStepsPerMs | ||
) |
Definition at line 497 of file snn_manager.cpp.
void setISTDP | ( | int | grpId, |
bool | isSet, | ||
STDPType | type, | ||
STDPCurve | curve, | ||
float | ab1, | ||
float | ab2, | ||
float | tau1, | ||
float | tau2 | ||
) |
Definition at line 654 of file snn_manager.cpp.
void setLogsFp | ( | FILE * | fpInf = NULL , |
FILE * | fpErr = NULL , |
||
FILE * | fpDeb = NULL , |
||
FILE * | fpLog = NULL |
||
) |
************************************************************************************************************ /// PUBLIC METHODS: PLOTTING / LOGGING ************************************************************************************************************ ///
Definition at line 1672 of file snn_manager.cpp.
void setNeuromodulator | ( | int | grpId, |
float | baseDP, | ||
float | tauDP, | ||
float | base5HT, | ||
float | tau5HT, | ||
float | baseACh, | ||
float | tauACh, | ||
float | baseNE, | ||
float | tauNE | ||
) |
groupId | the symbolic name of a group |
baseDP | the baseline concentration of Dopamine |
tauDP | the decay time constant of Dopamine |
base5HT | the baseline concentration of Serotonin |
tau5HT | the decay time constant of Serotonin |
baseACh | the baseline concentration of Acetylcholine |
tauACh | the decay time constant of Acetylcholine |
baseNE | the baseline concentration of Noradrenaline |
tauNE | the decay time constant of Noradrenaline |
Definition at line 597 of file snn_manager.cpp.
NeuronMonitor * setNeuronMonitor | ( | int | gid, |
FILE * | fid | ||
) |
grpId | ID of the neuron group |
neuronMon | (optional) neuronMonitor class |
Definition at line 1222 of file snn_manager.cpp.
void setNeuronParameters | ( | int | grpId, |
float | izh_a, | ||
float | izh_a_sd, | ||
float | izh_b, | ||
float | izh_b_sd, | ||
float | izh_c, | ||
float | izh_c_sd, | ||
float | izh_d, | ||
float | izh_d_sd | ||
) |
Parameter values for each neuron are given by a normal distribution with mean _a, _b, _c, _d and standard deviation _a_sd, _b_sd, _c_sd, and _d_sd, respectively
_groupId | the symbolic name of a group |
_a | the mean value of izhikevich parameter a |
_a_sd | the standard deviation value of izhikevich parameter a |
_b | the mean value of izhikevich parameter b |
_b_sd | the standard deviation value of izhikevich parameter b |
_c | the mean value of izhikevich parameter c |
_c_sd | the standard deviation value of izhikevich parameter c |
_d | the mean value of izhikevich parameter d |
_d_sd | the standard deviation value of izhikevich parameter d |
Definition at line 505 of file snn_manager.cpp.
void setNeuronParameters | ( | int | grpId, |
float | izh_C, | ||
float | izh_C_sd, | ||
float | izh_k, | ||
float | izh_k_sd, | ||
float | izh_vr, | ||
float | izh_vr_sd, | ||
float | izh_vt, | ||
float | izh_vt_sd, | ||
float | izh_a, | ||
float | izh_a_sd, | ||
float | izh_b, | ||
float | izh_b_sd, | ||
float | izh_vpeak, | ||
float | izh_vpeak_sd, | ||
float | izh_c, | ||
float | izh_c_sd, | ||
float | izh_d, | ||
float | izh_d_sd | ||
) |
Parameter values for each neuron are given by a normal distribution with mean _C, _k, _vr, _vt, _a, _b, _vpeak, _c, and _d and standard deviation _C_sd, _k_sd, _vr_sd, _vt_sd, _a_sd, _b_sd, _vpeak_sd, _c_sd, and _d_sd, respectively
_groupId | the symbolic name of a group |
_C | the mean value of izhikevich parameter C |
_C_sd | the standart deviation value of izhikevich parameter C |
_k | the mean value of izhikevich parameter k |
_k_sd | the standart deviation value of izhikevich parameter k |
_vr | the mean value of izhikevich parameter vr |
_vr_sd | the standart deviation value of izhikevich parameter vr |
_vt | the mean value of izhikevich parameter vt |
_vt_sd | the standart deviation value of izhikevich parameter vt |
_a | the mean value of izhikevich parameter a |
_a_sd | the standard deviation value of izhikevich parameter a |
_b | the mean value of izhikevich parameter b |
_b_sd | the standard deviation value of izhikevich parameter b |
_vpeak | the mean value of izhikevich parameter vpeak |
_vpeak_sd | the standart deviation value of izhikevich parameter vpeak |
_c | the mean value of izhikevich parameter c |
_c_sd | the standard deviation value of izhikevich parameter c |
_d | the mean value of izhikevich parameter d |
_d_sd | the standard deviation value of izhikevich parameter d |
Definition at line 530 of file snn_manager.cpp.
void setNeuronParametersLIF | ( | int | grpId, |
int | tau_m, | ||
int | tau_ref, | ||
float | vTh, | ||
float | vReset, | ||
double | minRmem, | ||
double | maxRmem | ||
) |
[in] | grpId | group ID |
[in] | tau_m | Membrane time constant in ms (controls decay/leak) |
[in] | tau_ref | absolute refractory period in ms |
[in] | vTh | Threshold voltage for firing (must be > vReset) |
[in] | vReset | Membrane potential resets to this value immediately after spike |
[in] | minRmem | minimum membrane resistance |
[in] | maxRmem | maximum membrane resistance |
Definition at line 575 of file snn_manager.cpp.
void setSpikeGenerator | ( | int | gGrpId, |
SpikeGeneratorCore * | spikeGenFunc | ||
) |
Definition at line 1174 of file snn_manager.cpp.
SpikeMonitor * setSpikeMonitor | ( | int | gid, |
FILE * | fid | ||
) |
grpId | ID of the neuron group |
spikeMon | (optional) spikeMonitor class |
Definition at line 1182 of file snn_manager.cpp.
void setSpikeRate | ( | int | gGrpId, |
PoissonRate * | ratePtr, | ||
int | refPeriod | ||
) |
Input arguments:
grpId | ID of the neuron group |
spikeRate | pointer to a PoissonRate instance |
refPeriod | (optional) refractive period, default = 1 |
Definition at line 1271 of file snn_manager.cpp.
void setSTP | ( | int | grpId, |
bool | isSet, | ||
float | STP_U, | ||
float | STP_tau_u, | ||
float | STP_tau_x | ||
) |
[in] | grpId | pre-synaptic group id. STP will apply to all neurons of that group! |
[in] | isSet | a flag whether to enable/disable STP |
[in] | STP_tau_u | decay constant of u (\tau_F) |
[in] | STP_tau_x | decay constant of x (\tau_D) |
Definition at line 700 of file snn_manager.cpp.
void setupNetwork | ( | ) |
[in] | removeTempMemory | remove temp memory after building network |
************************************************************************************************************ /// PUBLIC METHODS: GENERATE A SIMULATION ************************************************************************************************************ ///
Definition at line 773 of file snn_manager.cpp.
void setWeight | ( | short int | connId, |
int | neurIdPre, | ||
int | neurIdPost, | ||
float | weight, | ||
bool | updateWeightRange = false |
||
) |
Definition at line 1287 of file snn_manager.cpp.
void setWeightAndWeightChangeUpdate | ( | UpdateInterval | wtANDwtChangeUpdateInterval, |
bool | enableWtChangeDecay, | ||
float | wtChangeDecay | ||
) |
[in] | wtANDwtChangeUpdateInterval | the interval between two wt (weight) and wtChange (weight change) update. |
[in] | enableWtChangeDecay | enable weight change decay |
[in] | wtChangeDecay | the decay ratio of weight change (wtChange) |
Definition at line 724 of file snn_manager.cpp.
void startTesting | ( | bool | shallUpdateWeights = true | ) |
Definition at line 6181 of file snn_manager.cpp.
void stopTesting | ( | ) |
Definition at line 6208 of file snn_manager.cpp.
void updateConnectionMonitor | ( | short int | connId = ALL | ) |
Definition at line 6219 of file snn_manager.cpp.
void updateGroupMonitor | ( | int | grpId = ALL | ) |
Definition at line 6280 of file snn_manager.cpp.
void updateNeuronMonitor | ( | int | gGrpId = ALL | ) |
This function is public in SNN, but it should probably not be a public user function in CARLsim. It is usually called once every 1000ms by the core to update neuron state value binaries and NeuronMonitor objects. In GPU mode, it will first copy the neuron state info to the host. The input argument can either be a specific group ID or keyword ALL (for all groups). Core and utility functions can call updateNeuronMonitor at any point in time. The function will automatically determine the last time it was called, and update SpikeMonitor information only if necessary.
Definition at line 6590 of file snn_manager.cpp.
void updateSpikeMonitor | ( | int | gGrpId = ALL | ) |
This function is public in SNN, but it should probably not be a public user function in CARLsim. It is usually called once every 1000ms by the core to update spike binaries and SpikeMonitor objects. In GPU mode, it will first copy the firing info to the host. The input argument can either be a specific group ID or keyword ALL (for all groups). Core and utility functions can call updateSpikeMonitor at any point in time. The function will automatically determine the last time it was called, and update SpikeMonitor information only if necessary.
Definition at line 6479 of file snn_manager.cpp.