pub struct SimplePlan<F, O>where
F: Fact + Clone + 'static,
O: Debug + Display + AsRef<dyn Op> + AsMut<dyn Op> + Clone + 'static,{ /* private fields */ }Implementations§
Source§impl<F, O> SimplePlan<F, O>
impl<F, O> SimplePlan<F, O>
Sourcepub fn new(
model: impl Into<Arc<Graph<F, O>>>,
) -> TractResult<Arc<SimplePlan<F, O>>>
pub fn new( model: impl Into<Arc<Graph<F, O>>>, ) -> TractResult<Arc<SimplePlan<F, O>>>
This contructor returns a plan that will compute all the model default outputs in one pass.
Sourcepub fn new_with_options(
model: impl Into<Arc<Graph<F, O>>>,
options: &RunOptions,
) -> TractResult<Arc<SimplePlan<F, O>>>
pub fn new_with_options( model: impl Into<Arc<Graph<F, O>>>, options: &RunOptions, ) -> TractResult<Arc<SimplePlan<F, O>>>
This contructor returns a plan that will compute all the model default outputs in one pass.
Sourcepub fn new_for_output(
model: Graph<F, O>,
output: OutletId,
) -> TractResult<Arc<SimplePlan<F, O>>>
👎Deprecated
pub fn new_for_output( model: Graph<F, O>, output: OutletId, ) -> TractResult<Arc<SimplePlan<F, O>>>
This contructor returns a plan that will compute the specified output.
Sourcepub fn new_for_outputs(
model: impl Into<Arc<Graph<F, O>>>,
outputs: &[OutletId],
) -> TractResult<Arc<SimplePlan<F, O>>>
👎Deprecated
pub fn new_for_outputs( model: impl Into<Arc<Graph<F, O>>>, outputs: &[OutletId], ) -> TractResult<Arc<SimplePlan<F, O>>>
This contructor returns a plan that will compute all specified outputs in one pass.
pub fn with_session_handler<H: SessionStateHandler + 'static>( self, session_handler: H, ) -> Self
pub fn new_for_outputs_and_deps( model: impl Into<Arc<Graph<F, O>>>, outputs: &[OutletId], deps: &[(usize, usize)], ) -> TractResult<Arc<SimplePlan<F, O>>>
👎Deprecated
pub fn build( model: impl Into<Arc<Graph<F, O>>>, options: &RunOptions, ) -> TractResult<SimplePlan<F, O>>
pub fn build_with_outputs_and_deps( model: impl Into<Arc<Graph<F, O>>>, outputs: &[OutletId], deps: &[(usize, usize)], options: &RunOptions, ) -> TractResult<SimplePlan<F, O>>
👎Deprecated
pub fn order_without_consts(&self) -> &[usize]
pub fn run(self: &Arc<Self>, inputs: TVec<TValue>) -> TractResult<TVec<TValue>>
pub fn model(&self) -> &Graph<F, O>
pub fn spawn(self: &Arc<Self>) -> TractResult<SimpleState<F, O>>
Trait Implementations§
Source§impl<F, O> Clone for SimplePlan<F, O>
impl<F, O> Clone for SimplePlan<F, O>
Source§fn clone(&self) -> SimplePlan<F, O>
fn clone(&self) -> SimplePlan<F, O>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<F, O> Freeze for SimplePlan<F, O>
impl<F, O> !RefUnwindSafe for SimplePlan<F, O>
impl<F, O> Send for SimplePlan<F, O>
impl<F, O> Sync for SimplePlan<F, O>
impl<F, O> Unpin for SimplePlan<F, O>
impl<F, O> UnsafeUnpin for SimplePlan<F, O>
impl<F, O> !UnwindSafe for SimplePlan<F, O>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more