CARLsim  4.1.0
CARLsim: a GPU-accelerated SNN simulator
carlsim_datastructures.h File Reference
#include <ostream>
#include <user_errors.h>

Go to the source code of this file.

Classes

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  GroupSTDPInfo_s
 A struct for retrieving STDP related information of a group. More...
 
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 GroupNeuromodulatorInfo_s GroupNeuromodulatorInfo
 A struct for retrieving neuromodulator information of a group. More...
 
typedef struct GroupSTDPInfo_s GroupSTDPInfo
 A struct for retrieving STDP related 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  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, 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 * 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_string []
 
static const char * updateInterval_string []
 

Typedef Documentation

◆ 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()

◆ GroupSTDPInfo

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

See also
CARLsim::getGroupSTDPInfo()

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 259 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 
GPU_CORES 

Definition at line 147 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 132 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 90 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 

noradrenaline

NM_UNKNOWN 

unknown type

Definition at line 218 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 113 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 200 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 177 of file carlsim_datastructures.h.

◆ STDPType

enum STDPType

CARLsim supports 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

UNKNOWN_STDP 

Definition at line 160 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 237 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 264 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 137 of file carlsim_datastructures.h.

◆ loggerMode_string

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

Definition at line 98 of file carlsim_datastructures.h.

◆ neuromodulator_string

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

Definition at line 225 of file carlsim_datastructures.h.

◆ simMode_string

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

Definition at line 118 of file carlsim_datastructures.h.

◆ spikeMonMode_string

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

Definition at line 204 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 183 of file carlsim_datastructures.h.

◆ stdpType_string

const char* stdpType_string[]
static
Initial value:
= {
"Standard STDP",
"Dopamine-modulated STDP",
"Unknown mode"
}

Definition at line 166 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 242 of file carlsim_datastructures.h.