CARLsim  6.1.0
CARLsim: a GPU-accelerated SNN simulator
carlsim_datastructures.h File Reference
#include <ostream>
#include <user_errors.h>
Include dependency graph for carlsim_datastructures.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ConnSTDPInfo_s
 A struct for retrieving STDP related information of a connection. More...
 
struct  ExpCurve
 A struct to assign exponential STDP curves. More...
 
struct  Grid3D
 A struct to arrange neurons on a 3D grid (a primitive cubic Bravais lattice with cubic side length 1) More...
 
struct  GroupNeuromodulatorInfo_s
 A struct for retrieving neuromodulator information of a group. More...
 
struct  PkaPlcModulation
 
struct  PulseCurve
 struct to assign a pulse I-STDP curve More...
 
struct  RadiusRF
 A struct to specify the receptive field (RF) radius in 3 dimensions. More...
 
struct  RangeDelay
 a range struct for synaptic delays More...
 
struct  RangeRmem
 Struct defines the minimum and maximum membrane resisatnces of the LIF neuron group. More...
 
struct  RangeWeight
 a range struct for synaptic weight magnitudes More...
 
struct  TimingBasedCurve
 A struct to assign a timing-based E-STDP curve. More...
 

Typedefs

typedef struct ConnSTDPInfo_s ConnSTDPInfo
 A struct for retrieving STDP related information of a connection. More...
 
typedef struct GroupNeuromodulatorInfo_s GroupNeuromodulatorInfo
 A struct for retrieving neuromodulator information of a group. More...
 

Enumerations

enum  CARLsimState { CONFIG_STATE, SETUP_STATE, RUN_STATE }
 CARLsim states. More...
 
enum  ComputingBackend { CPU_CORES, GPU_CORES }
 computing backend More...
 
enum  IcalcType {
  CUBA, COBA, NM4W_LN21, GPCR_NB14,
  DASEAC_CK09, ACNE_ANCK12, ACNE_K12, ACNE_K13,
  D1D2_AK12, ACDA_BK19, alpha1_ADK13, alpha2A_ADK13,
  D1_ADK13, D2_AK15, UNKNOWN_ICALC
}
 input current calculation More...
 
enum  integrationMethod_t { FORWARD_EULER, RUNGE_KUTTA4, UNKNOWN_INTEGRATION }
 Integration methods. More...
 
enum  LoggerMode {
  USER, DEVELOPER, SHOWTIME, SILENT,
  CUSTOM, UNKNOWN_LOGGER
}
 Logger modes. More...
 
enum  Neuromodulator {
  NM_DA, NM_5HT, NM_ACh, NM_NE,
  NM_UNKNOWN
}
 GroupMonitor flag. More...
 
enum  SimMode { CPU_MODE, GPU_MODE, HYBRID_MODE }
 simulation mode More...
 
enum  SpikeMonMode { COUNT, AER }
 SpikeMonitor mode. More...
 
enum  STDPCurve { EXP_CURVE, PULSE_CURVE, TIMING_BASED_CURVE, UNKNOWN_CURVE }
 STDP curves. More...
 
enum  STDPType {
  STANDARD, DA_MOD, SE_MOD, AC_MOD,
  NE_MOD, AC_DA_MOD, AC_NE_MOD, SE_DA_MOD,
  NM4_MOD, PKA_PLC_MOD, UNKNOWN_STDP
}
 STDP flavors. More...
 
enum  UpdateInterval { INTERVAL_10MS, INTERVAL_100MS, INTERVAL_1000MS }
 Update frequency for weights. More...
 

Variables

static const char * carlsimState_string []
 
static const char * ComputingBackend_string []
 LN20201016. More...
 
static const char * IcalcType_string []
 
static const char * integrationMethod_string []
 
static const char * loggerMode_string []
 
static const char * neuromodulator_string []
 
static const char * simMode_string []
 
static const char * spikeMonMode_string []
 
static const char * stdpCurve_string []
 
static const char * stdpType_desc []
 
static const char * stdpType_string []
 
static const char * updateInterval_string []
 

Typedef Documentation

◆ ConnSTDPInfo

typedef struct ConnSTDPInfo_s ConnSTDPInfo

The struct is used in test suite only. CARLsim API call provides a getter function CARLsim::getConnSTDPInfo() for retrieving STDP related information of a connection. A developer can write his/her test cases to test the STDP parameters

See also
CARLsim::getConnSTDPInfo()

◆ GroupNeuromodulatorInfo

The struct is used in test suite only. CARLsim API call provides a getter function CARLsim::getGroupNeuromodulatorInfo() for retrieving neuromodulator information of a group. A developer can write his/her test cases to test the neuromodulator parameters

See also
CARLsim::getGroupNeuromodulatorInfo()

Enumeration Type Documentation

◆ CARLsimState

A CARLsim simulation goes through the following states: CONFIG_STATE configuration state, where the neural network is configured SETUP_STATE setup state, where the neural network is prepared for execution RUN_STATE run state, where the simulation is executed Certain methods can only be called in certain states. Check their documentation to see which method can be called in which state.

Certain methods perform state transitions. CARLsim::setupNetwork will change the state from CONFIG_STATE to SETUP_STATE. The first call to CARLsim::runNetwork will change the state from SETUP_STATE to RUN_STATE.

Enumerator
CONFIG_STATE 

configuration state, where the neural network is configured

SETUP_STATE 

setup state, where the neural network is prepared for execution and monitors are set

RUN_STATE 

run state, where the model is stepped

Definition at line 384 of file carlsim_datastructures.h.

◆ ComputingBackend

CARLsim supports execution on standard x86 CPU Cores or off-the-shelf NVIDIA GPU (CUDA Cores)

Enumerator
CPU_CORES 

x86/x64 Multi Core Processor (LN20201016)

GPU_CORES 

NVIDIA Many CUDA Core Processor (LN20201016)

Definition at line 149 of file carlsim_datastructures.h.

◆ IcalcType

enum IcalcType

CARLsim6 extends the current calculation for the post synaptic neuron that was CUBA and COBA in the following ways: it now can be configured on neuron group level, for instance on group is CUBA and the other COBA. Also the conductance parameters can be configured individually on distinct groups to be more biorealistic. More than that, CARlsim6 respects now the distinct neuromodulator state in the target neuron group that affects the receptors and so the the effective input current used by the Izhikevich model.

Enumerator
CUBA 

current

COBA 

conductance

NM4W_LN21 

4 NM weighted (and normalized,boosted,damped), Niedermeier (2021)

GPCR_NB14 

G protein-coupled receptors for 2 modulators and conductance, Nadim, Bucher (2014)

DASEAC_CK09 

dopamine,serotonin,acetylcholine modulated Cox, Krichmar (2009)

ACNE_ANCK12 

acetylcholin, norepinephrine modulated Avery, Nitz, Chiba, Krichmar (2012)

ACNE_K12 

acetylcholin, norepinephrine modulated Krichmar (2012)

ACNE_K13 

acetylcholin, norepinephrine modulated Krichmar (2013)

D1D2_AK12 

D1,D2 dopamine receptors Avery, Krichmar (2012)

ACDA_BK19 

acetylcholin influence to dopamine, Belkaid, Krichmar (2019)

alpha1_ADK13 

NE alpha1 receptor with DA antagonist, Avery, Dutt, Krichmar (2013)

alpha2A_ADK13 

NE alpha2 receptor (connection), Avery, Dutt, Krichmar (2013)

D1_ADK13 

DA D1 receptor (connection), Avery, Dutt, Krichmar (2013)

D2_AK15 

DA D2 receptor (connection), Avery, Krichmar (2015)

UNKNOWN_ICALC 

used to initialize by default constructor

Definition at line 256 of file carlsim_datastructures.h.

◆ integrationMethod_t

CARLsim supports different integration methods. Currently available:

FORWARD_EULER: Forward-Euler (aka Euler method). Most basic explicit method for numerical integration of ODEs. Suggest time step of 0.5ms or lower for stability. RUNGE_KUTTA4: Fourth-order Runge-Kutta (aka classical Runge-Kutta, aka RK4). Suggest time step of 0.1ms or lower.

Enumerator
FORWARD_EULER 
RUNGE_KUTTA4 
UNKNOWN_INTEGRATION 

Definition at line 134 of file carlsim_datastructures.h.

◆ LoggerMode

enum LoggerMode

The logger mode defines where to print all status, error, and debug messages. Several predefined modes exist (USER, DEVELOPER, SHOWTIME, SILENT). However, the user can also set each file pointer to a location of their choice (CUSTOM mode). The following logger modes exist: USER User mode, for experiment-oriented simulations. Errors and warnings go to stderr, status information goes to stdout. Debug information can only be found in the log file. DEVELOPER Developer mode, for developing and debugging code. Same as user, but additionally, all debug information is printed to stdout. SHOWTIME Showtime mode, will only output warnings and errors. SILENT Silent mode, no output is generated. CUSTOM Custom mode, the user can set the location of all the file pointers.

The following file pointers exist: fpOut_ where CARLSIM_INFO messages go fpErr_ where CARLSIM_ERROR and CARLSIM_WARN messages go fpDeb_ where CARLSIM_DEBUG messages go fpLog_ typically a log file, where all of the above messages go

The file pointers are automatically set to different locations, depending on the loggerMode:

*          |    USER    | DEVELOPER  |  SHOWTIME  |   SILENT   |  CUSTOM
* ---------|------------|------------|------------|------------|---------
* fpOut_   |   stdout   |   stdout   | /dev/null  | /dev/null  |    ?
* fpErr_   |   stderr   |   stderr   |   stderr   | /dev/null  |    ?
* fpDeb_   | /dev/null  |   stdout   | /dev/null  | /dev/null  |    ?
* fpLog_   | debug.log  | debug.log  | debug.log  | /dev/null  |    ?
* 

Location of the debug log file can be set in any mode using CARLsim::setLogDebugFp. In mode CUSTOM, the other file pointers can be set using CARLsim::setLogsFp.

Enumerator
USER 

User mode, for experiment-oriented simulations.

DEVELOPER 

Developer mode, for developing and debugging code.

SHOWTIME 

Showtime mode, will only output warnings and errors.

SILENT 

Silent mode, no output is generated.

CUSTOM 

Custom mode, the user can set the location of all the file pointers.

UNKNOWN_LOGGER 

Definition at line 92 of file carlsim_datastructures.h.

◆ Neuromodulator

To monitor concentration of neuromodulator through GroupMonitor following flags can be used NM_DA Dopamine NM_5HT Serotonin NM_ACh Acetylcholine NM_NE Noradrenaline

Enumerator
NM_DA 

dopamine

NM_5HT 

serotonin

NM_ACh 

acetylcholine

NM_NE 
NM_UNKNOWN 

unknown type

TODO:
synonym norepinephrine

Definition at line 339 of file carlsim_datastructures.h.

◆ SimMode

enum SimMode

CARLsim supports execution on standard x86 central processing units (CPUs) and off-the-shelf NVIDIA GPUs.

When creating a new CARLsim object, you can set your prefferred simulation mode: CPU_MODE: run on CPU core(s) GPU_MODE: try to run on GPU card(s), if any HYBRID_MODE: allow CARLsim to decide running on CPU Core(s), GPU card(s) or both

Enumerator
CPU_MODE 

model is run on CPU core(s)

GPU_MODE 

model is run on GPU card(s)

HYBRID_MODE 

model is run on CPU Core(s), GPU card(s) or both

Definition at line 115 of file carlsim_datastructures.h.

◆ SpikeMonMode

SpikeMonitors can be run in different modes: COUNT: Will collect only spike count information (such as number of spikes per neuron), not the explicit spike times. COUNT mode cannot retrieve exact spike times per neuron, and is thus not capable of computing spike train correlation etc. AER: Will collect spike information in AER format (will collect both neuron IDs and spike times).

Enumerator
COUNT 

mode in which only spike count information is collected

AER 

mode in which spike information is collected in AER format

Definition at line 321 of file carlsim_datastructures.h.

◆ STDPCurve

enum STDPCurve

CARLsim supports different STDP curves

Enumerator
EXP_CURVE 

standard exponential curve

PULSE_CURVE 

symmetric pulse curve

TIMING_BASED_CURVE 

timing-based curve

UNKNOWN_CURVE 

unknown curve type

Definition at line 298 of file carlsim_datastructures.h.

◆ STDPType

enum STDPType

CARLsim6 supports extents the two different flavors of STDP. STANDARD: The standard model of Bi & Poo (2001), nearest-neighbor. DA_MOD: Dopamine-modulated STDP, nearest-neighbor.

Enumerator
STANDARD 

standard STDP of Bi & Poo (2001), nearest-neighbor

DA_MOD 

dopamine-modulated STDP, nearest-neighbor

SE_MOD 

serotonin-modulated STDP, nearest-neighbor

AC_MOD 

acetylcholine-modulated STDP, nearest-neighbor

NE_MOD 

norepinephrine-modulated STDP, nearest-neighbor

AC_DA_MOD 

acetylcholine-influenced dopamine-modulated STDP, Belkaid & Krichmar (2019)

AC_NE_MOD 

acetylcholine-norephinephrine encoded uncertainty, Avery & Krichmar (2017)

SE_DA_MOD 

serotonin-dopamin cost/reward assessment, Asher, Craig, Zaldivar, Brewer, Krichmar (2013)

NM4_MOD 

multivariate modulatated STDP, (experimental)

PKA_PLC_MOD 

protein kinase/phospholiphase controlled LTP/LPD adopted from Nadim & Bucher (2014)

UNKNOWN_STDP 

Definition at line 168 of file carlsim_datastructures.h.

◆ UpdateInterval

CARLsim supports different update frequency for weight update and weightChange update INTERVAL_10MS: the update interval will be 10 ms, which is 100Hz update frequency INTERVAL_100MS: the update interval will be 100 ms, which is 10Hz update frequency INTERVAL_1000MS: the update interval will be 1000 ms, which is 1Hz update frequency

Enumerator
INTERVAL_10MS 

the update interval will be 10 ms, which is 100Hz update frequency

INTERVAL_100MS 

the update interval will be 100 ms, which is 10Hz update frequency

INTERVAL_1000MS 

the update interval will be 1000 ms, which is 1Hz update frequency

Definition at line 362 of file carlsim_datastructures.h.

Variable Documentation

◆ carlsimState_string

const char* carlsimState_string[]
static
Initial value:
= {
"Configuration state", "Setup state", "Run state"
}

Definition at line 389 of file carlsim_datastructures.h.

◆ ComputingBackend_string

const char* ComputingBackend_string[]
static
Initial value:
= {
"CPU (x86/x64 Multi Core Processor)",
"GPU (NVIDIA Many CUDA Core Processor)",
}

Definition at line 154 of file carlsim_datastructures.h.

◆ IcalcType_string

const char* IcalcType_string[]
static
Initial value:
= {
"CUBA",
"COBA",
"NM4-mod.(LN21)",
"GPCRs(NB14)"
"DA/5HT/ACh-mod.(CK09)",
"ACh/NE-mod.(ANCK12)",
"ACh/NE-mod.(K12)",
"ACh/NE-mod.(K13)",
"D1,D2-rec.(AK12)",
"ACh->DA(BK19)",
"alpha1(ADK13)",
"alpha2A(ADK13)",
"D1(ADK13)",
"D2(AK15)",
"Unknown mode"
}

Definition at line 274 of file carlsim_datastructures.h.

◆ integrationMethod_string

const char* integrationMethod_string[]
static
Initial value:
= {
"Forward-Euler", "4-th order Runge-Kutta", "Unknown integration method"
}

Definition at line 139 of file carlsim_datastructures.h.

◆ loggerMode_string

const char* loggerMode_string[]
static
Initial value:
= {
"USER","DEVELOPER","SHOWTIME","SILENT","CUSTOM","Unknown mode"
}

Definition at line 100 of file carlsim_datastructures.h.

◆ neuromodulator_string

const char* neuromodulator_string[]
static
Initial value:
= {
"Dopamine",
"Serotonin",
"Acetylcholine",
"Noradrenaline",
"Unknown neuromodulator"
}

Definition at line 346 of file carlsim_datastructures.h.

◆ simMode_string

const char* simMode_string[]
static
Initial value:
= {
"CPU mode","GPU mode","Hybrid mode"
}

Definition at line 120 of file carlsim_datastructures.h.

◆ spikeMonMode_string

const char* spikeMonMode_string[]
static
Initial value:
= {
"SpikeCount Mode","SpikeTime Mode"
}

Definition at line 325 of file carlsim_datastructures.h.

◆ stdpCurve_string

const char* stdpCurve_string[]
static
Initial value:
= {
"exponential curve",
"pulse curve",
"timing-based curve",
"Unknow curve"
}

Definition at line 304 of file carlsim_datastructures.h.

◆ stdpType_desc

const char* stdpType_desc[]
static
Initial value:
= {
"Standard STDP",
"Dopamine-modulated STDP",
"Serotonin-modulated STDP",
"Acetylcholine-modulated STDP",
"Norepinphrine-modulated STDP",
"Acetylcholine-influenced-Dopamine-modulated STDP",
"Acetylcholine-Norephinephrine encoded uncertainty STDP",
"Serotonin-Dopamin encoded cost/reward STDP",
"Multivariate-modulated STDP",
"PKA/PLC-modulated STDP",
"Unknown mode"
}

Definition at line 219 of file carlsim_datastructures.h.

◆ stdpType_string

const char* stdpType_string[]
static
Initial value:
= {
"STANDARD",
"DA_MOD",
"SE_MOD",
"AC_MOD",
"NE_MOD",
"AC_DA_MOD",
"AC_NE_MOD",
"SE_DA_MOD",
"NM4_MOD",
"PKA_PLC_MOD",
"UNKNOWN_STDP"
}

Definition at line 194 of file carlsim_datastructures.h.

◆ updateInterval_string

const char* updateInterval_string[]
static
Initial value:
= {
"10 ms interval", "100 ms interval", "1000 ms interval"
}

Definition at line 367 of file carlsim_datastructures.h.