GeNN  3.3.0
GPU enhanced Neuronal Networks (GeNN)
modelSpec.h File Reference

Header file that contains the class (struct) definition of neuronModel for defining a neuron model and the class definition of NNmodel for defining a neuronal network model. Part of the code generation and generated code sections. More...

#include "neuronGroup.h"
#include "synapseGroup.h"
#include "currentSource.h"
#include "utils.h"
#include <map>
#include <set>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

class  NNmodel
 

Macros

#define _MODELSPEC_H_
 macro for avoiding multiple inclusion during compilation More...
 
#define NO_DELAY   0
 Macro used to indicate no synapse delay for the group (only one queue slot will be generated) More...
 
#define NOLEARNING   0
 Macro attaching the label "NOLEARNING" to flag 0. More...
 
#define LEARNING   1
 Macro attaching the label "LEARNING" to flag 1. More...
 
#define EXITSYN   0
 Macro attaching the label "EXITSYN" to flag 0 (excitatory synapse) More...
 
#define INHIBSYN   1
 Macro attaching the label "INHIBSYN" to flag 1 (inhibitory synapse) More...
 
#define CPU   0
 Macro attaching the label "CPU" to flag 0. More...
 
#define GPU   1
 Macro attaching the label "GPU" to flag 1. More...
 
#define AUTODEVICE   -1
 Macro attaching the label AUTODEVICE to flag -1. Used by setGPUDevice. More...
 

Enumerations

enum  SynapseConnType { ALLTOALL, DENSE, SPARSE }
 
enum  SynapseGType { INDIVIDUALG, GLOBALG, INDIVIDUALID }
 
enum  FloatType { , GENN_LONG_DOUBLE }
 
enum  TimePrecision { TimePrecision::DEFAULT, TimePrecision::FLOAT, TimePrecision::DOUBLE }
 

Functions

void initGeNN ()
 Method for GeNN initialisation (by preparing standard models) More...
 
template<typename S >
NewModels::VarInit initVar (const typename S::ParamValues &params)
 
template<typename S >
std::enable_if< std::is_same< typename S::ParamValues, Snippet::ValueBase< 0 > >::value, NewModels::VarInit >::type initVar ()
 
NewModels::VarInit uninitialisedVar ()
 
template<typename S >
InitSparseConnectivitySnippet::Init initConnectivity (const typename S::ParamValues &params)
 
template<typename S >
std::enable_if< std::is_same< typename S::ParamValues, Snippet::ValueBase< 0 > >::value, InitSparseConnectivitySnippet::Init >::type initConnectivity ()
 
InitSparseConnectivitySnippet::Init uninitialisedConnectivity ()
 

Variables

unsigned int GeNNReady
 

Detailed Description

Header file that contains the class (struct) definition of neuronModel for defining a neuron model and the class definition of NNmodel for defining a neuronal network model. Part of the code generation and generated code sections.

Macro Definition Documentation

◆ _MODELSPEC_H_

#define _MODELSPEC_H_

macro for avoiding multiple inclusion during compilation

◆ AUTODEVICE

#define AUTODEVICE   -1

Macro attaching the label AUTODEVICE to flag -1. Used by setGPUDevice.

◆ CPU

#define CPU   0

Macro attaching the label "CPU" to flag 0.

◆ EXITSYN

#define EXITSYN   0

Macro attaching the label "EXITSYN" to flag 0 (excitatory synapse)

◆ GPU

#define GPU   1

Macro attaching the label "GPU" to flag 1.

Floating point precision to use for models

◆ INHIBSYN

#define INHIBSYN   1

Macro attaching the label "INHIBSYN" to flag 1 (inhibitory synapse)

◆ LEARNING

#define LEARNING   1

Macro attaching the label "LEARNING" to flag 1.

◆ NO_DELAY

#define NO_DELAY   0

Macro used to indicate no synapse delay for the group (only one queue slot will be generated)

◆ NOLEARNING

#define NOLEARNING   0

Macro attaching the label "NOLEARNING" to flag 0.

Enumeration Type Documentation

◆ FloatType

enum FloatType
Enumerator
GENN_LONG_DOUBLE 

◆ SynapseConnType

Enumerator
ALLTOALL 
DENSE 
SPARSE 

◆ SynapseGType

Enumerator
INDIVIDUALG 
GLOBALG 
INDIVIDUALID 

◆ TimePrecision

enum TimePrecision
strong
Enumerator
DEFAULT 

Time uses default model precision.

FLOAT 

Time uses single precision - not suitable for long simulations.

DOUBLE 

Time uses double precision - may reduce performance.

Function Documentation

◆ initConnectivity() [1/2]

template<typename S >
InitSparseConnectivitySnippet::Init initConnectivity ( const typename S::ParamValues &  params)
inline

◆ initConnectivity() [2/2]

template<typename S >
std::enable_if<std::is_same<typename S::ParamValues, Snippet::ValueBase<0> >::value, InitSparseConnectivitySnippet::Init>::type initConnectivity ( )
inline

◆ initGeNN()

void initGeNN ( )

Method for GeNN initialisation (by preparing standard models)

◆ initVar() [1/2]

template<typename S >
NewModels::VarInit initVar ( const typename S::ParamValues &  params)
inline

◆ initVar() [2/2]

template<typename S >
std::enable_if<std::is_same<typename S::ParamValues, Snippet::ValueBase<0> >::value, NewModels::VarInit>::type initVar ( )
inline

◆ uninitialisedConnectivity()

InitSparseConnectivitySnippet::Init uninitialisedConnectivity ( )
inline

◆ uninitialisedVar()

NewModels::VarInit uninitialisedVar ( )
inline

Variable Documentation

◆ GeNNReady

unsigned int GeNNReady