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

#include <initGroupMerged.h>

Inheritance diagram for CodeGenerator::SynapseInitGroupMerged:
CodeGenerator::SynapseGroupMergedBase CodeGenerator::GroupMerged< SynapseGroupInternal >

Public Member Functions

 SynapseInitGroupMerged (size_t index, const std::string &precision, const std::string &timePrecision, const BackendBase &backend, const std::vector< std::reference_wrapper< const SynapseGroupInternal >> &groups)
 
boost::uuids::detail::sha1::digest_type getHashDigest () const
 
void generateRunner (const BackendBase &backend, CodeStream &definitionsInternal, CodeStream &definitionsInternalFunc, CodeStream &definitionsInternalVar, CodeStream &runnerVarDecl, CodeStream &runnerMergedStructAlloc) const
 
void generateInit (const BackendBase &backend, CodeStream &os, const ModelSpecMerged &modelMerged, Substitutions &popSubs) const
 
- Public Member Functions inherited from CodeGenerator::SynapseGroupMergedBase
bool isWUParamHeterogeneous (size_t paramIndex) const
 Should the weight update model parameter be implemented heterogeneously? More...
 
bool isWUDerivedParamHeterogeneous (size_t paramIndex) const
 Should the weight update model derived parameter be implemented heterogeneously? More...
 
bool isWUGlobalVarHeterogeneous (size_t varIndex) const
 Should the GLOBALG weight update model variable be implemented heterogeneously? More...
 
bool isWUVarInitParamHeterogeneous (size_t varIndex, size_t paramIndex) const
 Should the weight update model variable initialization parameter be implemented heterogeneously? More...
 
bool isWUVarInitDerivedParamHeterogeneous (size_t varIndex, size_t paramIndex) const
 Should the weight update model variable initialization derived parameter be implemented heterogeneously? More...
 
bool isSparseConnectivityInitParamHeterogeneous (size_t paramIndex) const
 Should the sparse connectivity initialization parameter be implemented heterogeneously? More...
 
bool isSparseConnectivityInitDerivedParamHeterogeneous (size_t paramIndex) const
 Should the sparse connectivity initialization parameter be implemented heterogeneously? More...
 
bool isToeplitzConnectivityInitParamHeterogeneous (size_t paramIndex) const
 Should the Toeplitz connectivity initialization parameter be implemented heterogeneously? More...
 
bool isToeplitzConnectivityInitDerivedParamHeterogeneous (size_t paramIndex) const
 Should the Toeplitz connectivity initialization parameter be implemented heterogeneously? More...
 
bool isSrcNeuronParamHeterogeneous (size_t paramIndex) const
 Is presynaptic neuron parameter heterogeneous? More...
 
bool isSrcNeuronDerivedParamHeterogeneous (size_t paramIndex) const
 Is presynaptic neuron derived parameter heterogeneous? More...
 
bool isTrgNeuronParamHeterogeneous (size_t paramIndex) const
 Is postsynaptic neuron parameter heterogeneous? More...
 
bool isTrgNeuronDerivedParamHeterogeneous (size_t paramIndex) const
 Is postsynaptic neuron derived parameter heterogeneous? More...
 
bool isKernelSizeHeterogeneous (size_t dimensionIndex) const
 Is kernel size heterogeneous in this dimension? More...
 
std::string getKernelSize (size_t dimensionIndex) const
 Get expression for kernel size in dimension (may be literal or group->kernelSizeXXX) More...
 
void genKernelIndex (std::ostream &os, const CodeGenerator::Substitutions &subs) const
 Generate an index into a kernel based on the id_kernel_XXX variables in subs. More...
 
std::string getPreSlot (unsigned int batchSize) const
 
std::string getPostSlot (unsigned int batchSize) const
 
std::string getPreVarIndex (unsigned int batchSize, VarAccessDuplication varDuplication, const std::string &index) const
 
std::string getPostVarIndex (unsigned int batchSize, VarAccessDuplication varDuplication, const std::string &index) const
 
std::string getPreWUVarIndex (unsigned int batchSize, VarAccessDuplication varDuplication, const std::string &index) const
 
std::string getPostWUVarIndex (unsigned int batchSize, VarAccessDuplication varDuplication, const std::string &index) const
 
std::string getPostDenDelayIndex (unsigned int batchSize, const std::string &index, const std::string &offset) const
 
std::string getPreVarIndex (bool delay, unsigned int batchSize, VarAccessDuplication varDuplication, const std::string &index) const
 
std::string getPostVarIndex (bool delay, unsigned int batchSize, VarAccessDuplication varDuplication, const std::string &index) const
 
std::string getPrePrevSpikeTimeIndex (bool delay, unsigned int batchSize, VarAccessDuplication varDuplication, const std::string &index) const
 
std::string getPostPrevSpikeTimeIndex (bool delay, unsigned int batchSize, VarAccessDuplication varDuplication, const std::string &index) const
 
std::string getPostISynIndex (unsigned int batchSize, const std::string &index) const
 
std::string getPreISynIndex (unsigned int batchSize, const std::string &index) const
 
std::string getSynVarIndex (unsigned int batchSize, VarAccessDuplication varDuplication, const std::string &index) const
 
std::string getKernelVarIndex (unsigned int batchSize, VarAccessDuplication varDuplication, const std::string &index) const
 
- Public Member Functions inherited from CodeGenerator::GroupMerged< SynapseGroupInternal >
 GroupMerged (size_t index, const std::string &precision, const std::vector< std::reference_wrapper< const GroupInternal >> groups)
 
size_t getIndex () const
 
const GroupInternalgetArchetype () const
 Get 'archetype' neuron group - it's properties represent those of all other merged neuron groups. More...
 
const std::string & getMemorySpace () const
 Get name of memory space assigned to group. More...
 
const std::vector< std::reference_wrapper< const GroupInternal > > & getGroups () const
 Gets access to underlying vector of neuron groups which have been merged. More...
 
const std::vector< Field > & getFields () const
 Get group fields. More...
 
std::vector< FieldgetSortedFields (const BackendBase &backend) const
 Get group fields, sorted into order they will appear in struct. More...
 
void generateStruct (CodeStream &os, const BackendBase &backend, const std::string &name, bool host=false) const
 Generate declaration of struct to hold this merged group. More...
 
void generateStructFieldArgumentDefinitions (CodeStream &os, const BackendBase &backend) const
 
size_t getStructArraySize (const BackendBase &backend) const
 
void assignMemorySpaces (const BackendBase &backend, BackendBase::MemorySpaces &memorySpaces)
 Assign memory spaces to group. More...
 

Static Public Attributes

static const std::string name = "SynapseInit"
 

Additional Inherited Members

- Public Types inherited from CodeGenerator::GroupMerged< SynapseGroupInternal >
enum  FieldType
 
typedef SynapseGroupInternal GroupInternal
 
typedef std::function< std::string(const SynapseGroupInternal &, size_t)> GetFieldValueFunc
 
typedef std::tuple< std::string, std::string, GetFieldValueFunc, FieldTypeField
 
- Protected Types inherited from CodeGenerator::SynapseGroupMergedBase
enum  Role {
  Role::PresynapticUpdate, Role::PostsynapticUpdate, Role::SynapseDynamics, Role::Init,
  Role::SparseInit, Role::ConnectivityInit
}
 
- Protected Member Functions inherited from CodeGenerator::SynapseGroupMergedBase
 SynapseGroupMergedBase (size_t index, const std::string &precision, const std::string &timePrecision, const BackendBase &backend, Role role, const std::string &archetypeCode, const std::vector< std::reference_wrapper< const SynapseGroupInternal >> &groups)
 
boost::uuids::detail::sha1::digest_type getHashDigest (Role role) const
 
const std::string & getArchetypeCode () const
 
- Protected Member Functions inherited from CodeGenerator::GroupMerged< SynapseGroupInternal >
bool isParamReferenced (const std::vector< std::string > &codeStrings, const std::string &paramName) const
 Helper to test whether parameter is referenced in vector of codestrings. More...
 
bool isParamValueHeterogeneous (size_t index, P getParamValuesFn) const
 Helper to test whether parameter values are heterogeneous within merged group. More...
 
void addField (const std::string &type, const std::string &name, GetFieldValueFunc getFieldValue, FieldType fieldType=FieldType::Standard)
 
void addScalarField (const std::string &name, GetFieldValueFunc getFieldValue, FieldType fieldType=FieldType::Standard)
 
void addPointerField (const std::string &type, const std::string &name, const std::string &prefix)
 
void addVars (const Models::Base::VarVec &vars, const std::string &arrayPrefix)
 
void addVarReferences (const Models::Base::VarRefVec &varReferences, const std::string &arrayPrefix, V getVarRefFn)
 
void addEGPs (const Snippet::Base::EGPVec &egps, const std::string &arrayPrefix, const std::string &varName="")
 
void addEGPReferences (const Models::Base::EGPRefVec &egpRefs, const std::string &arrayPrefix, E getEGPRefFn)
 
void addHeterogeneousParams (const Snippet::Base::StringVec &paramNames, const std::string &suffix, P getParamValues, H isHeterogeneous)
 
void addHeterogeneousDerivedParams (const Snippet::Base::DerivedParamVec &derivedParams, const std::string &suffix, D getDerivedParamValues, H isHeterogeneous)
 
void addHeterogeneousVarInitParams (const Models::Base::VarVec &vars, V getVarInitialisers, H isHeterogeneous)
 
void addHeterogeneousVarInitDerivedParams (const Models::Base::VarVec &vars, V getVarInitialisers, H isHeterogeneous)
 
void updateHash (H getHashableFn, boost::uuids::detail::sha1 &hash) const
 Helper to update hash with the hash of calling getHashableFn on each group. More...
 
void updateParamHash (R isParamReferencedFn, V getValueFn, boost::uuids::detail::sha1 &hash) const
 
void updateVarInitParamHash (V getVarInitialisers, R isParamReferencedFn, boost::uuids::detail::sha1 &hash) const
 
void updateVarInitDerivedParamHash (V getVarInitialisers, R isDerivedParamReferencedFn, boost::uuids::detail::sha1 &hash) const
 
void generateRunnerBase (const BackendBase &backend, CodeStream &definitionsInternal, CodeStream &definitionsInternalFunc, CodeStream &definitionsInternalVar, CodeStream &runnerVarDecl, CodeStream &runnerMergedStructAlloc, const std::string &name, bool host=false) const
 

Constructor & Destructor Documentation

◆ SynapseInitGroupMerged()

CodeGenerator::SynapseInitGroupMerged::SynapseInitGroupMerged ( size_t  index,
const std::string &  precision,
const std::string &  timePrecision,
const BackendBase backend,
const std::vector< std::reference_wrapper< const SynapseGroupInternal >> &  groups 
)
inline

Member Function Documentation

◆ generateInit()

void SynapseInitGroupMerged::generateInit ( const BackendBase backend,
CodeStream os,
const ModelSpecMerged modelMerged,
Substitutions popSubs 
) const

◆ generateRunner()

void CodeGenerator::SynapseInitGroupMerged::generateRunner ( const BackendBase backend,
CodeStream definitionsInternal,
CodeStream definitionsInternalFunc,
CodeStream definitionsInternalVar,
CodeStream runnerVarDecl,
CodeStream runnerMergedStructAlloc 
) const
inline

◆ getHashDigest()

boost::uuids::detail::sha1::digest_type CodeGenerator::SynapseInitGroupMerged::getHashDigest ( ) const
inline

Member Data Documentation

◆ name

const std::string SynapseInitGroupMerged::name = "SynapseInit"
static

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