Struct executorch_sys::torch::executor::util::MmapDataLoader
source · #[repr(C, align(8))]pub struct MmapDataLoader {
pub _bindgen_opaque_blob: [u64; 5],
}Expand description
A DataLoader that loads segments from a file, allocating the memory
with malloc().
Note that this will keep the file open for the duration of its lifetime, to avoid the overhead of opening it again for every Load() call.
Fields§
§_bindgen_opaque_blob: [u64; 5]Implementations§
source§impl MmapDataLoader
impl MmapDataLoader
pub unsafe fn from( file_name: *const c_char, mlock_config: MmapDataLoader_MlockConfig, ) -> Result<MmapDataLoader>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MmapDataLoader
impl RefUnwindSafe for MmapDataLoader
impl Send for MmapDataLoader
impl Sync for MmapDataLoader
impl Unpin for MmapDataLoader
impl UnwindSafe for MmapDataLoader
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