GeNN  4.9.0
GPU enhanced Neuronal Networks (GeNN)
CodeGenerator::ModelSpecMerged Class Reference

#include <modelSpecMerged.h>

Classes

struct  EGPField
 Immutable structure for tracking fields of merged group structure containing EGPs. More...
 
struct  MergedEGP
 Immutable structure for tracking where an extra global variable ends up after merging. More...
 

Public Types

typedef std::unordered_multimap< std::string, MergedEGPMergedEGPDestinations
 Map of original extra global param names to their locations within merged structures. More...
 
typedef std::map< std::string, MergedEGPDestinationsMergedEGPMap
 

Public Member Functions

 ModelSpecMerged (const ModelSpecInternal &model, const BackendBase &backend)
 
const ModelSpecInternalgetModel () const
 Get underlying, unmerged model. More...
 
const std::vector< NeuronUpdateGroupMerged > & getMergedNeuronUpdateGroups () const
 Get merged neuron groups which require updating. More...
 
const std::vector< PresynapticUpdateGroupMerged > & getMergedPresynapticUpdateGroups () const
 Get merged synapse groups which require presynaptic updates. More...
 
const std::vector< PostsynapticUpdateGroupMerged > & getMergedPostsynapticUpdateGroups () const
 Get merged synapse groups which require postsynaptic updates. More...
 
const std::vector< SynapseDynamicsGroupMerged > & getMergedSynapseDynamicsGroups () const
 Get merged synapse groups which require synapse dynamics. More...
 
const std::vector< NeuronInitGroupMerged > & getMergedNeuronInitGroups () const
 Get merged neuron groups which require initialisation. More...
 
const std::vector< CustomUpdateInitGroupMerged > & getMergedCustomUpdateInitGroups () const
 Get merged custom update groups which require initialisation. More...
 
const std::vector< CustomWUUpdateInitGroupMerged > & getMergedCustomWUUpdateInitGroups () const
 Get merged custom updategroups with dense connectivity which require initialisation. More...
 
const std::vector< SynapseInitGroupMerged > & getMergedSynapseInitGroups () const
 Get merged synapse groups with dense connectivity which require initialisation. More...
 
const std::vector< SynapseConnectivityInitGroupMerged > & getMergedSynapseConnectivityInitGroups () const
 Get merged synapse groups which require connectivity initialisation. More...
 
const std::vector< SynapseSparseInitGroupMerged > & getMergedSynapseSparseInitGroups () const
 Get merged synapse groups with sparse connectivity which require initialisation. More...
 
const std::vector< CustomWUUpdateSparseInitGroupMerged > & getMergedCustomWUUpdateSparseInitGroups () const
 Get merged custom update groups with sparse connectivity which require initialisation. More...
 
const std::vector< NeuronSpikeQueueUpdateGroupMerged > & getMergedNeuronSpikeQueueUpdateGroups () const
 Get merged neuron groups which require their spike queues updating. More...
 
const std::vector< NeuronPrevSpikeTimeUpdateGroupMerged > & getMergedNeuronPrevSpikeTimeUpdateGroups () const
 Get merged neuron groups which require their previous spike times updating. More...
 
const std::vector< SynapseDendriticDelayUpdateGroupMerged > & getMergedSynapseDendriticDelayUpdateGroups () const
 Get merged synapse groups which require their dendritic delay updating. More...
 
const std::vector< SynapseConnectivityHostInitGroupMerged > & getMergedSynapseConnectivityHostInitGroups () const
 Get merged synapse groups which require host code to initialise their synaptic connectivity. More...
 
const std::vector< CustomUpdateGroupMerged > & getMergedCustomUpdateGroups () const
 Get merged custom updates of variables. More...
 
const std::vector< CustomUpdateWUGroupMerged > & getMergedCustomUpdateWUGroups () const
 Get merged custom updates of weight update model variables. More...
 
const std::vector< CustomUpdateTransposeWUGroupMerged > & getMergedCustomUpdateTransposeWUGroups () const
 Get merged custom weight update groups where transpose needs to be calculated. More...
 
const std::vector< CustomUpdateHostReductionGroupMerged > & getMergedCustomUpdateHostReductionGroups () const
 Get merged custom update groups where host reduction needs to be performed. More...
 
const std::vector< CustomWUUpdateHostReductionGroupMerged > & getMergedCustomWUUpdateHostReductionGroups () const
 Get merged custom weight update groups where host reduction needs to be performed. More...
 
void genMergedNeuronUpdateGroupStructs (CodeStream &os, const BackendBase &backend) const
 
void genMergedPresynapticUpdateGroupStructs (CodeStream &os, const BackendBase &backend) const
 
void genMergedPostsynapticUpdateGroupStructs (CodeStream &os, const BackendBase &backend) const
 
void genMergedSynapseDynamicsGroupStructs (CodeStream &os, const BackendBase &backend) const
 
void genMergedNeuronInitGroupStructs (CodeStream &os, const BackendBase &backend) const
 
void genMergedCustomUpdateInitGroupStructs (CodeStream &os, const BackendBase &backend) const
 
void genMergedCustomWUUpdateInitGroupStructs (CodeStream &os, const BackendBase &backend) const
 
void genMergedSynapseInitGroupStructs (CodeStream &os, const BackendBase &backend) const
 
void genMergedSynapseConnectivityInitGroupStructs (CodeStream &os, const BackendBase &backend) const
 
void genMergedSynapseSparseInitGroupStructs (CodeStream &os, const BackendBase &backend) const
 
void genMergedCustomWUUpdateSparseInitGroupStructs (CodeStream &os, const BackendBase &backend) const
 
void genMergedNeuronSpikeQueueUpdateStructs (CodeStream &os, const BackendBase &backend) const
 
void genMergedNeuronPrevSpikeTimeUpdateStructs (CodeStream &os, const BackendBase &backend) const
 
void genMergedSynapseDendriticDelayUpdateStructs (CodeStream &os, const BackendBase &backend) const
 
void genMergedSynapseConnectivityHostInitStructs (CodeStream &os, const BackendBase &backend) const
 
void genMergedCustomUpdateStructs (CodeStream &os, const BackendBase &backend) const
 
void genMergedCustomUpdateWUStructs (CodeStream &os, const BackendBase &backend) const
 
void genMergedCustomUpdateTransposeWUStructs (CodeStream &os, const BackendBase &backend) const
 
void genMergedCustomUpdateHostReductionStructs (CodeStream &os, const BackendBase &backend) const
 
void genMergedCustomWUUpdateHostReductionStructs (CodeStream &os, const BackendBase &backend) const
 
void genNeuronUpdateGroupSupportCode (CodeStream &os, bool supportsNamespace=true) const
 
void genPostsynapticDynamicsSupportCode (CodeStream &os, bool supportsNamespace=true) const
 
void genPresynapticUpdateSupportCode (CodeStream &os, bool supportsNamespace=true) const
 
void genPostsynapticUpdateSupportCode (CodeStream &os, bool supportsNamespace=true) const
 
void genSynapseDynamicsSupportCode (CodeStream &os, bool supportsNamespace=true) const
 
const std::string & getNeuronUpdateSupportCodeNamespace (const std::string &code) const
 
const std::string & getPostsynapticDynamicsSupportCodeNamespace (const std::string &code) const
 
const std::string & getPresynapticUpdateSupportCodeNamespace (const std::string &code) const
 
const std::string & getPostsynapticUpdateSupportCodeNamespace (const std::string &code) const
 
const std::string & getSynapseDynamicsSupportCodeNamespace (const std::string &code) const
 
boost::uuids::detail::sha1::digest_type getHashDigest (const BackendBase &backend) const
 Get hash digest of entire model. More...
 
boost::uuids::detail::sha1::digest_type getNeuronUpdateArchetypeHashDigest () const
 Get hash digest of neuron update module. More...
 
boost::uuids::detail::sha1::digest_type getSynapseUpdateArchetypeHashDigest () const
 Get hash digest of synapse update module. More...
 
boost::uuids::detail::sha1::digest_type getCustomUpdateArchetypeHashDigest () const
 Get hash digest of custom update module. More...
 
boost::uuids::detail::sha1::digest_type getInitArchetypeHashDigest () const
 Get hash digest of init module. More...
 
bool anyPointerEGPs () const
 Does model have any EGPs? More...
 
const MergedEGPDestinationsgetMergedEGPDestinations (const std::string &name, const BackendBase &backend) const
 Get the map of destinations within the merged data structures for a particular extra global parameter. More...
 
template<typename T >
void genScalarEGPPush (CodeStream &os, const BackendBase &backend) const
 Generate calls to update all target merged groups. More...
 
template<typename T >
std::set< EGPFieldgetMergedGroupFields () const
 
template<typename T >
void genMergedGroupPush (CodeStream &os, const std::vector< T > &groups, const BackendBase &backend) const
 

Member Typedef Documentation

◆ MergedEGPDestinations

typedef std::unordered_multimap<std::string, MergedEGP> CodeGenerator::ModelSpecMerged::MergedEGPDestinations

Map of original extra global param names to their locations within merged structures.

◆ MergedEGPMap

Constructor & Destructor Documentation

◆ ModelSpecMerged()

ModelSpecMerged::ModelSpecMerged ( const ModelSpecInternal model,
const BackendBase backend 
)

Member Function Documentation

◆ anyPointerEGPs()

bool ModelSpecMerged::anyPointerEGPs ( ) const

Does model have any EGPs?

◆ genMergedCustomUpdateHostReductionStructs()

void CodeGenerator::ModelSpecMerged::genMergedCustomUpdateHostReductionStructs ( CodeStream os,
const BackendBase backend 
) const
inline

◆ genMergedCustomUpdateInitGroupStructs()

void CodeGenerator::ModelSpecMerged::genMergedCustomUpdateInitGroupStructs ( CodeStream os,
const BackendBase backend 
) const
inline

◆ genMergedCustomUpdateStructs()

void CodeGenerator::ModelSpecMerged::genMergedCustomUpdateStructs ( CodeStream os,
const BackendBase backend 
) const
inline

◆ genMergedCustomUpdateTransposeWUStructs()

void CodeGenerator::ModelSpecMerged::genMergedCustomUpdateTransposeWUStructs ( CodeStream os,
const BackendBase backend 
) const
inline

◆ genMergedCustomUpdateWUStructs()

void CodeGenerator::ModelSpecMerged::genMergedCustomUpdateWUStructs ( CodeStream os,
const BackendBase backend 
) const
inline

◆ genMergedCustomWUUpdateHostReductionStructs()

void CodeGenerator::ModelSpecMerged::genMergedCustomWUUpdateHostReductionStructs ( CodeStream os,
const BackendBase backend 
) const
inline

◆ genMergedCustomWUUpdateInitGroupStructs()

void CodeGenerator::ModelSpecMerged::genMergedCustomWUUpdateInitGroupStructs ( CodeStream os,
const BackendBase backend 
) const
inline

◆ genMergedCustomWUUpdateSparseInitGroupStructs()

void CodeGenerator::ModelSpecMerged::genMergedCustomWUUpdateSparseInitGroupStructs ( CodeStream os,
const BackendBase backend 
) const
inline

◆ genMergedGroupPush()

template<typename T >
void CodeGenerator::ModelSpecMerged::genMergedGroupPush ( CodeStream os,
const std::vector< T > &  groups,
const BackendBase backend 
) const
inline

◆ genMergedNeuronInitGroupStructs()

void CodeGenerator::ModelSpecMerged::genMergedNeuronInitGroupStructs ( CodeStream os,
const BackendBase backend 
) const
inline

◆ genMergedNeuronPrevSpikeTimeUpdateStructs()

void CodeGenerator::ModelSpecMerged::genMergedNeuronPrevSpikeTimeUpdateStructs ( CodeStream os,
const BackendBase backend 
) const
inline

◆ genMergedNeuronSpikeQueueUpdateStructs()

void CodeGenerator::ModelSpecMerged::genMergedNeuronSpikeQueueUpdateStructs ( CodeStream os,
const BackendBase backend 
) const
inline

◆ genMergedNeuronUpdateGroupStructs()

void CodeGenerator::ModelSpecMerged::genMergedNeuronUpdateGroupStructs ( CodeStream os,
const BackendBase backend 
) const
inline

◆ genMergedPostsynapticUpdateGroupStructs()

void CodeGenerator::ModelSpecMerged::genMergedPostsynapticUpdateGroupStructs ( CodeStream os,
const BackendBase backend 
) const
inline

◆ genMergedPresynapticUpdateGroupStructs()

void CodeGenerator::ModelSpecMerged::genMergedPresynapticUpdateGroupStructs ( CodeStream os,
const BackendBase backend 
) const
inline

◆ genMergedSynapseConnectivityHostInitStructs()

void CodeGenerator::ModelSpecMerged::genMergedSynapseConnectivityHostInitStructs ( CodeStream os,
const BackendBase backend 
) const
inline

◆ genMergedSynapseConnectivityInitGroupStructs()

void CodeGenerator::ModelSpecMerged::genMergedSynapseConnectivityInitGroupStructs ( CodeStream os,
const BackendBase backend 
) const
inline

◆ genMergedSynapseDendriticDelayUpdateStructs()

void CodeGenerator::ModelSpecMerged::genMergedSynapseDendriticDelayUpdateStructs ( CodeStream os,
const BackendBase backend 
) const
inline

◆ genMergedSynapseDynamicsGroupStructs()

void CodeGenerator::ModelSpecMerged::genMergedSynapseDynamicsGroupStructs ( CodeStream os,
const BackendBase backend 
) const
inline

◆ genMergedSynapseInitGroupStructs()

void CodeGenerator::ModelSpecMerged::genMergedSynapseInitGroupStructs ( CodeStream os,
const BackendBase backend 
) const
inline

◆ genMergedSynapseSparseInitGroupStructs()

void CodeGenerator::ModelSpecMerged::genMergedSynapseSparseInitGroupStructs ( CodeStream os,
const BackendBase backend 
) const
inline

◆ genNeuronUpdateGroupSupportCode()

void CodeGenerator::ModelSpecMerged::genNeuronUpdateGroupSupportCode ( CodeStream os,
bool  supportsNamespace = true 
) const
inline

◆ genPostsynapticDynamicsSupportCode()

void CodeGenerator::ModelSpecMerged::genPostsynapticDynamicsSupportCode ( CodeStream os,
bool  supportsNamespace = true 
) const
inline

◆ genPostsynapticUpdateSupportCode()

void CodeGenerator::ModelSpecMerged::genPostsynapticUpdateSupportCode ( CodeStream os,
bool  supportsNamespace = true 
) const
inline

◆ genPresynapticUpdateSupportCode()

void CodeGenerator::ModelSpecMerged::genPresynapticUpdateSupportCode ( CodeStream os,
bool  supportsNamespace = true 
) const
inline

◆ genScalarEGPPush()

template<typename T >
void CodeGenerator::ModelSpecMerged::genScalarEGPPush ( CodeStream os,
const BackendBase backend 
) const
inline

Generate calls to update all target merged groups.

◆ genSynapseDynamicsSupportCode()

void CodeGenerator::ModelSpecMerged::genSynapseDynamicsSupportCode ( CodeStream os,
bool  supportsNamespace = true 
) const
inline

◆ getCustomUpdateArchetypeHashDigest()

boost::uuids::detail::sha1::digest_type ModelSpecMerged::getCustomUpdateArchetypeHashDigest ( ) const

Get hash digest of custom update module.

◆ getHashDigest()

boost::uuids::detail::sha1::digest_type ModelSpecMerged::getHashDigest ( const BackendBase backend) const

Get hash digest of entire model.

◆ getInitArchetypeHashDigest()

boost::uuids::detail::sha1::digest_type ModelSpecMerged::getInitArchetypeHashDigest ( ) const

Get hash digest of init module.

◆ getMergedCustomUpdateGroups()

const std::vector<CustomUpdateGroupMerged>& CodeGenerator::ModelSpecMerged::getMergedCustomUpdateGroups ( ) const
inline

Get merged custom updates of variables.

◆ getMergedCustomUpdateHostReductionGroups()

const std::vector<CustomUpdateHostReductionGroupMerged>& CodeGenerator::ModelSpecMerged::getMergedCustomUpdateHostReductionGroups ( ) const
inline

Get merged custom update groups where host reduction needs to be performed.

◆ getMergedCustomUpdateInitGroups()

const std::vector<CustomUpdateInitGroupMerged>& CodeGenerator::ModelSpecMerged::getMergedCustomUpdateInitGroups ( ) const
inline

Get merged custom update groups which require initialisation.

◆ getMergedCustomUpdateTransposeWUGroups()

const std::vector<CustomUpdateTransposeWUGroupMerged>& CodeGenerator::ModelSpecMerged::getMergedCustomUpdateTransposeWUGroups ( ) const
inline

Get merged custom weight update groups where transpose needs to be calculated.

◆ getMergedCustomUpdateWUGroups()

const std::vector<CustomUpdateWUGroupMerged>& CodeGenerator::ModelSpecMerged::getMergedCustomUpdateWUGroups ( ) const
inline

Get merged custom updates of weight update model variables.

◆ getMergedCustomWUUpdateHostReductionGroups()

const std::vector<CustomWUUpdateHostReductionGroupMerged>& CodeGenerator::ModelSpecMerged::getMergedCustomWUUpdateHostReductionGroups ( ) const
inline

Get merged custom weight update groups where host reduction needs to be performed.

◆ getMergedCustomWUUpdateInitGroups()

const std::vector<CustomWUUpdateInitGroupMerged>& CodeGenerator::ModelSpecMerged::getMergedCustomWUUpdateInitGroups ( ) const
inline

Get merged custom updategroups with dense connectivity which require initialisation.

◆ getMergedCustomWUUpdateSparseInitGroups()

const std::vector<CustomWUUpdateSparseInitGroupMerged>& CodeGenerator::ModelSpecMerged::getMergedCustomWUUpdateSparseInitGroups ( ) const
inline

Get merged custom update groups with sparse connectivity which require initialisation.

◆ getMergedEGPDestinations()

const MergedEGPDestinations& CodeGenerator::ModelSpecMerged::getMergedEGPDestinations ( const std::string &  name,
const BackendBase backend 
) const
inline

Get the map of destinations within the merged data structures for a particular extra global parameter.

◆ getMergedGroupFields()

template<typename T >
std::set<EGPField> CodeGenerator::ModelSpecMerged::getMergedGroupFields ( ) const
inline

◆ getMergedNeuronInitGroups()

const std::vector<NeuronInitGroupMerged>& CodeGenerator::ModelSpecMerged::getMergedNeuronInitGroups ( ) const
inline

Get merged neuron groups which require initialisation.

◆ getMergedNeuronPrevSpikeTimeUpdateGroups()

const std::vector<NeuronPrevSpikeTimeUpdateGroupMerged>& CodeGenerator::ModelSpecMerged::getMergedNeuronPrevSpikeTimeUpdateGroups ( ) const
inline

Get merged neuron groups which require their previous spike times updating.

◆ getMergedNeuronSpikeQueueUpdateGroups()

const std::vector<NeuronSpikeQueueUpdateGroupMerged>& CodeGenerator::ModelSpecMerged::getMergedNeuronSpikeQueueUpdateGroups ( ) const
inline

Get merged neuron groups which require their spike queues updating.

◆ getMergedNeuronUpdateGroups()

const std::vector<NeuronUpdateGroupMerged>& CodeGenerator::ModelSpecMerged::getMergedNeuronUpdateGroups ( ) const
inline

Get merged neuron groups which require updating.

◆ getMergedPostsynapticUpdateGroups()

const std::vector<PostsynapticUpdateGroupMerged>& CodeGenerator::ModelSpecMerged::getMergedPostsynapticUpdateGroups ( ) const
inline

Get merged synapse groups which require postsynaptic updates.

◆ getMergedPresynapticUpdateGroups()

const std::vector<PresynapticUpdateGroupMerged>& CodeGenerator::ModelSpecMerged::getMergedPresynapticUpdateGroups ( ) const
inline

Get merged synapse groups which require presynaptic updates.

◆ getMergedSynapseConnectivityHostInitGroups()

const std::vector<SynapseConnectivityHostInitGroupMerged>& CodeGenerator::ModelSpecMerged::getMergedSynapseConnectivityHostInitGroups ( ) const
inline

Get merged synapse groups which require host code to initialise their synaptic connectivity.

◆ getMergedSynapseConnectivityInitGroups()

const std::vector<SynapseConnectivityInitGroupMerged>& CodeGenerator::ModelSpecMerged::getMergedSynapseConnectivityInitGroups ( ) const
inline

Get merged synapse groups which require connectivity initialisation.

◆ getMergedSynapseDendriticDelayUpdateGroups()

const std::vector<SynapseDendriticDelayUpdateGroupMerged>& CodeGenerator::ModelSpecMerged::getMergedSynapseDendriticDelayUpdateGroups ( ) const
inline

Get merged synapse groups which require their dendritic delay updating.

◆ getMergedSynapseDynamicsGroups()

const std::vector<SynapseDynamicsGroupMerged>& CodeGenerator::ModelSpecMerged::getMergedSynapseDynamicsGroups ( ) const
inline

Get merged synapse groups which require synapse dynamics.

◆ getMergedSynapseInitGroups()

const std::vector<SynapseInitGroupMerged>& CodeGenerator::ModelSpecMerged::getMergedSynapseInitGroups ( ) const
inline

Get merged synapse groups with dense connectivity which require initialisation.

◆ getMergedSynapseSparseInitGroups()

const std::vector<SynapseSparseInitGroupMerged>& CodeGenerator::ModelSpecMerged::getMergedSynapseSparseInitGroups ( ) const
inline

Get merged synapse groups with sparse connectivity which require initialisation.

◆ getModel()

const ModelSpecInternal& CodeGenerator::ModelSpecMerged::getModel ( ) const
inline

Get underlying, unmerged model.

◆ getNeuronUpdateArchetypeHashDigest()

boost::uuids::detail::sha1::digest_type ModelSpecMerged::getNeuronUpdateArchetypeHashDigest ( ) const

Get hash digest of neuron update module.

◆ getNeuronUpdateSupportCodeNamespace()

const std::string& CodeGenerator::ModelSpecMerged::getNeuronUpdateSupportCodeNamespace ( const std::string &  code) const
inline

◆ getPostsynapticDynamicsSupportCodeNamespace()

const std::string& CodeGenerator::ModelSpecMerged::getPostsynapticDynamicsSupportCodeNamespace ( const std::string &  code) const
inline

◆ getPostsynapticUpdateSupportCodeNamespace()

const std::string& CodeGenerator::ModelSpecMerged::getPostsynapticUpdateSupportCodeNamespace ( const std::string &  code) const
inline

◆ getPresynapticUpdateSupportCodeNamespace()

const std::string& CodeGenerator::ModelSpecMerged::getPresynapticUpdateSupportCodeNamespace ( const std::string &  code) const
inline

◆ getSynapseDynamicsSupportCodeNamespace()

const std::string& CodeGenerator::ModelSpecMerged::getSynapseDynamicsSupportCodeNamespace ( const std::string &  code) const
inline

◆ getSynapseUpdateArchetypeHashDigest()

boost::uuids::detail::sha1::digest_type ModelSpecMerged::getSynapseUpdateArchetypeHashDigest ( ) const

Get hash digest of synapse update module.


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