NEST  2.6.0,not_revisioned_source_dir@0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
nest::ListRingBuffer Class Reference

#include <ring_buffer.h>

Public Member Functions

 ListRingBuffer ()
 
void append_value (const long_t offs, const double_t)
 Append a value to the ring buffer list. More...
 
std::list< double_t > & get_list (const long_t offs)
 
void clear ()
 Initialize the buffer with empty lists. 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::vector< std::list
< double_t > > 
buffer_
 Buffered data. More...
 

Constructor & Destructor Documentation

nest::ListRingBuffer::ListRingBuffer ( )

Member Function Documentation

void nest::ListRingBuffer::append_value ( const long_t  offs,
const double_t  v 
)
inline

Append a value to the ring buffer list.

Parameters
offsArrival time relative to beginning of slice.
double_tValue to append.

References buffer_, and get_index_().

void nest::ListRingBuffer::clear ( )

Initialize the buffer with empty lists.

Also resizes the buffer if necessary.

References resize().

size_t nest::ListRingBuffer::get_index_ ( const delay  d) const
inlineprivate

Obtain buffer index.

Parameters
delaydelivery delay for event
Returns
index to buffer element into which event should be recorded.

References assert(), buffer_, and nest::Scheduler::get_modulo().

Referenced by append_value(), and get_list().

std::list< double_t > & nest::ListRingBuffer::get_list ( const long_t  offs)
inline
void nest::ListRingBuffer::resize ( )

Resize the buffer according to max_thread and max_delay.

New elements are filled with empty lists.

Note
resize() has no effect if the buffer has the correct size.

References nest::Scheduler::get_max_delay(), and nest::Scheduler::get_min_delay().

size_t nest::ListRingBuffer::size ( void  ) const
inline

Returns buffer size, for memory measurement.

References buffer_.

Member Data Documentation

std::vector<std::list<double_t> > nest::ListRingBuffer::buffer_
private

Buffered data.

Referenced by append_value(), get_index_(), get_list(), and size().


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