pub struct DynamicSharedMemoryOperation<'c> { /* private fields */ }Expand description
A dynamic_shared_memory operation. Get the memref for dynamic shared memory.
This operation provides a memref pointer to the start of dynamic shared
memory, often referred to as workgroup memory. It’s important to note that
this dynamic shared memory needs to be allocated at kernel launch. One can
conveniently utilize the dynamic_shared_memory_size parameter of
gpu.launch for this purpose.
Examples:
%0 = gpu.dynamic.shared.memory : memref<?xi8, #gpu.address_space<workgroup>>
%1 = memref.view %0[%c8192][] : memref<?xi8, #gpu.address_space<workgroup>>
to memref<32x64xf32, #gpu.address_space<workgroup>>
%2 = memref.view %0[%c16384][] : memref<?xi8, #gpu.address_space<workgroup>>
to memref<32x64xf32, #gpu.address_space<workgroup>>Implementations§
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>,
) -> DynamicSharedMemoryOperationBuilder<'c, Unset>
pub fn builder( context: &'c Context, location: Location<'c>, ) -> DynamicSharedMemoryOperationBuilder<'c, Unset>
Creates a builder.
pub fn result_memref(&self) -> Result<OperationResult<'c, '_>, Error>
Trait Implementations§
Source§fn clone(&self) -> DynamicSharedMemoryOperation<'c>
fn clone(&self) -> DynamicSharedMemoryOperation<'c>
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 moreSource§fn from(op: DynamicSharedMemoryOperation<'b>) -> Self
fn from(op: DynamicSharedMemoryOperation<'b>) -> Self
Converts to this type from the input type.
Source§fn from(operation: DynamicSharedMemoryOperation<'c>) -> Self
fn from(operation: DynamicSharedMemoryOperation<'c>) -> Self
Converts to this type from the input type.
Source§fn eq(&self, other: &DynamicSharedMemoryOperation<'c>) -> bool
fn eq(&self, other: &DynamicSharedMemoryOperation<'c>) -> bool
Tests for
self and other values to be equal, and is used by ==.Auto Trait Implementations§
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