DistributedSpikeScheduler Class Reference

Spike scheduler for multi-node distributed spike exchange. More...

#include <DistributedSpikeScheduler.h>

Inheritance diagram for DistributedSpikeScheduler:

Inheritance graph
[legend]
Collaboration diagram for DistributedSpikeScheduler:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DistributedSpikeScheduler (SpikeScheduler &localScheduler, TargetNodesMap &targetNodesMap, MPIOutputBufferVector &mpiOutputBuffers, int numLocalEngines=1)
 Constructor.
virtual ~DistributedSpikeScheduler ()
virtual void scheduleSpike (local_objectid_t senderid, float offsetFraction, engineid_t engine=0)
 Schedules an occured spike in the PropagatedSpikeBuffer and MPIOutputSpikeBuffer.
virtual void deliverSpikes (SpikeReceiverList &listActiveSynapses, engineid_t engine, double time, int stepOffset=0)
 Delivers the spikes scheduled for the current time.
virtual void reset ()
 Reset the state of the spike scheduler (and empties all the spike buffers inside), so that the simulation can begin at time = 0.
virtual void advance (engineid_t engine=0)
 Informs the spike scheduler that some of the engines has advanced.
virtual void nextCycle ()
 Informs the spike scheduler that the simulation is advanced to the next simulation cycle.

Protected Attributes

SpikeScheduler_localScheduler
 Local scheduler which performs the local spike scheduling (within one node).
MPIOutputBufferVector_mpiOutputBuffers
 array of MPI Buffers (one for each node) to store the outgoing spikes.
TargetNodesMapnodesMap
 Table used to determine the list of target nodes where an outgoing spike should be sent (i.e. to which mpi output buffers to append the spike).
vector< intengineClocks
 Array holding the current timestep of all single thread engines relative to the start of the current simulation cycle.
int nLocalEngines
 Number of local engines in the simulation.


Detailed Description

Spike scheduler for multi-node distributed spike exchange.

This class augments the functionality of the local spike scheduler (either single-threaded or multi-threaded) with features for distributed spike scheduling, or outgoing spike scheduling in particular.

When there is a spike which need to be communicated in other node, the scheduler appends it in the appropriate mpi output buffer.

Used by the SingleThreadSimEngine in a distributed scenario, through the abstract SpikeScheduler interface.

See also:
SingleThreadSpikeScheduler, MultiThreadSpikeScheduler

Definition at line 27 of file DistributedSpikeScheduler.h.


Constructor & Destructor Documentation

DistributedSpikeScheduler::DistributedSpikeScheduler ( SpikeScheduler localScheduler,
TargetNodesMap targetNodesMap,
MPIOutputBufferVector mpiOutputBuffers,
int  numLocalEngines = 1 
)

Constructor.

Parameters:
localScheduler spike scheduler used for local spike scheduling.
targetNodesMap table for determining target nodes for an occured spike.
mpiOutputBuffers mpi spike buffers, one for each node, where outgoing spikes are stored.

Definition at line 9 of file DistributedSpikeScheduler.cpp.

References engineClocks, and nLocalEngines.

DistributedSpikeScheduler::~DistributedSpikeScheduler (  )  [virtual]

Definition at line 19 of file DistributedSpikeScheduler.cpp.


Member Function Documentation

void DistributedSpikeScheduler::scheduleSpike ( local_objectid_t  senderid,
float  offsetFraction,
engineid_t  engine = 0 
) [virtual]

void DistributedSpikeScheduler::deliverSpikes ( SpikeReceiverList listActiveSynapses,
engineid_t  engine,
double  time,
int  stepOffset = 0 
) [virtual]

Delivers the spikes scheduled for the current time.

Parameters:
listActiveSynapses adds all the waken-up spike receiver objects by the delivered spikes
engine identifier of the single threaded engine for which objects to deliver the spikes.
time Current time of the simulation, used to inform the target objects about the exact time of the delivered spikes.
stepOffset time offset convenient for advance delivering of later spikes which arrive after stepOffset timesteps with respect to the current simulation time.

Implements SpikeScheduler.

Definition at line 34 of file DistributedSpikeScheduler.cpp.

References _localScheduler, and SpikeScheduler::deliverSpikes().

Here is the call graph for this function:

void DistributedSpikeScheduler::reset (  )  [virtual]

Reset the state of the spike scheduler (and empties all the spike buffers inside), so that the simulation can begin at time = 0.

Implements SpikeScheduler.

Definition at line 39 of file DistributedSpikeScheduler.cpp.

References _localScheduler, engineClocks, nLocalEngines, and SpikeScheduler::reset().

Referenced by DistributedMultiThreadNetwork::_reset_().

Here is the call graph for this function:

void DistributedSpikeScheduler::advance ( engineid_t  engine = 0  )  [virtual]

Informs the spike scheduler that some of the engines has advanced.

The scheduler advances the propagated spike buffers and other state variables that hold simulation timestep information.

Parameters:
engine id of the single thread engine that has advanced

Implements SpikeScheduler.

Definition at line 47 of file DistributedSpikeScheduler.cpp.

References _localScheduler, SpikeScheduler::advance(), and engineClocks.

Here is the call graph for this function:

void DistributedSpikeScheduler::nextCycle (  )  [virtual]

Informs the spike scheduler that the simulation is advanced to the next simulation cycle.

Implements SpikeScheduler.

Definition at line 53 of file DistributedSpikeScheduler.cpp.

References _localScheduler, engineClocks, SpikeScheduler::nextCycle(), and nLocalEngines.

Here is the call graph for this function:


Member Data Documentation

Local scheduler which performs the local spike scheduling (within one node).

Definition at line 90 of file DistributedSpikeScheduler.h.

Referenced by advance(), deliverSpikes(), nextCycle(), reset(), and scheduleSpike().

array of MPI Buffers (one for each node) to store the outgoing spikes.

Definition at line 93 of file DistributedSpikeScheduler.h.

Referenced by scheduleSpike().

Table used to determine the list of target nodes where an outgoing spike should be sent (i.e. to which mpi output buffers to append the spike).

Definition at line 96 of file DistributedSpikeScheduler.h.

Referenced by scheduleSpike().

Array holding the current timestep of all single thread engines relative to the start of the current simulation cycle.

Used for specifying the timestamp when appending of spikes in the mpi output buffer.

Definition at line 102 of file DistributedSpikeScheduler.h.

Referenced by advance(), DistributedSpikeScheduler(), nextCycle(), reset(), and scheduleSpike().

Number of local engines in the simulation.

Used to reserving space for engineClocks array.

Definition at line 108 of file DistributedSpikeScheduler.h.

Referenced by DistributedSpikeScheduler(), nextCycle(), and reset().


The documentation for this class was generated from the following files:

Generated on Wed Jul 9 16:34:48 2008 for PCSIM by  doxygen 1.5.5