pub struct SharedMemoryConfig {
pub declarations: Vec<SharedMemoryDecl>,
}Expand description
Shared memory configuration for a kernel.
Fields§
§declarations: Vec<SharedMemoryDecl>All shared memory declarations in the kernel.
Implementations§
Sourcepub fn add(&mut self, decl: SharedMemoryDecl)
pub fn add(&mut self, decl: SharedMemoryDecl)
Add a shared memory declaration.
Sourcepub fn add_array(
&mut self,
name: impl Into<String>,
element_type: impl Into<String>,
size: usize,
)
pub fn add_array( &mut self, name: impl Into<String>, element_type: impl Into<String>, size: usize, )
Add a 1D shared array.
Sourcepub fn add_tile(
&mut self,
name: impl Into<String>,
element_type: impl Into<String>,
width: usize,
height: usize,
)
pub fn add_tile( &mut self, name: impl Into<String>, element_type: impl Into<String>, width: usize, height: usize, )
Add a 2D shared tile.
Sourcepub fn generate_declarations(&self, indent: &str) -> String
pub fn generate_declarations(&self, indent: &str) -> String
Generate all CUDA shared memory declarations.
Sourcepub fn total_bytes(&self) -> usize
pub fn total_bytes(&self) -> usize
Calculate total shared memory size in bytes.
Trait Implementations§
Source§fn clone(&self) -> SharedMemoryConfig
fn clone(&self) -> SharedMemoryConfig
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 default() -> SharedMemoryConfig
fn default() -> SharedMemoryConfig
Returns the “default value” for a type. Read more
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