CARLsim  5.0.0
CARLsim: a GPU-accelerated SNN simulator
SNN Class Reference

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)
 
NeuronMonitorgetNeuronMonitor (int grpId)
 Returns pointer to existing NeuronMonitor object, NULL else. More...
 
NeuronMonitorCoregetNeuronMonitorCore (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 ()
 
SpikeMonitorgetSpikeMonitor (int grpId)
 Returns pointer to existing SpikeMonitor object, NULL else. More...
 
SpikeMonitorCoregetSpikeMonitorCore (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...
 
ConnectionMonitorsetConnectionMonitor (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 > &current)
 injects current (mA) into the soma of every neuron in the group More...
 
GroupMonitorsetGroupMonitor (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...
 
NeuronMonitorsetNeuronMonitor (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...
 
SpikeMonitorsetSpikeMonitor (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...
 

Detailed Description

**************************************************************************************************************** /// CPUSNN CORE CLASS **************************************************************************************************************** ///

This is a more elaborate description of our main class.

Definition at line 115 of file snn.h.

Constructor & Destructor Documentation

◆ SNN()

SNN ( const std::string &  name,
SimMode  preferredSimMode,
LoggerMode  loggerMode,
int  randSeed 
)

**************************************************************************************************************** /// PUBLIC METHODS **************************************************************************************************************** ///

Parameters
namethe symbolic name of a spiking neural network
loggerModelog mode
randSeedrandomize seed of the random number generator

**************************************************************************************************************** /// CONSTRUCTOR / DESTRUCTOR **************************************************************************************************************** ///

Definition at line 77 of file snn_manager.cpp.

◆ ~SNN()

~SNN ( )

clean up all allocated resource

Definition at line 86 of file snn_manager.cpp.

Member Function Documentation

◆ biasWeights()

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.

◆ connect() [1/2]

short int connect ( int  gIDpre,
int  gIDpost,
ConnectionGeneratorCore conn,
float  mulSynFast,
float  mulSynSlow,
bool  synWtType 
)

Definition at line 178 of file snn_manager.cpp.

◆ connect() [2/2]

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.

Parameters
grpIdPreID of the pre-synaptic group
grpIdPostID of the post-synaptic group
connTypeconnection 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).
initWtinitial weight strength (arbitrary units); should be negative for inhibitory connections
maxWtupper bound on weight strength (arbitrary units); should be negative for inhibitory connections
connProbconnection probability
minDelaythe minimum delay allowed (ms)
maxdelaythe maximum delay allowed (ms)
synWtType(optional) connection type, either SYN_FIXED or SYN_PLASTIC, default = SYN_FIXED.
wtType(optional) DEPRECATED
Returns
number of created synaptic projections

************************************************************************************************************ /// PUBLIC METHODS: SETTING UP A SIMULATION ************************************************************************************************************ ///

Definition at line 96 of file snn_manager.cpp.

◆ connectCompartments()

short int connectCompartments ( int  grpIdLower,
int  grpIdUpper 
)

Definition at line 217 of file snn_manager.cpp.

◆ createGroup()

int createGroup ( const std::string &  grpName,
const Grid3D grid,
int  neurType,
int  preferredPartition,
ComputingBackend  preferredBackend 
)
Parameters
namethe symbolic name of a group
gridGrid3D struct to create neurons on a 3D grid (x,y,z)
nTypethe type of neuron

Definition at line 252 of file snn_manager.cpp.

◆ createGroupLIF()

int createGroupLIF ( const std::string &  grpName,
const Grid3D grid,
int  neurType,
int  preferredPartition,
ComputingBackend  preferredBackend 
)
Parameters
grpNamethe symbolic name of a group
gridGrid3D struct to create neurons on a 3D grid (x,y,z)
neurTypethe type of neuron
preferredPartitiondefines the desired runtime partition for the group
preferredBackenddefines whether the group will be placed on CPU or GPU

Definition at line 302 of file snn_manager.cpp.

◆ createSpikeGeneratorGroup()

int createSpikeGeneratorGroup ( const std::string &  grpName,
const Grid3D grid,
int  neurType,
int  preferredPartition,
ComputingBackend  preferredBackend 
)
Parameters
namethe symbolic name of a group
gridGrid3D struct to create neurons on a 3D grid (x,y,z)
nTypethe type of neuron, currently only support EXCITATORY NEURON
TODO:
:IS THIS NECESSARY?

Definition at line 349 of file snn_manager.cpp.

◆ exitSimulation()

void exitSimulation ( int  val = 1)

Definition at line 995 of file snn_manager.cpp.

◆ getConductanceAMPA()

std::vector< float > getConductanceAMPA ( int  grpId)

Definition at line 1728 of file snn_manager.cpp.

◆ getConductanceGABAa()

std::vector< float > getConductanceGABAa ( int  grpId)

Definition at line 1761 of file snn_manager.cpp.

◆ getConductanceGABAb()

std::vector< float > getConductanceGABAb ( int  grpId)

Definition at line 1774 of file snn_manager.cpp.

◆ getConductanceNMDA()

std::vector< float > getConductanceNMDA ( int  grpId)

Definition at line 1741 of file snn_manager.cpp.

◆ getConnectConfig()

ConnectConfig getConnectConfig ( short int  connectId)

Definition at line 1717 of file snn_manager.cpp.

◆ getConnectId()

short int getConnectId ( int  grpIdPre,
int  grpIdPost 
)

**************************************************************************************************************** /// GETTERS / SETTERS **************************************************************************************************************** ///

Definition at line 1704 of file snn_manager.cpp.

◆ getCurrent()

float* getCurrent ( )
inline
TODO:
replace with NeuronMonitor

Definition at line 600 of file snn.h.

◆ getDelayRange()

RangeDelay getDelayRange ( short int  connId)

Definition at line 1795 of file snn_manager.cpp.

◆ getDelays()

uint8_t * getDelays ( int  gGrpIdPre,
int  gGrpIdPost,
int &  numPreN,
int &  numPostN 
)
Parameters
gGrpIdPreID of pre-synaptic group
gGrpIdPostID of post-synaptic group
numPreNreturn the number of pre-synaptic neurons
numPostNretrun the number of post-synaptic neurons
delays(optional) return the delay information for all synapses, default = NULL
Returns
delays information for all synapses

Definition at line 1802 of file snn_manager.cpp.

◆ getGroupEndNeuronId()

int getGroupEndNeuronId ( int  gGrpId)
inline

Definition at line 558 of file snn.h.

◆ getGroupGrid3D()

Grid3D getGroupGrid3D ( int  grpId)

Definition at line 1846 of file snn_manager.cpp.

◆ getGroupId()

int getGroupId ( std::string  grpName)

Definition at line 1853 of file snn_manager.cpp.

◆ getGroupName()

std::string getGroupName ( int  grpId)

Definition at line 1865 of file snn_manager.cpp.

◆ getGroupNeuromodulatorInfo()

GroupNeuromodulatorInfo getGroupNeuromodulatorInfo ( int  grpId)

Definition at line 1901 of file snn_manager.cpp.

◆ getGroupNumNeurons()

int getGroupNumNeurons ( int  gGrpId)
inline

Definition at line 559 of file snn.h.

◆ getGroupStartNeuronId()

int getGroupStartNeuronId ( int  gGrpId)
inline

Definition at line 557 of file snn.h.

◆ getGroupSTDPInfo()

GroupSTDPInfo getGroupSTDPInfo ( int  grpId)

Definition at line 1874 of file snn_manager.cpp.

◆ getLogFpDeb()

const FILE* getLogFpDeb ( )
inline

Definition at line 518 of file snn.h.

◆ getLogFpErr()

const FILE* getLogFpErr ( )
inline

Definition at line 516 of file snn.h.

◆ getLogFpInf()

const FILE* getLogFpInf ( )
inline

returns file pointer to info log

Definition at line 514 of file snn.h.

◆ getLogFpLog()

const FILE* getLogFpLog ( )
inline

Definition at line 520 of file snn.h.

◆ getLoggerMode()

LoggerMode getLoggerMode ( )
inline

Definition at line 554 of file snn.h.

◆ getNetworkName()

std::string getNetworkName ( )
inline

Definition at line 561 of file snn.h.

◆ getNeuronLocation3D() [1/2]

Point3D getNeuronLocation3D ( int  grpId,
int  relNeurId 
)

Definition at line 1932 of file snn_manager.cpp.

◆ getNeuronLocation3D() [2/2]

Point3D getNeuronLocation3D ( int  neurId)

Definition at line 1916 of file snn_manager.cpp.

◆ getNeuronMonitor()

NeuronMonitor * getNeuronMonitor ( int  grpId)

Definition at line 1981 of file snn_manager.cpp.

◆ getNeuronMonitorCore()

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.

◆ getNumCompartmentConnections()

int getNumCompartmentConnections ( )
inline

Definition at line 568 of file snn.h.

◆ getNumConnections()

int getNumConnections ( )
inline

Definition at line 566 of file snn.h.

◆ getNumGroups()

int getNumGroups ( )
inline

Definition at line 569 of file snn.h.

◆ getNumNeurons()

int getNumNeurons ( )
inline

Definition at line 570 of file snn.h.

◆ getNumNeuronsGen()

int getNumNeuronsGen ( )
inline

Definition at line 574 of file snn.h.

◆ getNumNeuronsGenExc()

int getNumNeuronsGenExc ( )
inline

Definition at line 575 of file snn.h.

◆ getNumNeuronsGenInh()

int getNumNeuronsGenInh ( )
inline

Definition at line 576 of file snn.h.

◆ getNumNeuronsReg()

int getNumNeuronsReg ( )
inline

Definition at line 571 of file snn.h.

◆ getNumNeuronsRegExc()

int getNumNeuronsRegExc ( )
inline

Definition at line 572 of file snn.h.

◆ getNumNeuronsRegInh()

int getNumNeuronsRegInh ( )
inline

Definition at line 573 of file snn.h.

◆ getNumSynapses()

int getNumSynapses ( )
inline

Definition at line 577 of file snn.h.

◆ getNumSynapticConnections()

int getNumSynapticConnections ( short int  connectionId)

Definition at line 1949 of file snn_manager.cpp.

◆ getRandSeed()

int getRandSeed ( )
inline

Definition at line 579 of file snn.h.

◆ getRFDist3D()

double getRFDist3D ( const RadiusRF radius,
const Point3D pre,
const Point3D post 
)

Definition at line 5071 of file snn_manager.cpp.

◆ getSimTime()

int getSimTime ( )
inline

Definition at line 581 of file snn.h.

◆ getSimTimeMs()

int getSimTimeMs ( )
inline

Definition at line 583 of file snn.h.

◆ getSimTimeSec()

int getSimTimeSec ( )
inline

Definition at line 582 of file snn.h.

◆ getSpikeMonitor()

SpikeMonitor * getSpikeMonitor ( int  grpId)

Definition at line 1960 of file snn_manager.cpp.

◆ getSpikeMonitorCore()

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.

◆ getSTPu()

float* getSTPu ( )
inline
TODO:
replace with NeuronMonitor or ConnectionMonitor

Definition at line 610 of file snn.h.

◆ getSTPx()

float* getSTPx ( )
inline
TODO:
replace with NeuronMonitor or ConnectionMonitor

Definition at line 613 of file snn.h.

◆ getWeightMatrix2D()

std::vector< std::vector< float > > getWeightMatrix2D ( short int  connId)
TODO:
: modify this for multi-GPUs

Definition at line 6233 of file snn_manager.cpp.

◆ getWeightRange()

RangeWeight getWeightRange ( short int  connId)

Definition at line 2003 of file snn_manager.cpp.

◆ isConnectionPlastic()

bool isConnectionPlastic ( short int  connId)

Definition at line 4884 of file snn_manager.cpp.

◆ isDopaminergicGroup()

bool isDopaminergicGroup ( int  gGrpId)
inline

Definition at line 624 of file snn.h.

◆ isExcitatoryGroup()

bool isExcitatoryGroup ( int  gGrpId)
inline

Definition at line 621 of file snn.h.

◆ isGroupWithHomeostasis()

bool isGroupWithHomeostasis ( int  grpId)
TODO:
: distinguish the function call at CONFIG_STATE and SETUP_STATE, where groupConfigs[0][] might not be available

Definition at line 4894 of file snn_manager.cpp.

◆ isInhibitoryGroup()

bool isInhibitoryGroup ( int  gGrpId)
inline

Definition at line 622 of file snn.h.

◆ isPoint3DinRF()

bool isPoint3DinRF ( const RadiusRF radius,
const Point3D pre,
const Point3D post 
)
TODO:
: not sure where this should go... maybe create some helper file?

Definition at line 5062 of file snn_manager.cpp.

◆ isPoissonGroup()

bool isPoissonGroup ( int  gGrpId)
inline

Definition at line 623 of file snn.h.

◆ isSimulationWithCOBA()

bool isSimulationWithCOBA ( )
inline

Definition at line 634 of file snn.h.

◆ isSimulationWithCompartments()

bool isSimulationWithCompartments ( )
inline

Definition at line 633 of file snn.h.

◆ isSimulationWithCUBA()

bool isSimulationWithCUBA ( )
inline

Definition at line 635 of file snn.h.

◆ isSimulationWithFixedWeightsOnly()

bool isSimulationWithFixedWeightsOnly ( )
inline

Definition at line 638 of file snn.h.

◆ isSimulationWithGABAbRise()

bool isSimulationWithGABAbRise ( )
inline

Definition at line 637 of file snn.h.

◆ isSimulationWithHomeostasis()

bool isSimulationWithHomeostasis ( )
inline

Definition at line 639 of file snn.h.

◆ isSimulationWithNMDARise()

bool isSimulationWithNMDARise ( )
inline

Definition at line 636 of file snn.h.

◆ isSimulationWithPlasticWeights()

bool isSimulationWithPlasticWeights ( )
inline

Definition at line 640 of file snn.h.

◆ isSimulationWithSTDP()

bool isSimulationWithSTDP ( )
inline

Definition at line 641 of file snn.h.

◆ isSimulationWithSTP()

bool isSimulationWithSTP ( )
inline

Definition at line 642 of file snn.h.

◆ loadSimulation()

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.

◆ runNetwork()

int runNetwork ( int  _nsec,
int  _nmsec,
bool  printRunSummary 
)
Parameters
[in]printRunSummarywhether 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.

◆ saveSimulation()

void saveSimulation ( FILE *  fid,
bool  saveSynapseInfo = false 
)
TODO:
: replace with faster version

Definition at line 1411 of file snn_manager.cpp.

◆ scaleWeights()

void scaleWeights ( short int  connId,
float  scale,
bool  updateWeightRange = false 
)

Definition at line 1006 of file snn_manager.cpp.

◆ setCompartmentParameters()

void setCompartmentParameters ( int  grpId,
float  couplingUp,
float  couplingDown 
)
Parameters
grpIdthe symbolic name of a group
couplingUpthe coupling constant for upper connections
couplingDownthe coupling constant for lower connections

Definition at line 393 of file snn_manager.cpp.

◆ setConductances()

void setConductances ( bool  isSet,
int  tdAMPA,
int  trNMDA,
int  tdNMDA,
int  tdGABAa,
int  trGABAb,
int  tdGABAb 
)
Parameters
isSetenables the use of COBA mode
tAMPAtime _constant of AMPA decay (ms); for example, 5.0
tNMDAtime constant of NMDA decay (ms); for example, 150.0
tGABAatime constant of GABAa decay (ms); for example, 6.0
tGABAbtime constant of GABAb decay (ms); for example, 150.0

Definition at line 409 of file snn_manager.cpp.

◆ setConnectionMonitor()

ConnectionMonitor * setConnectionMonitor ( int  grpIdPre,
int  grpIdPost,
FILE *  fid 
)
Parameters
[in]grpIdPreID of the pre-synaptic neuron group
[in]grpIdPostID of the post-synaptic neuron group
[in]connectionMonConnectionMonitorCore class
TODO:
: distinguish the function call at CONFIG_STATE and SETUP_STATE, where group(connect)Config[] might not be available

Definition at line 1125 of file snn_manager.cpp.

◆ setESTDP()

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.

◆ setExternalCurrent()

void setExternalCurrent ( int  grpId,
const std::vector< float > &  current 
)

Definition at line 1378 of file snn_manager.cpp.

◆ setGroupMonitor()

GroupMonitor * setGroupMonitor ( int  gGrpId,
FILE *  fid 
)
Parameters
[in]grpIdID of the neuron group
[in]fidfile pointer for recording group status (neuromodulators)
TODO:
: distinguish the function call at CONFIG_STATE and SETUP_STATE, where groupConfigs[0][] might not be available

Definition at line 1088 of file snn_manager.cpp.

◆ setHomeoBaseFiringRate()

void setHomeoBaseFiringRate ( int  groupId,
float  baseFiring,
float  baseFiringSD 
)

Definition at line 481 of file snn_manager.cpp.

◆ setHomeostasis()

void setHomeostasis ( int  grpId,
bool  isSet,
float  homeoScale,
float  avgTimeScale 
)

Definition at line 461 of file snn_manager.cpp.

◆ setIntegrationMethod()

void setIntegrationMethod ( integrationMethod_t  method,
int  numStepsPerMs 
)

Definition at line 497 of file snn_manager.cpp.

◆ setISTDP()

void setISTDP ( int  grpId,
bool  isSet,
STDPType  type,
STDPCurve  curve,
float  ab1,
float  ab2,
float  tau1,
float  tau2 
)
TODO:
: separate STDPType to ESTDPType and ISTDPType

Definition at line 654 of file snn_manager.cpp.

◆ setLogsFp()

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.

◆ setNeuromodulator()

void setNeuromodulator ( int  grpId,
float  baseDP,
float  tauDP,
float  base5HT,
float  tau5HT,
float  baseACh,
float  tauACh,
float  baseNE,
float  tauNE 
)
Parameters
groupIdthe symbolic name of a group
baseDPthe baseline concentration of Dopamine
tauDPthe decay time constant of Dopamine
base5HTthe baseline concentration of Serotonin
tau5HTthe decay time constant of Serotonin
baseAChthe baseline concentration of Acetylcholine
tauAChthe decay time constant of Acetylcholine
baseNEthe baseline concentration of Noradrenaline
tauNEthe decay time constant of Noradrenaline

Definition at line 597 of file snn_manager.cpp.

◆ setNeuronMonitor()

NeuronMonitor * setNeuronMonitor ( int  gid,
FILE *  fid 
)
Parameters
grpIdID of the neuron group
neuronMon(optional) neuronMonitor class
Returns
NeuronMonitor* pointer to a NeuronMonitor object

Definition at line 1222 of file snn_manager.cpp.

◆ setNeuronParameters() [1/2]

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

Parameters
_groupIdthe symbolic name of a group
_athe mean value of izhikevich parameter a
_a_sdthe standard deviation value of izhikevich parameter a
_bthe mean value of izhikevich parameter b
_b_sdthe standard deviation value of izhikevich parameter b
_cthe mean value of izhikevich parameter c
_c_sdthe standard deviation value of izhikevich parameter c
_dthe mean value of izhikevich parameter d
_d_sdthe standard deviation value of izhikevich parameter d

Definition at line 505 of file snn_manager.cpp.

◆ setNeuronParameters() [2/2]

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

Parameters
_groupIdthe symbolic name of a group
_Cthe mean value of izhikevich parameter C
_C_sdthe standart deviation value of izhikevich parameter C
_kthe mean value of izhikevich parameter k
_k_sdthe standart deviation value of izhikevich parameter k
_vrthe mean value of izhikevich parameter vr
_vr_sdthe standart deviation value of izhikevich parameter vr
_vtthe mean value of izhikevich parameter vt
_vt_sdthe standart deviation value of izhikevich parameter vt
_athe mean value of izhikevich parameter a
_a_sdthe standard deviation value of izhikevich parameter a
_bthe mean value of izhikevich parameter b
_b_sdthe standard deviation value of izhikevich parameter b
_vpeakthe mean value of izhikevich parameter vpeak
_vpeak_sdthe standart deviation value of izhikevich parameter vpeak
_cthe mean value of izhikevich parameter c
_c_sdthe standard deviation value of izhikevich parameter c
_dthe mean value of izhikevich parameter d
_d_sdthe standard deviation value of izhikevich parameter d

Definition at line 530 of file snn_manager.cpp.

◆ setNeuronParametersLIF()

void setNeuronParametersLIF ( int  grpId,
int  tau_m,
int  tau_ref,
float  vTh,
float  vReset,
double  minRmem,
double  maxRmem 
)
Parameters
[in]grpIdgroup ID
[in]tau_mMembrane time constant in ms (controls decay/leak)
[in]tau_refabsolute refractory period in ms
[in]vThThreshold voltage for firing (must be > vReset)
[in]vResetMembrane potential resets to this value immediately after spike
[in]minRmemminimum membrane resistance
[in]maxRmemmaximum membrane resistance

Definition at line 575 of file snn_manager.cpp.

◆ setSpikeGenerator()

void setSpikeGenerator ( int  gGrpId,
SpikeGeneratorCore spikeGenFunc 
)
TODO:
: distinguish the function call at CONFIG_STATE and SETUP_STATE, where groupConfigs[0][] might not be available

Definition at line 1174 of file snn_manager.cpp.

◆ setSpikeMonitor()

SpikeMonitor * setSpikeMonitor ( int  gid,
FILE *  fid 
)
Parameters
grpIdID of the neuron group
spikeMon(optional) spikeMonitor class
Returns
SpikeMonitor* pointer to a SpikeMonitor object

Definition at line 1182 of file snn_manager.cpp.

◆ setSpikeRate()

void setSpikeRate ( int  gGrpId,
PoissonRate ratePtr,
int  refPeriod 
)

Input arguments:

Parameters
grpIdID of the neuron group
spikeRatepointer to a PoissonRate instance
refPeriod(optional) refractive period, default = 1
TODO:
: distinguish the function call at CONFIG_STATE and RUN_STATE, where groupConfigs[0][] might not be available

Definition at line 1271 of file snn_manager.cpp.

◆ setSTP()

void setSTP ( int  grpId,
bool  isSet,
float  STP_U,
float  STP_tau_u,
float  STP_tau_x 
)
Parameters
[in]grpIdpre-synaptic group id. STP will apply to all neurons of that group!
[in]isSeta flag whether to enable/disable STP
[in]STP_tau_udecay constant of u (\tau_F)
[in]STP_tau_xdecay constant of x (\tau_D)

Definition at line 700 of file snn_manager.cpp.

◆ setupNetwork()

void setupNetwork ( )
Parameters
[in]removeTempMemoryremove temp memory after building network

************************************************************************************************************ /// PUBLIC METHODS: GENERATE A SIMULATION ************************************************************************************************************ ///

Definition at line 773 of file snn_manager.cpp.

◆ setWeight()

void setWeight ( short int  connId,
int  neurIdPre,
int  neurIdPost,
float  weight,
bool  updateWeightRange = false 
)

Definition at line 1287 of file snn_manager.cpp.

◆ setWeightAndWeightChangeUpdate()

void setWeightAndWeightChangeUpdate ( UpdateInterval  wtANDwtChangeUpdateInterval,
bool  enableWtChangeDecay,
float  wtChangeDecay 
)
Parameters
[in]wtANDwtChangeUpdateIntervalthe interval between two wt (weight) and wtChange (weight change) update.
[in]enableWtChangeDecayenable weight change decay
[in]wtChangeDecaythe decay ratio of weight change (wtChange)

Definition at line 724 of file snn_manager.cpp.

◆ startTesting()

void startTesting ( bool  shallUpdateWeights = true)

Definition at line 6181 of file snn_manager.cpp.

◆ stopTesting()

void stopTesting ( )

Definition at line 6208 of file snn_manager.cpp.

◆ updateConnectionMonitor()

void updateConnectionMonitor ( short int  connId = ALL)

Definition at line 6219 of file snn_manager.cpp.

◆ updateGroupMonitor()

void updateGroupMonitor ( int  grpId = ALL)

Definition at line 6280 of file snn_manager.cpp.

◆ updateNeuronMonitor()

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.

TODO:
: modify this for multi-GPUs

Definition at line 6590 of file snn_manager.cpp.

◆ updateSpikeMonitor()

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.

TODO:
: modify this for multi-GPUs

Definition at line 6479 of file snn_manager.cpp.

Member Data Documentation

◆ MAJOR_VERSION

const unsigned int MAJOR_VERSION = 4
static

Definition at line 138 of file snn.h.

◆ MINOR_VERSION

const unsigned int MINOR_VERSION = 0
static

Definition at line 139 of file snn.h.


The documentation for this class was generated from the following files: