v2.0.0
Loading...
Searching...
No Matches
MNELIB::RingBuffer Struct Reference

Circular ring buffer for managing raw-data matrix allocations. More...

Classes

struct  Entry

Public Member Functions

 RingBuffer (int nslots)
void allocate (int nrow, int ncol, MNERawBufDef::RowMajorMatrixXf *res)

Public Attributes

std::vector< Entryentries
int next = 0

Detailed Description

Circular ring buffer for managing raw-data matrix allocations.

Each slot tracks a single RowMajorMatrixXf. When a slot is reused the previous occupant is evicted by resizing it to 0x0, which releases its heap storage while keeping the Eigen object itself alive.

Definition at line 143 of file mne_raw_data.cpp.

Constructor & Destructor Documentation

◆ RingBuffer()

MNELIB::RingBuffer::RingBuffer ( int nslots)
inlineexplicit

Definition at line 152 of file mne_raw_data.cpp.

Member Function Documentation

◆ allocate()

void MNELIB::RingBuffer::allocate ( int nrow,
int ncol,
MNERawBufDef::RowMajorMatrixXf * res )
inline

Allocate (or reclaim) an entry for res with dimensions nrow x ncol.

Definition at line 158 of file mne_raw_data.cpp.

Member Data Documentation

◆ entries

std::vector<Entry> MNELIB::RingBuffer::entries

Definition at line 149 of file mne_raw_data.cpp.

◆ next

int MNELIB::RingBuffer::next = 0

Definition at line 150 of file mne_raw_data.cpp.


The documentation for this struct was generated from the following file: