GeNN  4.9.0
GPU enhanced Neuronal Networks (GeNN)
Snippet::Base Class Reference

Base class for all code snippets. More...

#include <snippet.h>

Inheritance diagram for Snippet::Base:
InitSparseConnectivitySnippet::Base InitToeplitzConnectivitySnippet::Base InitVarSnippet::Base Models::Base InitSparseConnectivitySnippet::Conv2D InitSparseConnectivitySnippet::FixedNumberPostWithReplacement InitSparseConnectivitySnippet::FixedNumberPreWithReplacement InitSparseConnectivitySnippet::FixedNumberTotalWithReplacement InitSparseConnectivitySnippet::FixedProbabilityBase InitSparseConnectivitySnippet::OneToOne InitSparseConnectivitySnippet::Uninitialised InitToeplitzConnectivitySnippet::AvgPoolConv2D InitToeplitzConnectivitySnippet::Conv2D InitToeplitzConnectivitySnippet::Uninitialised InitVarSnippet::Binomial InitVarSnippet::Constant InitVarSnippet::Exponential InitVarSnippet::Gamma InitVarSnippet::Kernel InitVarSnippet::Normal InitVarSnippet::NormalClipped InitVarSnippet::NormalClippedDelay InitVarSnippet::Uniform InitVarSnippet::Uninitialised CurrentSourceModels::Base CustomUpdateModels::Base NeuronModels::Base PostsynapticModels::Base WeightUpdateModels::Base

Classes

struct  DerivedParam
 A derived parameter has a name and a function for obtaining its value. More...
 
struct  EGP
 An extra global parameter has a name and a type. More...
 
struct  ParamVal
 Additional input variables, row state variables and other things have a name, a type and an initial value. More...
 

Public Types

typedef std::vector< std::string > StringVec
 
typedef std::vector< EGPEGPVec
 
typedef std::vector< ParamValParamValVec
 
typedef std::vector< DerivedParamDerivedParamVec
 

Public Member Functions

virtual ~Base ()
 
virtual StringVec getParamNames () const
 Gets names of of (independent) model parameters. More...
 
virtual DerivedParamVec getDerivedParams () const
 
virtual EGPVec getExtraGlobalParams () const
 
size_t getExtraGlobalParamIndex (const std::string &paramName) const
 Find the index of a named extra global parameter. More...
 

Protected Member Functions

void updateHash (boost::uuids::detail::sha1 &hash) const
 
void validate () const
 Validate names of parameters etc. More...
 

Static Protected Member Functions

template<typename T >
static size_t getNamedVecIndex (const std::string &name, const std::vector< T > &vec)
 

Detailed Description

Base class for all code snippets.

Member Typedef Documentation

◆ DerivedParamVec

◆ EGPVec

typedef std::vector<EGP> Snippet::Base::EGPVec

◆ ParamValVec

typedef std::vector<ParamVal> Snippet::Base::ParamValVec

◆ StringVec

typedef std::vector<std::string> Snippet::Base::StringVec

Constructor & Destructor Documentation

◆ ~Base()

virtual Snippet::Base::~Base ( )
inlinevirtual

Member Function Documentation

◆ getDerivedParams()

virtual DerivedParamVec Snippet::Base::getDerivedParams ( ) const
inlinevirtual

◆ getExtraGlobalParamIndex()

size_t Snippet::Base::getExtraGlobalParamIndex ( const std::string &  paramName) const
inline

Find the index of a named extra global parameter.

◆ getExtraGlobalParams()

virtual EGPVec Snippet::Base::getExtraGlobalParams ( ) const
inlinevirtual

Gets names and types (as strings) of additional per-population parameters for the snippet

Reimplemented in NeuronModels::Poisson, InitSparseConnectivitySnippet::FixedNumberTotalWithReplacement, and NeuronModels::SpikeSourceArray.

◆ getNamedVecIndex()

template<typename T >
static size_t Snippet::Base::getNamedVecIndex ( const std::string &  name,
const std::vector< T > &  vec 
)
inlinestaticprotected

◆ getParamNames()

◆ updateHash()

void Snippet::Base::updateHash ( boost::uuids::detail::sha1 &  hash) const
inlineprotected

◆ validate()

void Snippet::Base::validate ( ) const
inlineprotected

Validate names of parameters etc.


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