GeNN  4.9.0
GPU enhanced Neuronal Networks (GeNN)
NeuronGroup Class Reference

#include <neuronGroup.h>

Inheritance diagram for NeuronGroup:
NeuronGroupInternal

Classes

struct  SpikeEventThreshold
 Structure used for storing spike event data. More...
 

Public Member Functions

 NeuronGroup (const NeuronGroup &)=delete
 
 NeuronGroup ()=delete
 
void setSpikeLocation (VarLocation loc)
 Set location of this neuron group's output spikes. More...
 
void setSpikeEventLocation (VarLocation loc)
 Set location of this neuron group's output spike events. More...
 
void setSpikeTimeLocation (VarLocation loc)
 Set location of this neuron group's output spike times. More...
 
void setPrevSpikeTimeLocation (VarLocation loc)
 Set location of this neuron group's previous output spike times. More...
 
void setSpikeEventTimeLocation (VarLocation loc)
 Set location of this neuron group's output spike-like-event times. More...
 
void setPrevSpikeEventTimeLocation (VarLocation loc)
 Set location of this neuron group's previous output spike-like-event times. More...
 
void setVarLocation (const std::string &varName, VarLocation loc)
 Set variable location of neuron model state variable. More...
 
void setExtraGlobalParamLocation (const std::string &paramName, VarLocation loc)
 Set location of neuron model extra global parameter. More...
 
void setSpikeRecordingEnabled (bool enabled)
 Enables and disable spike recording for this population. More...
 
void setSpikeEventRecordingEnabled (bool enabled)
 Enables and disable spike event recording for this population. More...
 
const std::string & getName () const
 
unsigned int getNumNeurons () const
 Gets number of neurons in group. More...
 
const NeuronModels::BasegetNeuronModel () const
 Gets the neuron model used by this group. More...
 
const std::vector< double > & getParams () const
 
const std::vector< Models::VarInit > & getVarInitialisers () const
 
bool isSpikeTimeRequired () const
 
bool isPrevSpikeTimeRequired () const
 
bool isSpikeEventTimeRequired () const
 
bool isPrevSpikeEventTimeRequired () const
 
bool isTrueSpikeRequired () const
 
bool isSpikeEventRequired () const
 
unsigned int getNumDelaySlots () const
 
bool isDelayRequired () const
 
bool isZeroCopyEnabled () const
 
VarLocation getSpikeLocation () const
 Get location of this neuron group's output spikes. More...
 
VarLocation getSpikeEventLocation () const
 Get location of this neuron group's output spike events. More...
 
VarLocation getSpikeTimeLocation () const
 Get location of this neuron group's output spike times. More...
 
VarLocation getPrevSpikeTimeLocation () const
 Get location of this neuron group's previous output spike times. More...
 
VarLocation getSpikeEventTimeLocation () const
 Get location of this neuron group's output spike-like-event times. More...
 
VarLocation getPrevSpikeEventTimeLocation () const
 Get location of this neuron group's previous output spike-like-event times. More...
 
VarLocation getVarLocation (const std::string &varName) const
 Get location of neuron model state variable by name. More...
 
VarLocation getVarLocation (size_t index) const
 Get location of neuron model state variable by index. More...
 
VarLocation getExtraGlobalParamLocation (const std::string &paramName) const
 Get location of neuron model extra global parameter by name. More...
 
VarLocation getExtraGlobalParamLocation (size_t index) const
 Get location of neuron model extra global parameter by omdex. More...
 
bool isSpikeRecordingEnabled () const
 Is spike recording enabled for this population? More...
 
bool isSpikeEventRecordingEnabled () const
 Is spike event recording enabled for this population? More...
 
bool isSimRNGRequired () const
 Does this neuron group require an RNG to simulate? More...
 
bool isInitRNGRequired () const
 Does this neuron group require an RNG for it's init code? More...
 
bool isRecordingEnabled () const
 Does this neuron group require any sort of recording? More...
 

Protected Member Functions

 NeuronGroup (const std::string &name, int numNeurons, const NeuronModels::Base *neuronModel, const std::vector< double > &params, const std::vector< Models::VarInit > &varInitialisers, VarLocation defaultVarLocation, VarLocation defaultExtraGlobalParamLocation)
 
void checkNumDelaySlots (unsigned int requiredDelay)
 Checks delay slots currently provided by the neuron group against a required delay and extends if required. More...
 
void updatePreVarQueues (const std::string &code)
 Update which presynaptic variables require queues based on piece of code. More...
 
void updatePostVarQueues (const std::string &code)
 Update which postsynaptic variables require queues based on piece of code. More...
 
void addSpkEventCondition (const std::string &code, SynapseGroupInternal *synapseGroup)
 
void addInSyn (SynapseGroupInternal *synapseGroup)
 
void addOutSyn (SynapseGroupInternal *synapseGroup)
 
void initDerivedParams (double dt)
 
void fusePrePostSynapses (bool fusePSM, bool fusePrePostWUM)
 Fuse incoming postsynaptic models. More...
 
void injectCurrent (CurrentSourceInternal *source)
 add input current source More...
 
const std::vector< SynapseGroupInternal * > & getInSyn () const
 Gets pointers to all synapse groups which provide input to this neuron group. More...
 
const std::vector< SynapseGroupInternal * > & getFusedPSMInSyn () const
 
const std::vector< SynapseGroupInternal * > & getFusedWUPostInSyn () const
 
const std::vector< SynapseGroupInternal * > & getOutSyn () const
 Gets pointers to all synapse groups emanating from this neuron group. More...
 
const std::vector< SynapseGroupInternal * > & getFusedWUPreOutSyn () const
 
const std::vector< SynapseGroupInternal * > & getFusedPreOutputOutSyn () const
 
const std::vector< CurrentSourceInternal * > & getCurrentSources () const
 Gets pointers to all current sources which provide input to this neuron group. More...
 
const std::vector< double > & getDerivedParams () const
 
const std::set< SpikeEventThreshold > & getSpikeEventCondition () const
 
std::vector< SynapseGroupInternal * > getFusedInSynWithPostCode () const
 Helper to get vector of incoming synapse groups which have postsynaptic update code. More...
 
std::vector< SynapseGroupInternal * > getFusedOutSynWithPreCode () const
 Helper to get vector of outgoing synapse groups which have presynaptic update code. More...
 
std::vector< SynapseGroupInternal * > getFusedInSynWithPostVars () const
 Helper to get vector of incoming synapse groups which have postsynaptic variables. More...
 
std::vector< SynapseGroupInternal * > getFusedOutSynWithPreVars () const
 Helper to get vector of outgoing synapse groups which have presynaptic variables. More...
 
bool isVarQueueRequired (const std::string &var) const
 
bool isVarQueueRequired (size_t index) const
 
boost::uuids::detail::sha1::digest_type getHashDigest () const
 Updates hash with neuron group. More...
 
boost::uuids::detail::sha1::digest_type getInitHashDigest () const
 Updates hash with neuron group initialisation. More...
 
boost::uuids::detail::sha1::digest_type getSpikeQueueUpdateHashDigest () const
 
boost::uuids::detail::sha1::digest_type getPrevSpikeTimeUpdateHashDigest () const
 
boost::uuids::detail::sha1::digest_type getVarLocationHashDigest () const
 

Constructor & Destructor Documentation

◆ NeuronGroup() [1/3]

NeuronGroup::NeuronGroup ( const NeuronGroup )
delete

◆ NeuronGroup() [2/3]

NeuronGroup::NeuronGroup ( )
delete

◆ NeuronGroup() [3/3]

NeuronGroup::NeuronGroup ( const std::string &  name,
int  numNeurons,
const NeuronModels::Base neuronModel,
const std::vector< double > &  params,
const std::vector< Models::VarInit > &  varInitialisers,
VarLocation  defaultVarLocation,
VarLocation  defaultExtraGlobalParamLocation 
)
protected

Member Function Documentation

◆ addInSyn()

void NeuronGroup::addInSyn ( SynapseGroupInternal synapseGroup)
inlineprotected

◆ addOutSyn()

void NeuronGroup::addOutSyn ( SynapseGroupInternal synapseGroup)
inlineprotected

◆ addSpkEventCondition()

void NeuronGroup::addSpkEventCondition ( const std::string &  code,
SynapseGroupInternal synapseGroup 
)
protected

◆ checkNumDelaySlots()

void NeuronGroup::checkNumDelaySlots ( unsigned int  requiredDelay)
protected

Checks delay slots currently provided by the neuron group against a required delay and extends if required.

◆ fusePrePostSynapses()

void NeuronGroup::fusePrePostSynapses ( bool  fusePSM,
bool  fusePrePostWUM 
)
protected

Fuse incoming postsynaptic models.

◆ getCurrentSources()

const std::vector<CurrentSourceInternal*>& NeuronGroup::getCurrentSources ( ) const
inlineprotected

Gets pointers to all current sources which provide input to this neuron group.

◆ getDerivedParams()

const std::vector<double>& NeuronGroup::getDerivedParams ( ) const
inlineprotected

◆ getExtraGlobalParamLocation() [1/2]

VarLocation NeuronGroup::getExtraGlobalParamLocation ( const std::string &  paramName) const

Get location of neuron model extra global parameter by name.

This is only used by extra global parameters which are pointers

◆ getExtraGlobalParamLocation() [2/2]

VarLocation NeuronGroup::getExtraGlobalParamLocation ( size_t  index) const
inline

Get location of neuron model extra global parameter by omdex.

This is only used by extra global parameters which are pointers

◆ getFusedInSynWithPostCode()

std::vector< SynapseGroupInternal * > NeuronGroup::getFusedInSynWithPostCode ( ) const
protected

Helper to get vector of incoming synapse groups which have postsynaptic update code.

◆ getFusedInSynWithPostVars()

std::vector< SynapseGroupInternal * > NeuronGroup::getFusedInSynWithPostVars ( ) const
protected

Helper to get vector of incoming synapse groups which have postsynaptic variables.

◆ getFusedOutSynWithPreCode()

std::vector< SynapseGroupInternal * > NeuronGroup::getFusedOutSynWithPreCode ( ) const
protected

Helper to get vector of outgoing synapse groups which have presynaptic update code.

◆ getFusedOutSynWithPreVars()

std::vector< SynapseGroupInternal * > NeuronGroup::getFusedOutSynWithPreVars ( ) const
protected

Helper to get vector of outgoing synapse groups which have presynaptic variables.

◆ getFusedPreOutputOutSyn()

const std::vector<SynapseGroupInternal *>& NeuronGroup::getFusedPreOutputOutSyn ( ) const
inlineprotected

◆ getFusedPSMInSyn()

const std::vector<SynapseGroupInternal*>& NeuronGroup::getFusedPSMInSyn ( ) const
inlineprotected

◆ getFusedWUPostInSyn()

const std::vector<SynapseGroupInternal *>& NeuronGroup::getFusedWUPostInSyn ( ) const
inlineprotected

◆ getFusedWUPreOutSyn()

const std::vector<SynapseGroupInternal *>& NeuronGroup::getFusedWUPreOutSyn ( ) const
inlineprotected

◆ getHashDigest()

boost::uuids::detail::sha1::digest_type NeuronGroup::getHashDigest ( ) const
protected

Updates hash with neuron group.

NOTE: this can only be called after model is finalized

◆ getInitHashDigest()

boost::uuids::detail::sha1::digest_type NeuronGroup::getInitHashDigest ( ) const
protected

Updates hash with neuron group initialisation.

NOTE: this can only be called after model is finalized

◆ getInSyn()

const std::vector<SynapseGroupInternal*>& NeuronGroup::getInSyn ( ) const
inlineprotected

Gets pointers to all synapse groups which provide input to this neuron group.

◆ getName()

const std::string& NeuronGroup::getName ( ) const
inline

◆ getNeuronModel()

const NeuronModels::Base* NeuronGroup::getNeuronModel ( ) const
inline

Gets the neuron model used by this group.

◆ getNumDelaySlots()

unsigned int NeuronGroup::getNumDelaySlots ( ) const
inline

◆ getNumNeurons()

unsigned int NeuronGroup::getNumNeurons ( ) const
inline

Gets number of neurons in group.

◆ getOutSyn()

const std::vector<SynapseGroupInternal*>& NeuronGroup::getOutSyn ( ) const
inlineprotected

Gets pointers to all synapse groups emanating from this neuron group.

◆ getParams()

const std::vector<double>& NeuronGroup::getParams ( ) const
inline

◆ getPrevSpikeEventTimeLocation()

VarLocation NeuronGroup::getPrevSpikeEventTimeLocation ( ) const
inline

Get location of this neuron group's previous output spike-like-event times.

◆ getPrevSpikeTimeLocation()

VarLocation NeuronGroup::getPrevSpikeTimeLocation ( ) const
inline

Get location of this neuron group's previous output spike times.

◆ getPrevSpikeTimeUpdateHashDigest()

boost::uuids::detail::sha1::digest_type NeuronGroup::getPrevSpikeTimeUpdateHashDigest ( ) const
protected

◆ getSpikeEventCondition()

const std::set<SpikeEventThreshold>& NeuronGroup::getSpikeEventCondition ( ) const
inlineprotected

◆ getSpikeEventLocation()

VarLocation NeuronGroup::getSpikeEventLocation ( ) const
inline

Get location of this neuron group's output spike events.

◆ getSpikeEventTimeLocation()

VarLocation NeuronGroup::getSpikeEventTimeLocation ( ) const
inline

Get location of this neuron group's output spike-like-event times.

◆ getSpikeLocation()

VarLocation NeuronGroup::getSpikeLocation ( ) const
inline

Get location of this neuron group's output spikes.

◆ getSpikeQueueUpdateHashDigest()

boost::uuids::detail::sha1::digest_type NeuronGroup::getSpikeQueueUpdateHashDigest ( ) const
protected

◆ getSpikeTimeLocation()

VarLocation NeuronGroup::getSpikeTimeLocation ( ) const
inline

Get location of this neuron group's output spike times.

◆ getVarInitialisers()

const std::vector<Models::VarInit>& NeuronGroup::getVarInitialisers ( ) const
inline

◆ getVarLocation() [1/2]

VarLocation NeuronGroup::getVarLocation ( const std::string &  varName) const

Get location of neuron model state variable by name.

◆ getVarLocation() [2/2]

VarLocation NeuronGroup::getVarLocation ( size_t  index) const
inline

Get location of neuron model state variable by index.

◆ getVarLocationHashDigest()

boost::uuids::detail::sha1::digest_type NeuronGroup::getVarLocationHashDigest ( ) const
protected

◆ initDerivedParams()

void NeuronGroup::initDerivedParams ( double  dt)
protected

◆ injectCurrent()

void NeuronGroup::injectCurrent ( CurrentSourceInternal source)
protected

add input current source

◆ isDelayRequired()

bool NeuronGroup::isDelayRequired ( ) const
inline

◆ isInitRNGRequired()

bool NeuronGroup::isInitRNGRequired ( ) const

Does this neuron group require an RNG for it's init code?

◆ isPrevSpikeEventTimeRequired()

bool NeuronGroup::isPrevSpikeEventTimeRequired ( ) const

◆ isPrevSpikeTimeRequired()

bool NeuronGroup::isPrevSpikeTimeRequired ( ) const

◆ isRecordingEnabled()

bool NeuronGroup::isRecordingEnabled ( ) const

Does this neuron group require any sort of recording?

◆ isSimRNGRequired()

bool NeuronGroup::isSimRNGRequired ( ) const

Does this neuron group require an RNG to simulate?

◆ isSpikeEventRecordingEnabled()

bool NeuronGroup::isSpikeEventRecordingEnabled ( ) const
inline

Is spike event recording enabled for this population?

◆ isSpikeEventRequired()

bool NeuronGroup::isSpikeEventRequired ( ) const

◆ isSpikeEventTimeRequired()

bool NeuronGroup::isSpikeEventTimeRequired ( ) const

◆ isSpikeRecordingEnabled()

bool NeuronGroup::isSpikeRecordingEnabled ( ) const
inline

Is spike recording enabled for this population?

◆ isSpikeTimeRequired()

bool NeuronGroup::isSpikeTimeRequired ( ) const

◆ isTrueSpikeRequired()

bool NeuronGroup::isTrueSpikeRequired ( ) const

◆ isVarQueueRequired() [1/2]

bool NeuronGroup::isVarQueueRequired ( const std::string &  var) const
protected

◆ isVarQueueRequired() [2/2]

bool NeuronGroup::isVarQueueRequired ( size_t  index) const
inlineprotected

◆ isZeroCopyEnabled()

bool NeuronGroup::isZeroCopyEnabled ( ) const

◆ setExtraGlobalParamLocation()

void NeuronGroup::setExtraGlobalParamLocation ( const std::string &  paramName,
VarLocation  loc 
)

Set location of neuron model extra global parameter.

This is ignored for simulations on hardware with a single memory space and only applies to extra global parameters which are pointers.

◆ setPrevSpikeEventTimeLocation()

void NeuronGroup::setPrevSpikeEventTimeLocation ( VarLocation  loc)
inline

Set location of this neuron group's previous output spike-like-event times.

This is ignored for simulations on hardware with a single memory space

◆ setPrevSpikeTimeLocation()

void NeuronGroup::setPrevSpikeTimeLocation ( VarLocation  loc)
inline

Set location of this neuron group's previous output spike times.

This is ignored for simulations on hardware with a single memory space

◆ setSpikeEventLocation()

void NeuronGroup::setSpikeEventLocation ( VarLocation  loc)
inline

Set location of this neuron group's output spike events.

This is ignored for simulations on hardware with a single memory space

◆ setSpikeEventRecordingEnabled()

void NeuronGroup::setSpikeEventRecordingEnabled ( bool  enabled)
inline

Enables and disable spike event recording for this population.

◆ setSpikeEventTimeLocation()

void NeuronGroup::setSpikeEventTimeLocation ( VarLocation  loc)
inline

Set location of this neuron group's output spike-like-event times.

This is ignored for simulations on hardware with a single memory space

◆ setSpikeLocation()

void NeuronGroup::setSpikeLocation ( VarLocation  loc)
inline

Set location of this neuron group's output spikes.

This is ignored for simulations on hardware with a single memory space

◆ setSpikeRecordingEnabled()

void NeuronGroup::setSpikeRecordingEnabled ( bool  enabled)
inline

Enables and disable spike recording for this population.

◆ setSpikeTimeLocation()

void NeuronGroup::setSpikeTimeLocation ( VarLocation  loc)
inline

Set location of this neuron group's output spike times.

This is ignored for simulations on hardware with a single memory space

◆ setVarLocation()

void NeuronGroup::setVarLocation ( const std::string &  varName,
VarLocation  loc 
)

Set variable location of neuron model state variable.

This is ignored for simulations on hardware with a single memory space

◆ updatePostVarQueues()

void NeuronGroup::updatePostVarQueues ( const std::string &  code)
protected

Update which postsynaptic variables require queues based on piece of code.

◆ updatePreVarQueues()

void NeuronGroup::updatePreVarQueues ( const std::string &  code)
protected

Update which presynaptic variables require queues based on piece of code.


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