pub struct GpuBilateralFilter { /* private fields */ }Expand description
Owned, runtime-bound bilateral coefficients prepared and uploaded explicitly. Reuse across image sizes with the same logical channels and options. Preparation rejects nonfinite factors/weights and positive subnormal coefficients. Filtering uses exact integer-word binary64 accumulation and CPU-compatible byte rounding; no native shader float64, image payload copy, host wait or image-sized scratch. Plan control uploads are accounted separately from each image’s transfer receipt.
Implementations§
Source§impl GpuBilateralFilter
impl GpuBilateralFilter
Sourcepub fn prepare(
runtime: &WgpuRuntime,
channels: u32,
options: GpuBilateralOptions,
) -> SpatialResult<Self>
pub fn prepare( runtime: &WgpuRuntime, channels: u32, options: GpuBilateralOptions, ) -> SpatialResult<Self>
Explicitly prepares and uploads bounded image-independent coefficients. No image is read and no image pipeline initializes during preparation.
Sourcepub fn receipt(&self) -> &GpuImageReceipt
pub fn receipt(&self) -> &GpuImageReceipt
Returns physical coefficient upload bytes and preparation stages.
Sourcepub fn filter(
&self,
runtime: &WgpuRuntime,
source: &GpuImage,
) -> SpatialResult<GpuImage>
pub fn filter( &self, runtime: &WgpuRuntime, source: &GpuImage, ) -> SpatialResult<GpuImage>
Submits one device pass and returns an independently owned image. Image channels/runtime/limits reject before output or lazy pipeline allocation. The image receipt inherits its source; the reusable plan receipt stays separate.