GeNN  3.3.0
GPU enhanced Neuronal Networks (GeNN)
snippet.h File Reference
#include <functional>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

class  Snippet::ValueBase< NumVars >
 
class  Snippet::ValueBase< 0 >
 
class  Snippet::Base
 Base class for all code snippets. 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__; }
 

Macro Definition Documentation

◆ DECLARE_SNIPPET

#define DECLARE_SNIPPET (   TYPE,
  NUM_PARAMS 
)
Value:
private: \
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; \
Definition: snippet.h:39

◆ 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_PARAM_NAMES

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