#[repr(C)]pub struct ConvolutionParams {
pub width: u32,
pub height: u32,
pub kernel_width: u32,
pub kernel_height: u32,
}Expand description
Convolution parameters.
Fields§
§width: u32Image width.
height: u32Image height.
kernel_width: u32Kernel width (must be odd).
kernel_height: u32Kernel height (must be odd).
Implementations§
Source§impl ConvolutionParams
impl ConvolutionParams
Sourcepub fn new(
width: u32,
height: u32,
kernel_width: u32,
kernel_height: u32,
) -> GpuResult<Self>
pub fn new( width: u32, height: u32, kernel_width: u32, kernel_height: u32, ) -> GpuResult<Self>
Create new convolution parameters.
Sourcepub fn square(width: u32, height: u32, kernel_size: u32) -> GpuResult<Self>
pub fn square(width: u32, height: u32, kernel_size: u32) -> GpuResult<Self>
Create parameters for square kernel.
Sourcepub fn kernel_center(&self) -> (u32, u32)
pub fn kernel_center(&self) -> (u32, u32)
Get kernel center offset.
Trait Implementations§
Source§impl Clone for ConvolutionParams
impl Clone for ConvolutionParams
Source§fn clone(&self) -> ConvolutionParams
fn clone(&self) -> ConvolutionParams
Returns a duplicate of the value. Read more
1.0.0 · 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 ConvolutionParams
impl Debug for ConvolutionParams
impl Copy for ConvolutionParams
impl Pod for ConvolutionParams
Auto Trait Implementations§
impl Freeze for ConvolutionParams
impl RefUnwindSafe for ConvolutionParams
impl Send for ConvolutionParams
impl Sync for ConvolutionParams
impl Unpin for ConvolutionParams
impl UnsafeUnpin for ConvolutionParams
impl UnwindSafe for ConvolutionParams
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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.