pub struct Context { /* private fields */ }Implementations§
Source§impl Context
impl Context
pub fn new(device: &str) -> Result<Self, Error>
pub fn dvrt_context(&mut self) -> Result<&mut Context, Error>
pub fn load_model_file<P: AsRef<Path> + Into<Vec<u8>>>( &self, filename: P, ) -> Result<(), Error>
pub fn load_image_file( &mut self, tensor: Option<&mut Tensor>, filename: &str, roi: Option<&[i32]>, pred: u32, ) -> Result<(), Error>
pub fn boxes( &self, boxes: &mut Vec<VAALBox>, max_len: usize, ) -> Result<usize, Error>
pub fn model(&self) -> Result<Model, Error>
pub fn unload_model(&mut self) -> Result<(), Error>
pub fn load_frame_dmabuf( &self, tensor: Option<&Tensor>, handle: i32, fourcc: u32, width: i32, height: i32, roi: Option<&[i32; 4]>, proc: u32, ) -> Result<(), Error>
pub fn run_model(&self) -> Result<(), Error>
pub fn output_tensor(&self, index: i32) -> Option<Tensor>
pub fn output_count(&self) -> Result<i32, Error>
pub fn output_name(&self, index: i32) -> Option<&str>
pub fn label(&self, index: i32) -> Result<&str, Error>
pub fn labels(&self) -> Vec<&str>
pub fn parameter_gets()
pub fn parameter_sets(&self, name: &str, value: &str) -> Result<(), Error>
pub fn parameter_getf()
pub fn parameter_setf(&self, name: &str, value: &[f32]) -> Result<(), Error>
pub fn parameter_geti()
pub fn parameter_seti(&self, name: &str, value: &[i32]) -> Result<(), Error>
pub fn parameter_getu()
pub fn parameter_setu(&self, name: &str, value: &[u32]) -> Result<(), Error>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Context
impl !RefUnwindSafe for Context
impl !Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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