NEST
2.6.0,not_revisioned_source_dir@0
|
Queue for all spikes arriving into a neuron. More...
#include <slice_ring_buffer.h>
Classes | |
struct | SpikeInfo |
Information about spike. More... | |
Public Member Functions | |
SliceRingBuffer () | |
void | add_spike (const delay rel_delivery, const long_t stamp, const double ps_offset, const double weight) |
Add spike to queue. More... | |
void | add_refractory (const long_t stamp, const double_t ps_offset) |
Add refractory event to queue. More... | |
void | prepare_delivery () |
Prepare for spike delivery in current slice by sorting. More... | |
void | discard_events () |
Discard all events in current slice. More... | |
bool | get_next_spike (const long_t req_stamp, double_t &ps_offset, double_t &weight, bool &end_of_refract) |
Return next spike. More... | |
void | clear () |
Clear buffer. More... | |
void | resize () |
Resize the buffer according to min_delay and max_delay. More... | |
Private Attributes | |
std::vector< std::vector < SpikeInfo > > | queue_ |
entire queue, one slot per min_delay block within max_delay More... | |
std::vector< SpikeInfo > * | deliver_ |
slot to deliver from More... | |
SpikeInfo | refract_ |
pseudo-event for return from refractoriness More... | |
Queue for all spikes arriving into a neuron.
Spikes are stored unsorted on arrival, but are sorted when prepare_delivery() is called. They can then be retrieved one by one in correct temporal order. Coinciding spikes are combined into one, see get_next_spike().
Data is organized as follows:
nest::SliceRingBuffer::SliceRingBuffer | ( | ) |
Add refractory event to queue.
The refractory event is actually stored as a pseudo-event.
stamp | Delivery time |
ps_offset | Precise timing offset of spike time |
References assert(), nest::names::max, nest::SliceRingBuffer::SpikeInfo::ps_offset_, refract_, and nest::SliceRingBuffer::SpikeInfo::stamp_.
Referenced by nest::iaf_psc_delta_canon::update().
|
inline |
Add spike to queue.
rel_delivery | relative delivery time |
stamp | Delivery time |
ps_offset | Precise timing offset of spike time |
weight | Weight of spike. |
References assert(), nest::Scheduler::get_slice_modulo(), and queue_.
Referenced by nest::parrot_neuron_ps::handle(), and nest::iaf_psc_delta_canon::handle().
void nest::SliceRingBuffer::clear | ( | ) |
void nest::SliceRingBuffer::discard_events | ( | ) |
Discard all events in current slice.
References nest::Scheduler::get_slice_modulo().
|
inline |
Return next spike.
req_stamp | Request spike with this stamp. Queue should never contain spikes with smaller stamps. Spikes with larger stamps are left in queue. |
ps_offset | PS-sense offset of spike time |
weight | Spike weight |
end_of_refract | True if spike is pseudo-spike marking end of refractory period |
References assert(), deliver_, nest::names::max, nest::SliceRingBuffer::SpikeInfo::ps_offset_, refract_, and nest::SliceRingBuffer::SpikeInfo::stamp_.
Referenced by nest::parrot_neuron_ps::update(), and nest::iaf_psc_delta_canon::update().
void nest::SliceRingBuffer::prepare_delivery | ( | ) |
Prepare for spike delivery in current slice by sorting.
References nest::Scheduler::get_slice_modulo().
Referenced by nest::parrot_neuron_ps::update(), and nest::iaf_psc_delta_canon::update().
void nest::SliceRingBuffer::resize | ( | ) |
Resize the buffer according to min_delay and max_delay.
References nest::names::clear, nest::Scheduler::get_max_delay(), and nest::Scheduler::get_min_delay().
Referenced by nest::parrot_neuron_ps::init_buffers_().
|
private |
slot to deliver from
Referenced by get_next_spike().
|
private |
entire queue, one slot per min_delay block within max_delay
Referenced by add_spike().
|
private |
pseudo-event for return from refractoriness
Referenced by add_refractory(), and get_next_spike().