INNER CODE UNIT · Rust
drop
rustformers/llm · crates/ggml/src/lib.rs:314
fn drop(&mut self) {
unsafe {
std::alloc::dealloc(self.data.cast(), self.layout);
}
}
}
/// A `ggml` computation graph. Keeps track of all state during computation.
pub struct ComputationGraph {
inner: *mut sys::ggml_cgraph,
}
impl ComputationGraph {
/// Create a new [ComputationGraph] from a raw [sys::ggml_cgraph].
pub fn from_raw(raw_context: *mut sys::ggml_cgraph) -> Self {
Self { inner: raw_context }
}