#include <SingleThreadSpikeScheduler.h>
Public Member Functions | |
SingleThreadSpikeScheduler (LocalDelayMap &dm, SpikeTargetGroupPool &srg, PropagatedSpikeBuffer &sb, SimParameter &sp) | |
SingleThreadSpikeScheduler (const SingleThreadSpikeScheduler &src) | |
SingleThreadSpikeScheduler & | operator= (const SingleThreadSpikeScheduler &src) |
virtual | ~SingleThreadSpikeScheduler () |
virtual void | scheduleSpike (local_objectid_t senderid, float offsetFraction, engineid_t engine=0) |
Function to be called if an object wants to send a spike. | |
virtual void | deliverSpikes (SpikeReceiverList &listActiveSynapses, engineid_t engine, double simTime, int stepOffset=0) |
Function to be called to deliver all incoming spikes to their corresponding targets. | |
virtual void | reset () |
Must be called if simulation is reset. | |
virtual void | advance (engineid_t engine=0) |
Inform the spike scheduler that the engine has moved to the next timestep. | |
virtual void | nextCycle () |
Inform the spike scheduler that the engine has moved to the next cycle (several steps = minDelay). | |
Protected Attributes | |
SimParameter & | simParam |
LocalDelayMap & | delayMap |
SpikeTargetGroupPool & | tgtGrpPool |
PropagatedSpikeBuffer & | spikeBuffer |
Definition at line 11 of file SingleThreadSpikeScheduler.h.
SingleThreadSpikeScheduler::SingleThreadSpikeScheduler | ( | LocalDelayMap & | dm, | |
SpikeTargetGroupPool & | srg, | |||
PropagatedSpikeBuffer & | sb, | |||
SimParameter & | sp | |||
) | [inline] |
Definition at line 15 of file SingleThreadSpikeScheduler.h.
SingleThreadSpikeScheduler::SingleThreadSpikeScheduler | ( | const SingleThreadSpikeScheduler & | src | ) | [inline] |
Definition at line 19 of file SingleThreadSpikeScheduler.h.
virtual SingleThreadSpikeScheduler::~SingleThreadSpikeScheduler | ( | ) | [inline, virtual] |
Definition at line 33 of file SingleThreadSpikeScheduler.h.
SingleThreadSpikeScheduler& SingleThreadSpikeScheduler::operator= | ( | const SingleThreadSpikeScheduler & | src | ) | [inline] |
Definition at line 24 of file SingleThreadSpikeScheduler.h.
References delayMap, simParam, spikeBuffer, and tgtGrpPool.
void SingleThreadSpikeScheduler::scheduleSpike | ( | local_objectid_t | senderid, | |
float | offsetFraction, | |||
engineid_t | engine = 0 | |||
) | [virtual] |
Function to be called if an object wants to send a spike.
senderid | engine local ID of the spike generating sim element | |
offsetFraction | fraction of the time step at which the spike occured. | |
engine | node local ID of the calling simulation engine |
Implements SpikeScheduler.
Definition at line 9 of file SingleThreadSpikeScheduler.cpp.
References LocalDelayMap::beginDelays(), delayMap, LocalDelayMap::endDelays(), PropagatedSpikeBuffer::scheduleSpikeTargetGroup(), and spikeBuffer.
void SingleThreadSpikeScheduler::deliverSpikes | ( | SpikeReceiverList & | listActiveSynapses, | |
engineid_t | engine, | |||
double | time, | |||
int | stepOffset = 0 | |||
) | [virtual] |
Function to be called to deliver all incoming spikes to their corresponding targets.
listActiveSynapses | If a call to the spike handler function returns true the corresponding object is appended to this list. | |
engine | ID of the calling engine | |
time | The current simulation time | |
stepOffset | Actually the spikes scheduled for currentStep + stepOffset are delivered |
Implements SpikeScheduler.
Definition at line 22 of file SingleThreadSpikeScheduler.cpp.
References SpikeTargetGroupPool::beginSpikeTargetGroup(), PropagatedSpikeBuffer::beginSpikeTargetGroups(), SpikeEvent::delta, SimParameter::dt, SpikeTargetGroupPool::endSpikeTargetGroup(), PropagatedSpikeBuffer::endSpikeTargetGroups(), SimObject::getChainedObject(), Time::in_sec(), simParam, spikeBuffer, SPIKEHITFLAG_ACTIVATE, tgtGrpPool, and SimObject::toBeActivated().
virtual void SingleThreadSpikeScheduler::reset | ( | ) | [inline, virtual] |
Must be called if simulation is reset.
maxDelay | Maximum synaptic delay (in time steps) which the spike scheduler can handle during the following simulation | |
minDelay | Minimum synaptic delay (in time steps) |
Implements SpikeScheduler.
Definition at line 39 of file SingleThreadSpikeScheduler.h.
References SimParameter::dt, Time::in_steps(), SimParameter::maxDelay, SimParameter::minDelay, PropagatedSpikeBuffer::reset(), simParam, and spikeBuffer.
Referenced by SingleThreadNetwork::_reset_().
virtual void SingleThreadSpikeScheduler::advance | ( | engineid_t | engine = 0 |
) | [inline, virtual] |
Inform the spike scheduler that the engine has moved to the next timestep.
Implements SpikeScheduler.
Definition at line 44 of file SingleThreadSpikeScheduler.h.
References PropagatedSpikeBuffer::nextTimeStep(), and spikeBuffer.
virtual void SingleThreadSpikeScheduler::nextCycle | ( | ) | [inline, virtual] |
Inform the spike scheduler that the engine has moved to the next cycle (several steps = minDelay).
Implements SpikeScheduler.
Definition at line 49 of file SingleThreadSpikeScheduler.h.
SimParameter& SingleThreadSpikeScheduler::simParam [protected] |
Definition at line 53 of file SingleThreadSpikeScheduler.h.
Referenced by deliverSpikes(), operator=(), and reset().
LocalDelayMap& SingleThreadSpikeScheduler::delayMap [protected] |
Definition at line 54 of file SingleThreadSpikeScheduler.h.
Referenced by operator=(), and scheduleSpike().
Definition at line 55 of file SingleThreadSpikeScheduler.h.
Referenced by deliverSpikes(), and operator=().
Definition at line 56 of file SingleThreadSpikeScheduler.h.
Referenced by advance(), deliverSpikes(), operator=(), reset(), and scheduleSpike().