pub struct Device { /* private fields */ }Expand description
A synchronous, single-threaded local CPU device that executes a model’s
kernels. Created with either the static-library loader
(local_sync_static) or the embedded-ELF
loader (local_sync).
Implementations§
Source§impl Device
impl Device
Sourcepub fn local_sync_static(
arena: &Arena,
libraries: &[LibraryQueryFn],
) -> Result<Self>
pub fn local_sync_static( arena: &Arena, libraries: &[LibraryQueryFn], ) -> Result<Self>
Device whose executables are statically linked into this binary.
libraries are the query functions of every model linked into the
firmware; the loader resolves a .vmfb’s library reference by name.
Sourcepub fn local_sync(arena: &Arena) -> Result<Self>
pub fn local_sync(arena: &Arena) -> Result<Self>
Device using the embedded-ELF loader, for a .vmfb whose kernels are
position-independent ELF mapped into RAM (the host-test path; the MCU
uses local_sync_static).
Trait Implementations§
Auto Trait Implementations§
impl !Send for Device
impl !Sync for Device
impl Freeze for Device
impl RefUnwindSafe for Device
impl Unpin for Device
impl UnsafeUnpin for Device
impl UnwindSafe for Device
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