pub struct SessionHandle { /* private fields */ }Expand description
One stream’s view of a LanedRunnable: the lane it holds, and the queue to
the worker. Cloning it shares the lane – clones are the same stream, and the
lane goes back to the table once the last of them is dropped.
Trait Implementations§
Source§impl Clone for SessionHandle
impl Clone for SessionHandle
Source§fn clone(&self) -> SessionHandle
fn clone(&self) -> SessionHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SessionHandle
impl Debug for SessionHandle
Source§impl State for SessionHandle
impl State for SessionHandle
fn run(&mut self, inputs: TVec<TValue>) -> TractResult<TVec<TValue>>
fn runnable(&self) -> &dyn Runnable
Source§fn resolve_symbol(&mut self, symbol: &Symbol, value: i64) -> TractResult<()>
fn resolve_symbol(&mut self, symbol: &Symbol, value: i64) -> TractResult<()>
Pin a symbol for the coming turn. A pulsed plan needs the stream length
on the turn carrying the last, partial pulse: the input tensor is padded
to a full pulse, so its shape can not carry it.
Source§fn seat(&mut self, seating: Seating) -> TractResult<()>
fn seat(&mut self, seating: Seating) -> TractResult<()>
Seat the lanes carrying the coming turn’s streams, one lane per row of
axis 0 of its tensors. A turn seating more than one lane needs axis 0 of
every stateful node to be the model’s batch axis.
Source§fn reset_lanes(&mut self, lanes: &[LaneId]) -> TractResult<()>
fn reset_lanes(&mut self, lanes: &[LaneId]) -> TractResult<()>
Drop the session state
lanes hold, handing them to new streams.fn input_count(&self) -> usize
fn output_count(&self) -> usize
Auto Trait Implementations§
impl !RefUnwindSafe for SessionHandle
impl !UnwindSafe for SessionHandle
impl Freeze for SessionHandle
impl Send for SessionHandle
impl Sync for SessionHandle
impl Unpin for SessionHandle
impl UnsafeUnpin for SessionHandle
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
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>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn 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>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which 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)
Converts
&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)
Converts
&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> DowncastSend for T
impl<T> DowncastSend for T
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