INNER CODE UNIT · Rust

add_borrowed_delegate

SitinCloud/Owlyshield · owlyshield_predict/moonfire-tflite/src/lib.rs:129

    pub fn add_borrowed_delegate(&mut self, d: &'a Delegate) {
        unsafe { TfLiteInterpreterOptionsAddDelegate(self.options.as_ptr(), d.delegate.as_ptr()) }
    }

    pub fn add_owned_delegate(&mut self, d: Delegate) {
        unsafe { TfLiteInterpreterOptionsAddDelegate(self.options.as_ptr(), d.delegate.as_ptr()) }
        self.owned_delegates.push(d);
    }

    pub fn build(
        mut self,
        model: &Model,
        seq_len: usize,
        vector_len: usize,
    ) -> Result<Interpreter<'a>, ()> {
        let interpreter =
            unsafe { TfLiteInterpreterCreate(model.0.as_ptr(), self.options.as_ptr()) };
        let interpreter = Interpreter {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…