pub struct GgmlAllocr { /* private fields */ }Expand description
A safe wrapper around ggml_gallocr.
Implementations§
Source§impl GgmlAllocr
impl GgmlAllocr
Sourcepub fn new(backend: &GgmlBackend) -> Self
pub fn new(backend: &GgmlBackend) -> Self
Create a new graph allocator for the given backend.
Sourcepub fn alloc_graph(&self, graph: &mut GgmlGraph) -> bool
pub fn alloc_graph(&self, graph: &mut GgmlGraph) -> bool
Allocate all tensors in a graph.
Trait Implementations§
Source§impl Debug for GgmlAllocr
impl Debug for GgmlAllocr
Auto Trait Implementations§
impl Freeze for GgmlAllocr
impl RefUnwindSafe for GgmlAllocr
impl !Send for GgmlAllocr
impl !Sync for GgmlAllocr
impl Unpin for GgmlAllocr
impl UnsafeUnpin for GgmlAllocr
impl UnwindSafe for GgmlAllocr
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