pub const fn new(data: &'a [K], width: u32, height: u32) -> Kernel<'a, K> {
        assert!(width > 0 && height > 0, "width and height must be non-zero");
        assert!(width * height == data.len() as u32);
        Kernel {
            data,
            width,
            height,
        }
    }
Construct a kernel from a slice and its dimensions. The input slice is
in row-major order.

# Panics
1. If `width == 0 || height == 0`.
2. If `width * height != data.len() as u32`.
src/kernel.rs