pub struct GgmlGraph(/* private fields */);Expand description
A wrapper around ggml_cgraph.
Graphs are owned by their GgmlContext and must not outlive it.
Implementations§
Source§impl GgmlGraph
impl GgmlGraph
Sourcepub fn as_ptr(&mut self) -> *mut ggml_cgraph
pub fn as_ptr(&mut self) -> *mut ggml_cgraph
Get the raw graph pointer.
Sourcepub fn build_forward(&mut self, tensor: &GgmlTensor)
pub fn build_forward(&mut self, tensor: &GgmlTensor)
Add a tensor and its dependencies to the forward computation graph.
Sourcepub fn node(&mut self, i: i32) -> GgmlTensor
pub fn node(&mut self, i: i32) -> GgmlTensor
Get a node (output tensor) by index. Use -1 for the last node.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GgmlGraph
impl RefUnwindSafe for GgmlGraph
impl !Send for GgmlGraph
impl !Sync for GgmlGraph
impl Unpin for GgmlGraph
impl UnsafeUnpin for GgmlGraph
impl UnwindSafe for GgmlGraph
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