pub 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,
            "Invalid kernel len: expecting {}, found {}",
            width * height,
            data.len()
        );
        Kernel {
            data,
            width,
            height,
        }
    }
/// Construct a kernel from a slice and its dimensions. The input slice is
/// in row-major form.
Construct a kernel from a slice and its dimensions. The input slice is
in row-major form.
Construct a kernel from a slice and its dimensions . The input slice is in row - major form .
pub 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,
            "Invalid kernel len: expecting {}, found {}",
            width * height,
            data.len()
        );
        Kernel {
            data,
            width,
            height,
        }
    }
pub fn new ( data : & ' a [ K ] , width : u32 , height : u32 ) -> Kernel < ' a , K > { assert ! ( width 0 height 0 " " ) ; assert ! ( width height data len ( ) as u32 " " width height data len ( ) ) ; Kernel { data , width , height , } }
Construct a kernel from a slice and its dimensions.
Construct a kernel from a slice and its dimensions .
data
&'a [K]
width
u32
height
u32
data
&'a [K]
width
u32
height
u32