PropagatedSpikeBuffer Class Reference

Schedule/Store spikes to be delivered at a later point in the simulation. More...

#include <PropagatedSpikeBuffer.h>

Collaboration diagram for PropagatedSpikeBuffer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PropagatedSpikeBuffer (int minDelay, int maxDelay, int chunkSize=PROPAGATED_SPIKE_BUFFER_CHUNK_SIZE)
 New spike buffer.
virtual ~PropagatedSpikeBuffer ()
 Destructor: Deletes all scheduled spikes.
void scheduleSpikeTargetGroup (spikegroupid_t stg, delaystep_t delay, float offsetFraction)
 Schedule a group of spike targets to get a spike at time t + delay.
const_iterator beginSpikeTargetGroups (int stepOffset=0)
 Returns an iterator to loop over all scheduled spike target groups.
const_iterator endSpikeTargetGroups (int stepOffset=0)
 End iterator corresponding to beginSynapseGroups.
void nextTimeStep ()
 Must be called to tell the buffer that it should move on to the next time step.
void reset (int minDelay, int maxDelay)
 Must be called at the begin (reset) of a simulation.
size_t length ()
 Return the actual length of the buffer.

Classes

class  const_iterator
 Iterator to loop over the scheduled spikes at a certain delay. More...
struct  StgNode
 Structure which stores the index of the spike target group and a pointer to the next element in various lists. More...


Detailed Description

Schedule/Store spikes to be delivered at a later point in the simulation.

Definition at line 20 of file PropagatedSpikeBuffer.h.


Constructor & Destructor Documentation

PropagatedSpikeBuffer::PropagatedSpikeBuffer ( int  minDelay,
int  maxDelay,
int  chunkSize = PROPAGATED_SPIKE_BUFFER_CHUNK_SIZE 
)

New spike buffer.

Parameters:
minDelay Minimum delay (in number of time steps) the buffer can handle
maxDelay Maximum delay (in number of time steps) the buffer can handle
chunkSize Constant used for internal memory management. Should increase with increasing number of synapses and exptected number of spikes.

Definition at line 9 of file PropagatedSpikeBuffer.cpp.

References reset().

Here is the call graph for this function:

PropagatedSpikeBuffer::~PropagatedSpikeBuffer (  )  [virtual]

Destructor: Deletes all scheduled spikes.

Definition at line 38 of file PropagatedSpikeBuffer.cpp.


Member Function Documentation

void PropagatedSpikeBuffer::scheduleSpikeTargetGroup ( spikegroupid_t  stg,
delaystep_t  delay,
float  offsetFraction 
)

Schedule a group of spike targets to get a spike at time t + delay.

Parameters:
stg The identifier of the spike target group to be used as identifier in SpikeTargetGroupPool::beginSpikeTarget( stg )
delay The number of time steps to delay the deliver of the spike

Definition at line 109 of file PropagatedSpikeBuffer.cpp.

References PropagatedSpikeBuffer::StgNode::next, PropagatedSpikeBuffer::StgNode::offsetFraction, and PropagatedSpikeBuffer::StgNode::stg.

Referenced by STDistributedIncomingSpikeScheduler::processMPIInputSpikeBuffers(), and SingleThreadSpikeScheduler::scheduleSpike().

const_iterator PropagatedSpikeBuffer::beginSpikeTargetGroups ( int  stepOffset = 0  )  [inline]

Returns an iterator to loop over all scheduled spike target groups.

Parameters:
stepOffset Determines at which position ( current timestep + stepOffset ) the spike target groups are read of

Definition at line 78 of file PropagatedSpikeBuffer.h.

References length().

Referenced by SingleThreadSpikeScheduler::deliverSpikes().

Here is the call graph for this function:

const_iterator PropagatedSpikeBuffer::endSpikeTargetGroups ( int  stepOffset = 0  )  [inline]

End iterator corresponding to beginSynapseGroups.

Definition at line 90 of file PropagatedSpikeBuffer.h.

Referenced by SingleThreadSpikeScheduler::deliverSpikes().

void PropagatedSpikeBuffer::nextTimeStep (  ) 

Must be called to tell the buffer that it should move on to the next time step.

Definition at line 131 of file PropagatedSpikeBuffer.cpp.

Referenced by SingleThreadSpikeScheduler::advance().

void PropagatedSpikeBuffer::reset ( int  minDelay,
int  maxDelay 
)

Must be called at the begin (reset) of a simulation.

Parameters:
minDelay Minimum delay (in number of time steps) the buffer can handle
maxDelay Maximum delay (in number of time steps) the buffer can handle

Definition at line 61 of file PropagatedSpikeBuffer.cpp.

Referenced by PropagatedSpikeBuffer(), and SingleThreadSpikeScheduler::reset().

size_t PropagatedSpikeBuffer::length (  )  [inline]

Return the actual length of the buffer.

Definition at line 105 of file PropagatedSpikeBuffer.h.

Referenced by beginSpikeTargetGroups().


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

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