[−][src]Struct tract_core::plan::SimpleState
Fields
states: Vec<Option<Box<dyn OpState>>>
session_state: SessionState
values: Vec<Option<TVec<Arc<Tensor>>>>
Methods
impl<TI, O, M, P> SimpleState<TI, O, M, P> where
TI: Fact + Clone + 'static,
O: Debug + Display + AsRef<dyn Op> + AsMut<dyn Op> + Clone + 'static,
M: Borrow<ModelImpl<TI, O>>,
P: Borrow<SimplePlan<TI, O, M>> + Clone,
[src]
TI: Fact + Clone + 'static,
O: Debug + Display + AsRef<dyn Op> + AsMut<dyn Op> + Clone + 'static,
M: Borrow<ModelImpl<TI, O>>,
P: Borrow<SimplePlan<TI, O, M>> + Clone,
pub fn new(plan: P) -> TractResult<SimpleState<TI, O, M, P>>
[src]
pub fn new_multiplan(plans: Vec<P>) -> TractResult<SimpleState<TI, O, M, P>>
[src]
pub fn reset_wires(&mut self) -> TractResult<()>
[src]
Reset wires state.
pub fn reset_op_states(&mut self) -> TractResult<()>
[src]
Reset wires state.
pub fn run(&mut self, inputs: TVec<Tensor>) -> TractResult<TVec<Arc<Tensor>>>
[src]
pub fn run_plan(
&mut self,
inputs: TVec<Tensor>,
plan: usize
) -> TractResult<TVec<Arc<Tensor>>>
[src]
&mut self,
inputs: TVec<Tensor>,
plan: usize
) -> TractResult<TVec<Arc<Tensor>>>
pub fn set_inputs(&mut self, inputs: TVec<Tensor>) -> TractResult<()>
[src]
pub fn set_input(&mut self, input: usize, t: Tensor) -> TractResult<()>
[src]
pub fn take_outputs(&mut self) -> TractResult<Vec<Arc<Tensor>>>
[src]
pub fn set_values(&mut self, id: usize, values: TVec<Tensor>) -> TractResult<()>
[src]
pub fn set_value(&mut self, id: usize, value: Tensor) -> TractResult<()>
[src]
pub fn compute_one(&mut self, node: usize) -> TractResult<()>
[src]
pub fn compute_recursively(
&mut self,
node: usize
) -> TractResult<&[Arc<Tensor>]>
[src]
&mut self,
node: usize
) -> TractResult<&[Arc<Tensor>]>
pub fn take_by_name(&mut self, name: &str) -> TractResult<TVec<Tensor>>
[src]
pub fn take(&mut self, id: usize) -> TractResult<TVec<Tensor>>
[src]
pub fn plan(&self) -> &SimplePlan<TI, O, M>
[src]
pub fn model(&self) -> &ModelImpl<TI, O>
[src]
Trait Implementations
impl<TI, O, M, P> Clone for SimpleState<TI, O, M, P> where
TI: Fact + Clone + 'static,
O: Debug + Display + AsRef<dyn Op> + AsMut<dyn Op> + Clone + 'static,
M: Borrow<ModelImpl<TI, O>>,
P: Borrow<SimplePlan<TI, O, M>> + Clone,
[src]
TI: Fact + Clone + 'static,
O: Debug + Display + AsRef<dyn Op> + AsMut<dyn Op> + Clone + 'static,
M: Borrow<ModelImpl<TI, O>>,
P: Borrow<SimplePlan<TI, O, M>> + Clone,
fn clone(&self) -> SimpleState<TI, O, M, P>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<TI: Debug, O: Debug, M: Debug, P: Debug> Debug for SimpleState<TI, O, M, P> where
TI: Fact + Clone + 'static,
O: Debug + Display + AsRef<dyn Op> + AsMut<dyn Op> + Clone + 'static,
M: Borrow<ModelImpl<TI, O>>,
P: Borrow<SimplePlan<TI, O, M>>,
[src]
TI: Fact + Clone + 'static,
O: Debug + Display + AsRef<dyn Op> + AsMut<dyn Op> + Clone + 'static,
M: Borrow<ModelImpl<TI, O>>,
P: Borrow<SimplePlan<TI, O, M>>,
Auto Trait Implementations
impl<TI, O, M, P> Send for SimpleState<TI, O, M, P> where
M: Send,
O: Send,
P: Send,
M: Send,
O: Send,
P: Send,
impl<TI, O, M, P> !Sync for SimpleState<TI, O, M, P>
impl<TI, O, M, P> Unpin for SimpleState<TI, O, M, P> where
M: Unpin,
O: Unpin,
P: Unpin,
TI: Unpin,
M: Unpin,
O: Unpin,
P: Unpin,
TI: Unpin,
impl<TI, O, M, P> !UnwindSafe for SimpleState<TI, O, M, P>
impl<TI, O, M, P> !RefUnwindSafe for SimpleState<TI, O, M, P>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> Clone for T where
T: Clone,
[src]
T: Clone,