pub struct AutoBatcher<T: TensorElement> { /* private fields */ }Expand description
Automatic operation batcher
Implementations§
Source§impl<T: TensorElement + Copy + Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Div<Output = T> + FloatElement + Send + Sync> AutoBatcher<T>
impl<T: TensorElement + Copy + Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Div<Output = T> + FloatElement + Send + Sync> AutoBatcher<T>
Sourcepub fn with_config(config: BatchingConfig) -> Self
pub fn with_config(config: BatchingConfig) -> Self
Create a new auto-batcher with custom configuration
Sourcepub fn submit(&self, op: BatchableOp<T>) -> Result<BatchHandle<T>>
pub fn submit(&self, op: BatchableOp<T>) -> Result<BatchHandle<T>>
Submit an operation for batching
Sourcepub fn stats(&self) -> BatchingStats
pub fn stats(&self) -> BatchingStats
Get batching statistics
Sourcepub fn reset_stats(&self)
pub fn reset_stats(&self)
Reset statistics
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for AutoBatcher<T>
impl<T> RefUnwindSafe for AutoBatcher<T>
impl<T> Send for AutoBatcher<T>
impl<T> Sync for AutoBatcher<T>
impl<T> Unpin for AutoBatcher<T>
impl<T> UnsafeUnpin for AutoBatcher<T>
impl<T> UnwindSafe for AutoBatcher<T>
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
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