pub struct AsyncBinaryOperationExecutor { /* private fields */ }Expand description
Async binary operation executor with CPU-GPU overlap
Implementations§
Source§impl AsyncBinaryOperationExecutor
impl AsyncBinaryOperationExecutor
Sourcepub fn new(_device_id: usize) -> Result<Self>
pub fn new(_device_id: usize) -> Result<Self>
Create a new async binary operation executor (CPU-only)
Sourcepub fn execute_async<T, Op>(
&self,
a: &Tensor<T>,
b: &Tensor<T>,
op: Op,
) -> AsyncBinaryOpFuture<T> ⓘ
pub fn execute_async<T, Op>( &self, a: &Tensor<T>, b: &Tensor<T>, op: Op, ) -> AsyncBinaryOpFuture<T> ⓘ
Execute an async binary operation with CPU-GPU overlap
Sourcepub fn execute_async_with_priority<T, Op>(
&self,
a: &Tensor<T>,
b: &Tensor<T>,
op: Op,
_priority: WorkPriority,
) -> AsyncBinaryOpFuture<T> ⓘ
pub fn execute_async_with_priority<T, Op>( &self, a: &Tensor<T>, b: &Tensor<T>, op: Op, _priority: WorkPriority, ) -> AsyncBinaryOpFuture<T> ⓘ
Execute an async binary operation with custom priority
Sourcepub async fn execute_batch_async<T, Op>(
&self,
operations: Vec<(&Tensor<T>, &Tensor<T>, Op)>,
) -> Result<Vec<Tensor<T>>>
pub async fn execute_batch_async<T, Op>( &self, operations: Vec<(&Tensor<T>, &Tensor<T>, Op)>, ) -> Result<Vec<Tensor<T>>>
Execute multiple binary operations concurrently with CPU-GPU overlap
Sourcepub fn synchronize(&self)
pub fn synchronize(&self)
Synchronize all pending operations
Auto Trait Implementations§
impl Freeze for AsyncBinaryOperationExecutor
impl RefUnwindSafe for AsyncBinaryOperationExecutor
impl Send for AsyncBinaryOperationExecutor
impl Sync for AsyncBinaryOperationExecutor
impl Unpin for AsyncBinaryOperationExecutor
impl UnsafeUnpin for AsyncBinaryOperationExecutor
impl UnwindSafe for AsyncBinaryOperationExecutor
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