INNER CODE UNIT · Rust

s

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

        let s = (*runnable).0.spawn_state()?;
        *state = Box::into_raw(Box::new(TractState(s)));
        Ok(())
    })
}

/// Convenience function to run a stateless model.
///
/// `inputs` is a pointer to an pre-existing array of input TractTensor. Its length *must* be equal
/// to the number of inputs of the models. The function does not take ownership of the input
/// tensors.
/// `outputs` is a pointer to a pre-existing array of TractTensor pointers that will be overwritten
/// with pointers to output tensors. These tensors are under the responsiblity of the caller, it
/// will have to release them with `tract_tensor_destroy`.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn tract_runnable_run(
    runnable: *mut TractRunnable,
    inputs: *mut *mut TractTensor,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…