Skip to content

Commit

Permalink
fix(mnn-sync): make fields of SessionRunner public
Browse files Browse the repository at this point in the history
  • Loading branch information
CeNiEi committed Oct 4, 2024
1 parent f47b79b commit 4de5fbd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mnn-sync/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ impl Drop for SessionHandle {
}
}

#[non_exhaustive]
pub struct SessionRunner {
pub(crate) interpreter: Interpreter,
pub(crate) session: Session,
pub interpreter: Interpreter,
pub session: Session,
}

impl SessionHandle {
Expand Down Expand Up @@ -193,6 +194,11 @@ impl SessionRunner {
self.interpreter.run_session(&self.session)
}

pub fn resize_session(&mut self) -> Result<()> {
self.interpreter.resize_session(&mut self.session);
Ok(())
}

pub fn interpreter(&self) -> &Interpreter {
&self.interpreter
}
Expand Down

0 comments on commit 4de5fbd

Please sign in to comment.