80 #if defined(WIN32) || defined(WIN64) 94 #define srand48(x) srand(x) 98 #define drand48() (double(rand())/RAND_MAX) 104 #include <sys/stat.h> 251 short int connect(
int grpId1,
int grpId2,
const std::string& connType,
const RangeWeight& wt,
float connProb,
253 float mulSynFast=1.0f,
float mulSynSlow=1.0f);
270 short int connect(
int grpId1,
int grpId2,
ConnectionGenerator* conn,
float mulSynFast,
float mulSynSlow,
281 short int connectCompartments(
int grpIdLower,
int grpIdUpper);
289 int createGroup(
const std::string& grpName,
int nNeur,
int neurType,
int preferredPartition =
ANY,
ComputingBackend preferredBackend =
CPU_CORES);
296 int createGroupLIF(
const std::string& grpName,
int nNeur,
int neurType,
int preferredPartition =
ANY,
ComputingBackend preferredBackend =
CPU_CORES);
338 int createSpikeGeneratorGroup(
const std::string& grpName,
int nNeur,
int neurType,
int preferredPartition =
ANY,
ComputingBackend preferredBackend =
CPU_CORES);
356 int createSpikeGeneratorGroup(
const std::string& grpName,
const Grid3D& grid,
int neurType,
int preferredPartition =
ANY,
ComputingBackend preferredBackend =
CPU_CORES);
372 void setConductances(
bool isSet);
390 void setConductances(
bool isSet,
int tdAMPA,
int tdNMDA,
int tdGABAa,
int tdGABAb);
412 void setConductances(
bool isSet,
int tdAMPA,
int trNMDA,
int tdNMDA,
int tdGABAa,
int trGABAb,
int tdGABAb);
414 #ifdef LN_I_CALC_TYPES 427 void setConductances(
int grpId,
bool isSet);
441 void setConductances(
int grpId,
bool isSet,
int tdAMPA,
int tdNMDA,
int tdGABAa,
int tdGABAb);
457 void setConductances(
int grpId,
bool isSet,
int tdAMPA,
int trNMDA,
int tdNMDA,
int tdGABAa,
int trGABAb,
int tdGABAb);
469 void setACNE12(
int grpId);
480 void setNM4weighted(
int grpId,
IcalcType type,
float wDA=1.f,
float w5HT=1.f,
float wACh=1.f,
float wNE=1.f,
float wNorm=4.f,
float wBase=1.0f);
512 void setHomeostasis(
int grpId,
bool isSet,
float homeoScale,
float avgTimeScale);
528 void setHomeostasis(
int grpId,
bool isSet);
547 void setHomeoBaseFiringRate(
int grpId,
float baseFiring,
float baseFiringSD=0.0f);
582 void setNeuronParameters(
int grpId,
float izh_a,
float izh_a_sd,
float izh_b,
float izh_b_sd,
583 float izh_c,
float izh_c_sd,
float izh_d,
float izh_d_sd);
591 void setNeuronParameters(
int grpId,
float izh_a,
float izh_b,
float izh_c,
float izh_d);
612 void setNeuronParameters(
int grpId,
float izh_C,
float izh_k,
float izh_vr,
float izh_vt,
613 float izh_a,
float izh_b,
float izh_vpeak,
float izh_c,
float izh_d);
644 void setNeuronParameters(
int grpId,
float izh_C,
float izh_C_sd,
float izh_k,
float izh_k_sd,
645 float izh_vr,
float izh_vr_sd,
float izh_vt,
float izh_vt_sd,
646 float izh_a,
float izh_a_sd,
float izh_b,
float izh_b_sd,
647 float izh_vpeak,
float izh_vpeak_sd,
float izh_c,
float izh_c_sd,
648 float izh_d,
float izh_d_sd);
661 void setNeuronParametersLIF(
int grpId,
int tau_m,
int tau_ref=0,
float vTh=1.0f,
float vReset=0.0f,
const RangeRmem& rMem =
RangeRmem(1.0f));
672 void setCompartmentParameters(
int grpId,
float couplingUp,
float couplingDown);
689 void setNeuromodulator(
int grpId,
float baseDP,
float tauDP,
float base5HT,
float tau5HT,
690 float baseACh,
float tauACh,
float baseNE,
float tauNE);
693 void setNeuromodulator(
int grpId,
694 float baseDP,
float tauDP,
float releaseDP,
bool activeDP,
695 float base5HT,
float tau5HT,
float release5HT,
bool active5HT,
696 float baseACh,
float tauACh,
float releaseAch,
bool activeACh,
697 float baseNE,
float tauNE,
float releaseNE,
bool activeNE);
707 void setNeuromodulator(
int grpId,
float tauDP = 100.0f,
float tau5HT = 100.0f,
708 float tauACh = 100.0f,
float tauNE = 100.0f);
719 void setSTDP(
int preGrpId,
int postGrpId,
bool isSet);
730 void setSTDP(
int preGrpId,
int postGrpId,
bool isSet,
STDPType type,
float alphaPlus,
float tauPlus,
float alphaMinus,
float tauMinus);
741 void setESTDP(
int preGrpId,
int postGrpId,
bool isSet);
756 void setESTDP(
int preGrpId,
int postGrpId,
bool isSet,
STDPType type,
ExpCurve curve);
758 #ifdef LN_I_CALC_TYPES 771 void setConnectionModulation(
int preGrpId,
int postGrpId,
IcalcType icalcType);
801 void setISTDP(
int preGrpId,
int postGrpId,
bool isSet);
816 void setISTDP(
int preGrpId,
int postGrpId,
bool isSet,
STDPType type,
ExpCurve curve);
831 void setISTDP(
int preGrpId,
int postGrpId,
bool isSet,
STDPType type,
PulseCurve curve);
862 void setSTP(
int grpId,
bool isSet,
float STP_U,
float STP_tau_u,
float STP_tau_x);
885 void setSTP(
int grpId,
bool isSet);
887 #ifdef LN_I_CALC_TYPES 931 void setNM4STP(
int grpId,
float wSTP_U[],
float wSTP_tau_u[],
float wSTP_tau_x[]);
942 void setWeightAndWeightChangeUpdate(
UpdateInterval wtANDwtChangeUpdateInterval,
bool enableWtChangeDecay,
float wtChangeDecay=0.9f);
955 int runNetwork(
int nSec,
int nMsec=0,
bool printRunSummary=
true);
965 void setupNetworkMT();
969 const FILE* getLogFpInf();
970 const FILE* getLogFpErr();
971 const FILE* getLogFpDeb();
972 const FILE* getLogFpLog();
991 void saveSimulation(
const std::string& fileName,
bool saveSynapseInfo=
true);
1007 void setLogFile(
const std::string& fileName);
1027 void setLogsFpCustom(FILE* fpInf=NULL, FILE* fpErr=NULL, FILE* fpDeb=NULL, FILE* fpLog=NULL);
1055 void biasWeights(
short int connId,
float bias,
bool updateWeightRange=
false);
1076 void loadSimulation(FILE* fid);
1119 void scaleWeights(
short int connId,
float scale,
bool updateWeightRange=
false);
1153 ConnectionMonitor* setConnectionMonitor(
int grpIdPre,
int grpIdPost,
const std::string& fname);
1192 void setExternalCurrent(
int grpId,
const std::vector<float>& current);
1222 void setExternalCurrent(
int grpId,
float current);
1232 GroupMonitor* setGroupMonitor(
int grpId,
const std::string& fname,
int mode=0);
1323 SpikeMonitor* setSpikeMonitor(
int grpId,
const std::string& fileName);
1367 NeuronMonitor* setNeuronMonitor(
int grpId,
const std::string& fileName);
1386 void setSpikeRate(
int grpId,
PoissonRate* spikeRate,
int refPeriod=1);
1415 void setWeight(
short int connId,
int neurIdPre,
int neurIdPost,
float weight,
bool updateWeightRange=
false);
1438 void startTesting(
bool updateWeights=
true);
1484 #ifdef LN_GET_FIRING 1493 void getFiring(std::vector<bool>& firing,
int netId=-1);
1496 #ifdef LN_GET_FIRING_MT 1497 void getFiringMT(std::vector<bool>& firing,
int netId);
1500 #ifdef LN_AXON_PLAST 1508 void findWavefrontPath(std::vector<int>& path, std::vector<float>& eligibility,
int netId,
int grpId,
int startNId,
int goalNId);
1521 bool updateDelays(
int gGrpIdPre,
int gGrpIdPost, std::vector<std::tuple<int, int, uint8_t>> connDelays);
1535 void printEntrails(
char* buffer,
unsigned length,
int gGrpIdPre,
int gGrpIdPost);
1547 std::vector<float> getConductanceAMPA(
int grpId);
1556 std::vector<float> getConductanceNMDA(
int grpId);
1565 std::vector<float> getConductanceGABAa(
int grpId);
1574 std::vector<float> getConductanceGABAb(
int grpId);
1595 uint8_t* getDelays(
int gIDpre,
int gIDpost,
int& Npre,
int& Npost);
1610 Grid3D getGroupGrid3D(
int grpId);
1618 int getGroupId(std::string grpName);
1626 std::string getGroupName(
int grpId);
1646 Point3D getNeuronLocation3D(
int neurId);
1654 int getMaxNumCompConnections();
1677 Point3D getNeuronLocation3D(
int grpId,
int relNeurId);
1687 int getNeuronId(
int grpId,
Point3D location);
1700 int getNumConnections();
1708 int getNumSynapticConnections(
short int connectionId);
1726 int getNumNeurons();
1735 int getNumNeuronsReg();
1744 int getNumNeuronsRegExc();
1753 int getNumNeuronsRegInh();
1762 int getNumNeuronsGen();
1771 int getNumNeuronsGenExc();
1780 int getNumNeuronsGenInh();
1788 int getNumSynapses();
1796 int getGroupStartNeuronId(
int grpId);
1804 int getGroupEndNeuronId(
int grpId);
1812 int getGroupNumNeurons(
int grpId);
1847 int getSimTimeSec();
1855 int getSimTimeMsec();
1934 bool isConnectionPlastic(
short int connId);
1945 bool isGroupWithHomeostasis(
int grpId);
1958 bool isSimulationWithCOBA();
1970 bool isSimulationWithCUBA();
1972 #ifdef LN_I_CALC_TYPES 1974 bool isGroupWith(
int grpId,
IcalcType icalcType);
1976 bool isGroupWithCOBA(
int grpId);
1978 bool isGroupWithCUBA(
int grpId);
1992 bool getConductanceConfig(
int grpId,
float& dAMPA,
float& rNMDA,
float& dNMDA,
float& dGABAa,
float& rGABAb,
float& dGABAb);
1994 bool getConductanceConfig(
int grpId,
int& tdAMPA,
int& trNMDA,
int& tdNMDA,
int& tdGABAa,
int& trGABAb,
int& tdGABAb);
2004 bool isExcitatoryGroup(
int grpId);
2012 bool isInhibitoryGroup(
int grpId);
2020 bool isPoissonGroup(
int grpId);
2035 void setDefaultConductanceTimeConstants(
int tdAMPA,
int trNMDA,
int tdNMDA,
int tdGABAa,
int trGABAb,
int tdGABAb);
2043 void setDefaultHomeostasisParams(
float homeoScale,
float avgTimeScale);
2051 void setDefaultSaveOptions(std::string fileName,
bool saveSynapseInfo);
2061 void setDefaultSTDPparams(
float alphaPlus,
float tauPlus,
float alphaMinus,
float tauMinus,
STDPType stdpType);
2071 void setDefaultESTDPparams(
float alphaPlus,
float tauPlus,
float alphaMinus,
float tauMinus,
STDPType stdpType);
2081 void setDefaultISTDPparams(
float betaLTP,
float betaLTD,
float lambda,
float delta,
STDPType stdpType);
2104 void setDefaultSTPparams(
int neurType,
float STP_U,
float STP_tau_u,
float STP_tau_x);
2110 static int cudaDeviceCount();
2115 static void cudaDeviceDescription(
unsigned ithGPU,
const char **desc);
Class for generating Poisson spike trains.
x86/x64 Multi Core Processor (LN20201016)
A struct for retrieving STDP related information of a connection.
CARLsim User Interface This class provides a user interface to the public sections of CARLsimCore sou...
A struct to assign a timing-based E-STDP curve.
UpdateInterval
Update frequency for weights.
A struct to arrange neurons on a 3D grid (a primitive cubic Bravais lattice with cubic side length 1)...
struct to assign a pulse I-STDP curve
Struct defines the minimum and maximum membrane resisatnces of the LIF neuron group.
User mode, for experiment-oriented simulations.
IcalcType
input current calculation
integrationMethod_t
Integration methods.
a range struct for synaptic delays
A struct for retrieving neuromodulator information of a group.
A struct to assign exponential STDP curves.
a range struct for synaptic weight magnitudes
ComputingBackend
computing backend
#define ANY
used for create* method to specify any GPU or a specific GPU
CARLsimState
CARLsim states.
model is run on CPU core(s)
A struct to specify the receptive field (RF) radius in 3 dimensions.