NEST
2.6.0,not_revisioned_source_dir@0
|
#include <ring_buffer.h>
Public Member Functions | |
MultRBuffer () | |
void | add_value (const long_t offs, const double_t) |
Add a value to the ring buffer. More... | |
double | get_value (const long_t offs) |
Read one value from ring buffer. More... | |
void | clear () |
Initialize the buffer with noughts. More... | |
void | resize () |
Resize the buffer according to max_thread and max_delay. More... | |
size_t | size () const |
Returns buffer size, for memory measurement. More... | |
Private Member Functions | |
size_t | get_index_ (const delay d) const |
Obtain buffer index. More... | |
Private Attributes | |
std::valarray< double_t > | buffer_ |
Buffered data. More... | |
nest::MultRBuffer::MultRBuffer | ( | ) |
Add a value to the ring buffer.
offs | Arrival time relative to beginning of slice. |
double_t | Value to add. |
References assert(), buffer_, and get_index_().
void nest::MultRBuffer::clear | ( | ) |
Initialize the buffer with noughts.
|
inlineprivate |
Obtain buffer index.
delay | delivery delay for event |
References assert(), buffer_, and nest::Scheduler::get_modulo().
Referenced by add_value(), and get_value().
|
inline |
Read one value from ring buffer.
offs | Offset of element to read within slice. |
References assert(), buffer_, get_index_(), and nest::Scheduler::get_min_delay().
void nest::MultRBuffer::resize | ( | ) |
Resize the buffer according to max_thread and max_delay.
References nest::Scheduler::get_max_delay(), and nest::Scheduler::get_min_delay().
|
inline |
Returns buffer size, for memory measurement.
References buffer_.
|
private |
Buffered data.
Referenced by add_value(), get_index_(), get_value(), and size().