Skip to main content

gpu_convolve_2d

Function gpu_convolve_2d 

Source
pub fn gpu_convolve_2d(
    ctx: &GpuVisionContext,
    image: &ArrayView2<'_, f32>,
    kernel: &ArrayView2<'_, f32>,
) -> Result<Array2<f32>>
Expand description

GPU-accelerated image convolution

Performs 2D convolution on GPU for maximum performance.

§Arguments

  • ctx - GPU vision context
  • image - Input image
  • kernel - Convolution kernel

§Returns

  • Convolved image

§Performance

  • 10-50x faster than CPU for large images
  • Optimal for kernels larger than 5x5
  • Batch processing support for multiple images