INNER CODE UNIT · Rust

f

sonos/tract · api/ffi/src/lib.rs:957

        let f = (*runnable).0.input_fact(input_id)?;
        *fact = Box::into_raw(Box::new(TractFact(f)));
        Ok(())
    })
}

/// Query the output fact of a runnable model.
///
/// Thre returned fact must be freed with tract_fact_destroy.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn tract_runnable_output_fact(
    runnable: *const TractRunnable,
    output_id: usize,
    fact: *mut *mut TractFact,
) -> TRACT_RESULT {
    wrap(|| unsafe {
        check_not_null!(runnable, fact);
        *fact = std::ptr::null_mut();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…