NEST main@caf0ae8
 
Loading...
Searching...
No Matches
nest::MultRBuffer Class Reference

#include <ring_buffer.h>

Public Member Functions

 MultRBuffer ()
 
void add_value (const long offs, const double)
 Add a value to the ring buffer.
 
double get_value (const long offs)
 Read one value from ring buffer.
 
void clear ()
 Initialize the buffer with noughts.
 
void resize ()
 Resize the buffer according to max_thread and max_delay.
 
size_t size () const
 Returns buffer size, for memory measurement.
 

Private Member Functions

size_t get_index_ (const long d) const
 Obtain buffer index.
 

Private Attributes

std::vector< double > buffer_
 Buffered data.
 

Constructor & Destructor Documentation

◆ MultRBuffer()

nest::MultRBuffer::MultRBuffer ( )

Member Function Documentation

◆ add_value()

void nest::MultRBuffer::add_value ( const long  offs,
const double  v 
)
inline

Add a value to the ring buffer.

Parameters
offsArrival time relative to beginning of slice.
doubleValue to add.

References buffer_, and get_index_().

Here is the call graph for this function:

◆ clear()

void nest::MultRBuffer::clear ( )

Initialize the buffer with noughts.

References buffer_.

◆ get_index_()

size_t nest::MultRBuffer::get_index_ ( const long  d) const
inlineprivate

Obtain buffer index.

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

References buffer_, nest::KernelManager::event_delivery_manager, nest::EventDeliveryManager::get_modulo(), and nest::kernel().

Referenced by add_value(), and get_value().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_value()

double nest::MultRBuffer::get_value ( const long  offs)
inline

Read one value from ring buffer.

Parameters
offsOffset of element to read within slice.
Returns
value

References buffer_, get_index_(), and nest::kernel().

Here is the call graph for this function:

◆ resize()

void nest::MultRBuffer::resize ( )

Resize the buffer according to max_thread and max_delay.

References buffer_, nest::KernelManager::connection_manager, nest::ConnectionManager::get_max_delay(), nest::ConnectionManager::get_min_delay(), nest::kernel(), and size().

Here is the call graph for this function:

◆ size()

size_t nest::MultRBuffer::size ( ) const
inline

Returns buffer size, for memory measurement.

References buffer_.

Referenced by resize().

Here is the caller graph for this function:

Member Data Documentation

◆ buffer_

std::vector< double > nest::MultRBuffer::buffer_
private

Buffered data.

Referenced by add_value(), clear(), get_index_(), get_value(), resize(), and size().


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