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