GeNN  4.9.0
GPU enhanced Neuronal Networks (GeNN)
snippet.h File Reference
#include <algorithm>
#include <functional>
#include <string>
#include <vector>
#include <cassert>
#include "gennExport.h"
#include "gennUtils.h"

Go to the source code of this file.

Classes

class  Snippet::InitialiserContainerBase< V, NumVars >
 
class  Snippet::InitialiserContainerBase< V, 0 >
 
class  Snippet::Base
 Base class for all code snippets. More...
 
struct  Snippet::Base::EGP
 An extra global parameter has a name and a type. More...
 
struct  Snippet::Base::ParamVal
 Additional input variables, row state variables and other things have a name, a type and an initial value. More...
 
struct  Snippet::Base::DerivedParam
 A derived parameter has a name and a function for obtaining its value. More...
 
class  Snippet::Init< SnippetBase >
 

Namespaces

 Snippet
 

Macros

#define DECLARE_SNIPPET(TYPE, NUM_PARAMS)
 
#define IMPLEMENT_SNIPPET(TYPE)   TYPE *TYPE::s_Instance = NULL
 
#define SET_PARAM_NAMES(...)   virtual StringVec getParamNames() const override{ return __VA_ARGS__; }
 
#define SET_DERIVED_PARAMS(...)   virtual DerivedParamVec getDerivedParams() const override{ return __VA_ARGS__; }
 
#define SET_EXTRA_GLOBAL_PARAMS(...)   virtual EGPVec getExtraGlobalParams() const override{ return __VA_ARGS__; }
 

Typedefs

template<size_t NumVars>
using Snippet::ValueBase = InitialiserContainerBase< double, NumVars >
 

Functions

void Snippet::updateHash (const Base::EGP &e, boost::uuids::detail::sha1 &hash)
 
void Snippet::updateHash (const Base::ParamVal &p, boost::uuids::detail::sha1 &hash)
 
void Snippet::updateHash (const Base::DerivedParam &d, boost::uuids::detail::sha1 &hash)
 

Macro Definition Documentation

◆ DECLARE_SNIPPET

#define DECLARE_SNIPPET (   TYPE,
  NUM_PARAMS 
)
Value:
private: \
GENN_EXPORT static TYPE *s_Instance; \
public: \
static const TYPE *getInstance() \
{ \
if(s_Instance == NULL) \
{ \
s_Instance = new TYPE; \
} \
return s_Instance; \
} \
typedef Snippet::ValueBase<NUM_PARAMS> ParamValues \
#define TYPE(T)
Definition: backendBase.cc:14
Definition: snippet.h:48

◆ IMPLEMENT_SNIPPET

#define IMPLEMENT_SNIPPET (   TYPE)    TYPE *TYPE::s_Instance = NULL

◆ SET_DERIVED_PARAMS

#define SET_DERIVED_PARAMS (   ...)    virtual DerivedParamVec getDerivedParams() const override{ return __VA_ARGS__; }

◆ SET_EXTRA_GLOBAL_PARAMS

#define SET_EXTRA_GLOBAL_PARAMS (   ...)    virtual EGPVec getExtraGlobalParams() const override{ return __VA_ARGS__; }

◆ SET_PARAM_NAMES

#define SET_PARAM_NAMES (   ...)    virtual StringVec getParamNames() const override{ return __VA_ARGS__; }