class CodeGenerator::CUDA::PresynapticUpdateStrategy::Base

Overview

#include <presynapticUpdateStrategy.h>

class Base
{
public:
    // methods

    virtual size_t getNumThreads(const SynapseGroupInternal& sg) const = 0;
    virtual bool isCompatible(const SynapseGroupInternal& sg) const = 0;
    virtual bool shouldAccumulateInRegister(const SynapseGroupInternal& sg, const Backend& backend) const = 0;
    virtual bool shouldAccumulateInSharedMemory(const SynapseGroupInternal& sg, const Backend& backend) const = 0;

    virtual void genCode(
        CodeStream& os,
        const ModelSpecInternal& model,
        const SynapseGroupInternal& sg,
        const Substitutions& popSubs,
        const Backend& backend,
        bool trueSpike,
        BackendBase::SynapseGroupHandler wumThreshHandler,
        BackendBase::SynapseGroupHandler wumSimHandler
        ) const = 0;
};

// direct descendants

class PostSpan;
class PreSpan;

Detailed Documentation

Methods

virtual size_t getNumThreads(const SynapseGroupInternal& sg) const = 0

Get the number of threads that presynaptic updates should be parallelised across.

virtual bool isCompatible(const SynapseGroupInternal& sg) const = 0

Is this presynaptic update strategy compatible with a given synapse group?

virtual bool shouldAccumulateInRegister(const SynapseGroupInternal& sg, const Backend& backend) const = 0

Are input currents emitted by this presynaptic update accumulated into a register?

virtual bool shouldAccumulateInSharedMemory(const SynapseGroupInternal& sg, const Backend& backend) const = 0

Are input currents emitted by this presynaptic update accumulated into a shared memory array?

virtual void genCode(
    CodeStream& os,
    const ModelSpecInternal& model,
    const SynapseGroupInternal& sg,
    const Substitutions& popSubs,
    const Backend& backend,
    bool trueSpike,
    BackendBase::SynapseGroupHandler wumThreshHandler,
    BackendBase::SynapseGroupHandler wumSimHandler
    ) const = 0

Generate presynaptic update code.