23 #ifndef SLICE_RING_BUFFER_H
24 #define SLICE_RING_BUFFER_H
69 const double ps_offset,
const double weight);
107 bool& end_of_refract);
139 std::vector<std::vector<SpikeInfo> >
queue_;
150 const double ps_offset,
const double weight)
175 bool& end_of_refract)
177 end_of_refract =
false;
184 end_of_refract =
true;
192 else if (
deliver_->back().stamp_ == req_stamp )
195 ps_offset =
deliver_->back().ps_offset_;
201 &&
deliver_->back().ps_offset_ == ps_offset
202 &&
deliver_->back().stamp_ == req_stamp )
222 ps_offset_(ps_offset),
std::vector< std::vector< SpikeInfo > > queue_
entire queue, one slot per min_delay block within max_delay
Definition: slice_ring_buffer.h:139
double_t weight
Weight of a connection.
Definition: nest.h:170
void clear()
Clear buffer.
Definition: slice_ring_buffer.cpp:52
double_t ps_offset_
Definition: slice_ring_buffer.h:134
static delay get_slice_modulo(delay d)
Index to slice-based buffer.
Definition: scheduler.h:795
void discard_events()
Discard all events in current slice.
Definition: slice_ring_buffer.cpp:67
SpikeInfo(long_t stamp, double_t ps_offset, double_t weight)
Definition: slice_ring_buffer.h:219
long_t stamp_
Definition: slice_ring_buffer.h:133
Queue for all spikes arriving into a neuron.
Definition: slice_ring_buffer.h:56
double_t weight_
Definition: slice_ring_buffer.h:135
std::vector< SpikeInfo > * deliver_
slot to deliver from
Definition: slice_ring_buffer.h:142
SliceRingBuffer()
Definition: slice_ring_buffer.cpp:28
bool operator<(const SpikeInfo &b) const
Definition: slice_ring_buffer.h:227
Information about spike.
Definition: slice_ring_buffer.h:124
void resize()
Resize the buffer according to min_delay and max_delay.
Definition: slice_ring_buffer.cpp:34
void add_spike(const delay rel_delivery, const long_t stamp, const double ps_offset, const double weight)
Add spike to queue.
Definition: slice_ring_buffer.h:149
double double_t
Double precision floating point numbers.
Definition: nest.h:93
const Name b("b")
Specific to Brette & Gerstner 2005 (aeif_cond-*)
Definition: nest_names.h:58
const Name max("max")
Definition: topology_names.h:75
bool operator>(const SpikeInfo &b) const
Definition: slice_ring_buffer.h:239
long_t delay
Delay of a connection.
Definition: nest.h:178
Default types used by the NEST kernel.
SpikeInfo refract_
pseudo-event for return from refractoriness
Definition: slice_ring_buffer.h:144
bool operator<=(const SpikeInfo &b) const
Definition: slice_ring_buffer.h:233
bool get_next_spike(const long_t req_stamp, double_t &ps_offset, double_t &weight, bool &end_of_refract)
Return next spike.
Definition: slice_ring_buffer.h:173
void prepare_delivery()
Prepare for spike delivery in current slice by sorting.
Definition: slice_ring_buffer.cpp:58
long long_t
Integer number with at least 32 bit.
Definition: nest.h:96
void add_refractory(const long_t stamp, const double_t ps_offset)
Add refractory event to queue.
Definition: slice_ring_buffer.h:160