pub struct MmapManager { /* private fields */ }Expand description
Memory-mapped embedding manager with dirty tracking and prefetching.
Manages large embedding matrices that may not fit in RAM using memory-mapped files. Tracks which embeddings have been accessed and modified for efficient I/O.
Implementations§
Source§impl MmapManager
impl MmapManager
Sourcepub fn embedding_offset(&self, node_id: u64) -> Option<usize>
pub fn embedding_offset(&self, node_id: u64) -> Option<usize>
Sourcepub fn get_embedding(&self, node_id: u64) -> &[f32]
pub fn get_embedding(&self, node_id: u64) -> &[f32]
Sourcepub fn set_embedding(&mut self, node_id: u64, data: &[f32])
pub fn set_embedding(&mut self, node_id: u64, data: &[f32])
Sourcepub fn flush_dirty(&self) -> Result<()>
pub fn flush_dirty(&self) -> Result<()>
Trait Implementations§
Source§impl Debug for MmapManager
impl Debug for MmapManager
Auto Trait Implementations§
impl Freeze for MmapManager
impl RefUnwindSafe for MmapManager
impl Send for MmapManager
impl Sync for MmapManager
impl Unpin for MmapManager
impl UnwindSafe for MmapManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more