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< Entry > | entries |
| int | next = 0 |
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.
|
inlineexplicit |
Definition at line 152 of file mne_raw_data.cpp.
|
inline |
Allocate (or reclaim) an entry for res with dimensions nrow x ncol.
Definition at line 158 of file mne_raw_data.cpp.
| std::vector<Entry> MNELIB::RingBuffer::entries |
Definition at line 149 of file mne_raw_data.cpp.
| int MNELIB::RingBuffer::next = 0 |
Definition at line 150 of file mne_raw_data.cpp.