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