pub struct SharedMemoryDecl {
pub name: String,
pub element_type: String,
pub dimensions: Vec<usize>,
}Expand description
Information about a shared memory declaration for transpilation.
Fields§
§name: StringVariable name.
element_type: StringElement type (CUDA type string).
dimensions: Vec<usize>Dimensions (1D: [size], 2D: [height, width]).
Implementations§
Sourcepub fn array(
name: impl Into<String>,
element_type: impl Into<String>,
size: usize,
) -> Self
pub fn array( name: impl Into<String>, element_type: impl Into<String>, size: usize, ) -> Self
Create a 1D shared memory declaration.
Sourcepub fn tile(
name: impl Into<String>,
element_type: impl Into<String>,
width: usize,
height: usize,
) -> Self
pub fn tile( name: impl Into<String>, element_type: impl Into<String>, width: usize, height: usize, ) -> Self
Create a 2D shared memory declaration.
Sourcepub fn to_cuda_decl(&self) -> String
pub fn to_cuda_decl(&self) -> String
Trait Implementations§
Source§fn clone(&self) -> SharedMemoryDecl
fn clone(&self) -> SharedMemoryDecl
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)