GeNN  4.9.0
GPU enhanced Neuronal Networks (GeNN)
models.h File Reference
#include <algorithm>
#include <functional>
#include <string>
#include <vector>
#include "snippet.h"
#include "initVarSnippet.h"
#include "varAccess.h"

Go to the source code of this file.

Classes

class  Models::Base
 
struct  Models::Base::Var
 A variable has a name, a type and an access type. More...
 
struct  Models::Base::VarRef
 
struct  Models::Base::EGPRef
 
class  Models::VarInit
 
class  Models::VarReferenceBase
 
class  Models::VarReference
 
class  Models::WUVarReference
 
class  Models::EGPReference
 

Namespaces

 CodeGenerator
 Helper class for generating code - automatically inserts brackets, indents etc.
 
 Models
 Base class for all models - in addition to the parameters snippets have, models can have state variables.
 

Macros

#define DECLARE_MODEL(TYPE, NUM_PARAMS, NUM_VARS)
 
#define IMPLEMENT_MODEL(TYPE)   IMPLEMENT_SNIPPET(TYPE)
 
#define SET_VARS(...)   virtual VarVec getVars() const override{ return __VA_ARGS__; }
 

Typedefs

template<size_t NumVars>
using Models::VarInitContainerBase = Snippet::InitialiserContainerBase< VarInit, NumVars >
 
template<size_t NumVars>
using Models::VarReferenceContainerBase = Snippet::InitialiserContainerBase< VarReference, NumVars >
 
template<size_t NumVars>
using Models::WUVarReferenceContainerBase = Snippet::InitialiserContainerBase< WUVarReference, NumVars >
 
template<size_t NumEGPs>
using Models::EGPReferenceContainerBase = Snippet::InitialiserContainerBase< EGPReference, NumEGPs >
 

Functions

GENN_EXPORT void Models::updateHash (const Base::Var &v, boost::uuids::detail::sha1 &hash)
 
GENN_EXPORT void Models::updateHash (const Base::VarRef &v, boost::uuids::detail::sha1 &hash)
 
GENN_EXPORT void Models::updateHash (const Base::EGPRef &e, boost::uuids::detail::sha1 &hash)
 
GENN_EXPORT void Models::updateHash (const VarReference &v, boost::uuids::detail::sha1 &hash)
 
GENN_EXPORT void Models::updateHash (const WUVarReference &v, boost::uuids::detail::sha1 &hash)
 
GENN_EXPORT void Models::updateHash (const EGPReference &v, boost::uuids::detail::sha1 &hash)
 

Macro Definition Documentation

◆ DECLARE_MODEL

#define DECLARE_MODEL (   TYPE,
  NUM_PARAMS,
  NUM_VARS 
)
Value:
DECLARE_SNIPPET(TYPE, NUM_PARAMS); \
typedef Models::VarInitContainerBase<0> PreVarValues; \
typedef Models::VarInitContainerBase<0> PostVarValues
#define TYPE(T)
Definition: backendBase.cc:14
#define DECLARE_SNIPPET(TYPE, NUM_PARAMS)
Definition: snippet.h:19
Definition: snippet.h:48

◆ IMPLEMENT_MODEL

#define IMPLEMENT_MODEL (   TYPE)    IMPLEMENT_SNIPPET(TYPE)

◆ SET_VARS

#define SET_VARS (   ...)    virtual VarVec getVars() const override{ return __VA_ARGS__; }