Global Namespace

Overview

// namespaces

namespace CodeGenerator;
    namespace CodeGenerator::CUDA;
        namespace CodeGenerator::CUDA::Optimiser;
        namespace CodeGenerator::CUDA::PresynapticUpdateStrategy;
        namespace CodeGenerator::CUDA::Utils;
    namespace CodeGenerator::SingleThreadedCPU;
        namespace CodeGenerator::SingleThreadedCPU::Optimiser;
namespace CurrentSourceModels;
namespace InitSparseConnectivitySnippet;
namespace InitVarSnippet;
namespace Models;
namespace NeuronModels;
namespace PostsynapticModels;
namespace Snippet;
namespace Utils;
namespace WeightUpdateModels;
namespace filesystem;
namespace pygenn;
    namespace pygenn::genn_groups;
    namespace pygenn::genn_model;
    namespace pygenn::model_preprocessor;
namespace std;

// typedefs

typedef ModelSpec NNmodel;

// enums

enum FloatType;
enum MathsFunc;
enum SynapseMatrixConnectivity;
enum SynapseMatrixType;
enum SynapseMatrixWeight;
enum TimePrecision;
enum VarAccess;
enum VarLocation;

// classes

class CurrentSource;
class CurrentSourceInternal;
class ModelSpec;
class ModelSpecInternal;
class NeuronGroup;
class NeuronGroupInternal;
class SynapseGroup;
class SynapseGroupInternal;

// global functions

unsigned int binomialInverseCDF(
    double cdf,
    unsigned int n,
    double p
    );

GENN_EXPORT unsigned int binomialInverseCDF(
    double cdf,
    unsigned int n,
    double p
    );

IMPLEMENT_MODEL(CurrentSourceModels::DC);
IMPLEMENT_MODEL(CurrentSourceModels::GaussianNoise);
IMPLEMENT_SNIPPET(InitSparseConnectivitySnippet::Uninitialised);
IMPLEMENT_SNIPPET(InitSparseConnectivitySnippet::OneToOne);
IMPLEMENT_SNIPPET(InitSparseConnectivitySnippet::FixedProbability);
IMPLEMENT_SNIPPET(InitSparseConnectivitySnippet::FixedProbabilityNoAutapse);
IMPLEMENT_SNIPPET(InitVarSnippet::Uninitialised);
IMPLEMENT_SNIPPET(InitVarSnippet::Constant);
IMPLEMENT_SNIPPET(InitVarSnippet::Uniform);
IMPLEMENT_SNIPPET(InitVarSnippet::Normal);
IMPLEMENT_SNIPPET(InitVarSnippet::Exponential);
IMPLEMENT_SNIPPET(InitVarSnippet::Gamma);

template <typename S>
Models::VarInit initVar(const typename S::ParamValues& params);

template <typename S>
std::enable_if<std::is_same<typename S::ParamValues, Snippet::ValueBase<0>>::value, Models::VarInit>::type initVar();

Models::VarInit uninitialisedVar();

template <typename S>
InitSparseConnectivitySnippet::Init initConnectivity(const typename S::ParamValues& params);

template <typename S>
std::enable_if<std::is_same<typename S::ParamValues, Snippet::ValueBase<0>>::value, InitSparseConnectivitySnippet::Init>::type initConnectivity();

InitSparseConnectivitySnippet::Init uninitialisedConnectivity();
IMPLEMENT_MODEL(NeuronModels::RulkovMap);
IMPLEMENT_MODEL(NeuronModels::Izhikevich);
IMPLEMENT_MODEL(NeuronModels::IzhikevichVariable);
IMPLEMENT_MODEL(NeuronModels::LIF);
IMPLEMENT_MODEL(NeuronModels::SpikeSource);
IMPLEMENT_MODEL(NeuronModels::SpikeSourceArray);
IMPLEMENT_MODEL(NeuronModels::Poisson);
IMPLEMENT_MODEL(NeuronModels::PoissonNew);
IMPLEMENT_MODEL(NeuronModels::TraubMiles);
IMPLEMENT_MODEL(NeuronModels::TraubMilesFast);
IMPLEMENT_MODEL(NeuronModels::TraubMilesAlt);
IMPLEMENT_MODEL(NeuronModels::TraubMilesNStep);
IMPLEMENT_MODEL(PostsynapticModels::ExpCurr);
IMPLEMENT_MODEL(PostsynapticModels::ExpCond);
IMPLEMENT_MODEL(PostsynapticModels::DeltaCurr);

bool operator & (
    SynapseMatrixType type,
    SynapseMatrixConnectivity connType
    );

bool operator & (
    SynapseMatrixType type,
    SynapseMatrixWeight weightType
    );

bool operator & (
    VarLocation locA,
    VarLocation locB
    );

IMPLEMENT_MODEL(WeightUpdateModels::StaticPulse);
IMPLEMENT_MODEL(WeightUpdateModels::StaticPulseDendriticDelay);
IMPLEMENT_MODEL(WeightUpdateModels::StaticGraded);
IMPLEMENT_MODEL(WeightUpdateModels::PiecewiseSTDP);

// macros

#define CHECK_CUDA_ERRORS(call)
#define CHECK_CU_ERRORS(call)

#define DECLARE_MODEL( \
    TYPE, \
    NUM_PARAMS, \
    NUM_VARS \
    )

#define DECLARE_SNIPPET( \
    TYPE, \
    NUM_PARAMS \
    )

#define DECLARE_WEIGHT_UPDATE_MODEL( \
    TYPE, \
    NUM_PARAMS, \
    NUM_VARS, \
    NUM_PRE_VARS, \
    NUM_POST_VARS \
    )

#define IMPLEMENT_MODEL(TYPE)
#define IMPLEMENT_SNIPPET(TYPE)
#define NO_DELAY
#define SET_ADDITIONAL_INPUT_VARS(...)
#define SET_APPLY_INPUT_CODE(APPLY_INPUT_CODE)
#define SET_CALC_MAX_COL_LENGTH_FUNC(FUNC)
#define SET_CALC_MAX_ROW_LENGTH_FUNC(FUNC)
#define SET_CODE(CODE)
#define SET_CURRENT_CONVERTER_CODE(CURRENT_CONVERTER_CODE)
#define SET_DECAY_CODE(DECAY_CODE)
#define SET_DERIVED_PARAMS(...)
#define SET_EVENT_CODE(EVENT_CODE)
#define SET_EVENT_THRESHOLD_CONDITION_CODE(EVENT_THRESHOLD_CONDITION_CODE)
#define SET_EXTRA_GLOBAL_PARAMS(...)
#define SET_EXTRA_GLOBAL_PARAMS(...)
#define SET_INJECTION_CODE(INJECTION_CODE)
#define SET_LEARN_POST_CODE(LEARN_POST_CODE)
#define SET_LEARN_POST_SUPPORT_CODE(LEARN_POST_SUPPORT_CODE)
#define SET_MAX_COL_LENGTH(MAX_COL_LENGTH)
#define SET_MAX_ROW_LENGTH(MAX_ROW_LENGTH)
#define SET_NEEDS_AUTO_REFRACTORY(AUTO_REFRACTORY_REQUIRED)
#define SET_NEEDS_POST_SPIKE_TIME(POST_SPIKE_TIME_REQUIRED)
#define SET_NEEDS_PRE_SPIKE_TIME(PRE_SPIKE_TIME_REQUIRED)
#define SET_PARAM_NAMES(...)
#define SET_POST_SPIKE_CODE(POST_SPIKE_CODE)
#define SET_POST_VARS(...)
#define SET_PRE_SPIKE_CODE(PRE_SPIKE_CODE)
#define SET_PRE_VARS(...)
#define SET_RESET_CODE(RESET_CODE)
#define SET_ROW_BUILD_CODE(CODE)
#define SET_ROW_BUILD_STATE_VARS(...)
#define SET_SIM_CODE(SIM_CODE)
#define SET_SIM_CODE(SIM_CODE)
#define SET_SIM_SUPPORT_CODE(SIM_SUPPORT_CODE)
#define SET_SUPPORT_CODE(SUPPORT_CODE)
#define SET_SUPPORT_CODE(SUPPORT_CODE)
#define SET_SYNAPSE_DYNAMICS_CODE(SYNAPSE_DYNAMICS_CODE)
#define SET_SYNAPSE_DYNAMICS_SUPPORT_CODE(SYNAPSE_DYNAMICS_SUPPORT_CODE)
#define SET_THRESHOLD_CONDITION_CODE(THRESHOLD_CONDITION_CODE)
#define SET_VARS(...)
#define TYPE(T)

Detailed Documentation

Global Functions

template <typename S>
Models::VarInit initVar(const typename S::ParamValues& params)

Initialise a variable using an initialisation snippet.

Parameters:

S type of variable initialisation snippet (derived from InitVarSnippet::Base).
params parameters for snippet wrapped in S::ParamValues object.

Returns:

Models::VarInit object for use within model’s VarValues

template <typename S>
std::enable_if<std::is_same<typename S::ParamValues, Snippet::ValueBase<0>>::value, Models::VarInit>::type initVar()

Initialise a variable using an initialisation snippet with no parameters.

Parameters:

S type of variable initialisation snippet (derived from InitVarSnippet::Base).

Returns:

Models::VarInit object for use within model’s VarValues

Models::VarInit uninitialisedVar()

Mark a variable as uninitialised.

This means that the backend will not generate any automatic initialization code, but will instead copy the variable from host to device during initializeSparse function

template <typename S>
InitSparseConnectivitySnippet::Init initConnectivity(const typename S::ParamValues& params)

Initialise connectivity using a sparse connectivity snippet.

Parameters:

S type of sparse connectivitiy initialisation snippet (derived from InitSparseConnectivitySnippet::Base).
params parameters for snippet wrapped in S::ParamValues object.

Returns:

InitSparseConnectivitySnippet::Init object for passing to ModelSpec::addSynapsePopulation

template <typename S>
std::enable_if<std::is_same<typename S::ParamValues, Snippet::ValueBase<0>>::value, InitSparseConnectivitySnippet::Init>::type initConnectivity()

Initialise connectivity using a sparse connectivity snippet with no parameters.

Parameters:

S type of sparse connectivitiy initialisation snippet (derived from InitSparseConnectivitySnippet::Base).

Returns:

InitSparseConnectivitySnippet::Init object for passing to ModelSpec::addSynapsePopulation

InitSparseConnectivitySnippet::Init uninitialisedConnectivity()

Mark a synapse group’s sparse connectivity as uninitialised.

This means that the backend will not generate any automatic initialization code, but will instead copy the connectivity from host to device during initializeSparse function (and, if necessary generate any additional data structures it requires)

Macros

#define NO_DELAY

Macro used to indicate no synapse delay for the group (only one queue slot will be generated)