pub struct StencilConfig {
pub id: String,
pub grid: Grid,
pub tile_size: (usize, usize),
pub halo: usize,
}Expand description
Configuration for a stencil kernel.
Fields§
§id: StringKernel identifier.
grid: GridGrid dimensionality.
tile_size: (usize, usize)Tile/block size (width, height) for 2D, or (x, y, z) for 3D.
halo: usizeHalo/ghost cell width (stencil radius).
Implementations§
Source§impl StencilConfig
impl StencilConfig
Sourcepub fn with_tile_size(self, width: usize, height: usize) -> Self
pub fn with_tile_size(self, width: usize, height: usize) -> Self
Set the tile size.
Sourcepub fn buffer_width(&self) -> usize
pub fn buffer_width(&self) -> usize
Get the buffer width including halos.
Sourcepub fn buffer_height(&self) -> usize
pub fn buffer_height(&self) -> usize
Get the buffer height including halos (for 2D+).
Sourcepub fn generate_preamble(&self) -> String
pub fn generate_preamble(&self) -> String
Generate the CUDA kernel preamble with thread index calculations.
Sourcepub fn generate_launch_bounds(&self) -> String
pub fn generate_launch_bounds(&self) -> String
Generate launch bounds for the kernel.
Trait Implementations§
Source§impl Clone for StencilConfig
impl Clone for StencilConfig
Source§fn clone(&self) -> StencilConfig
fn clone(&self) -> StencilConfig
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 moreSource§impl Debug for StencilConfig
impl Debug for StencilConfig
Auto Trait Implementations§
impl Freeze for StencilConfig
impl RefUnwindSafe for StencilConfig
impl Send for StencilConfig
impl Sync for StencilConfig
impl Unpin for StencilConfig
impl UnwindSafe for StencilConfig
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)