pub struct TiledConfig {
pub tile_width: usize,
pub tile_height: usize,
pub overlap_pixels: usize,
pub vram_safety_margin: f64,
}Expand description
Configuration for tiled raster processing.
The default tile size (512 × 512) fits comfortably within typical VRAM
budgets for f32 rasters. Increase overlap_pixels when a kernel requires
neighbouring pixel context (e.g. convolution with radius r needs
overlap_pixels = r).
Fields§
§tile_width: usizeTile width in pixels. Default: 512.
tile_height: usizeTile height in pixels. Default: 512.
overlap_pixels: usizeOverlap in pixels on every active edge (halo for kernels needing neighbours). Default: 0.
vram_safety_margin: f64Safety margin: fraction of the VRAM budget to keep free.
Must be in [0.0, 1.0). Default: 0.1 (10 %).
Implementations§
Source§impl TiledConfig
impl TiledConfig
Sourcepub fn with_tile_size(self, w: usize, h: usize) -> Self
pub fn with_tile_size(self, w: usize, h: usize) -> Self
Set tile width and height.
Sourcepub fn with_overlap(self, pixels: usize) -> Self
pub fn with_overlap(self, pixels: usize) -> Self
Set overlap (halo) width in pixels on each edge.
Sourcepub fn with_vram_safety_margin(self, margin: f64) -> Self
pub fn with_vram_safety_margin(self, margin: f64) -> Self
Set the VRAM safety margin fraction. Clamped to [0.0, 0.99].
Trait Implementations§
Source§impl Clone for TiledConfig
impl Clone for TiledConfig
Source§fn clone(&self) -> TiledConfig
fn clone(&self) -> TiledConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TiledConfig
impl Debug for TiledConfig
Auto Trait Implementations§
impl Freeze for TiledConfig
impl RefUnwindSafe for TiledConfig
impl Send for TiledConfig
impl Sync for TiledConfig
impl Unpin for TiledConfig
impl UnsafeUnpin for TiledConfig
impl UnwindSafe for TiledConfig
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