pub struct DeallocOperation<'c> { /* private fields */ }
Expand description
A dealloc
operation. GPU memory deallocation operation.
The gpu.dealloc
operation frees the region of memory referenced by a
memref which was originally created by the gpu.alloc
operation. It is
similar to the memref.dealloc
op, but supports asynchronous GPU execution.
The op does not execute before all async dependencies have finished executing.
If the async
keyword is present, the op is executed asynchronously (i.e.
it does not block until the execution has finished on the device). In
that case, it returns a !gpu.async.token.
Example:
%token = gpu.dealloc async [%dep] %memref : memref<8x64xf32, 1>
Implementations§
source§impl<'c> DeallocOperation<'c>
impl<'c> DeallocOperation<'c>
sourcepub fn as_operation(&self) -> &Operation<'c>
pub fn as_operation(&self) -> &Operation<'c>
Returns a generic operation.
sourcepub fn builder(
context: &'c Context,
location: Location<'c>
) -> DeallocOperationBuilder<'c, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> DeallocOperationBuilder<'c, Unset, Unset>
Creates a builder.
pub fn async_token(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn async_dependencies(&self) -> impl Iterator<Item = Value<'c, '_>>
pub fn memref(&self) -> Result<Value<'c, '_>, Error>
Trait Implementations§
source§impl<'c> From<DeallocOperation<'c>> for Operation<'c>
impl<'c> From<DeallocOperation<'c>> for Operation<'c>
source§fn from(operation: DeallocOperation<'c>) -> Self
fn from(operation: DeallocOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for DeallocOperation<'c>
impl<'c> !Send for DeallocOperation<'c>
impl<'c> !Sync for DeallocOperation<'c>
impl<'c> Unpin for DeallocOperation<'c>
impl<'c> UnwindSafe for DeallocOperation<'c>
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