pub struct SimdConvolution<T> { /* private fields */ }Expand description
SIMD-accelerated convolution operations for image processing
Provides fast 2D convolution with configurable kernels using SIMD instructions for significant performance improvements in image transformations.
Implementations§
Source§impl<T> SimdConvolution<T>
impl<T> SimdConvolution<T>
Sourcepub fn new(kernel: Vec<T>, kernel_size: usize) -> Result<Self>
pub fn new(kernel: Vec<T>, kernel_size: usize) -> Result<Self>
Create a new SIMD-accelerated convolution operation
§Arguments
kernel- Convolution kernel weights (must be square)kernel_size- Size of the square kernel (e.g., 3 for 3x3)
Sourcepub fn convolve_2d(
&self,
input: &Tensor<T>,
output: &mut Tensor<T>,
) -> Result<()>
pub fn convolve_2d( &self, input: &Tensor<T>, output: &mut Tensor<T>, ) -> Result<()>
Apply convolution to 2D image data
§Arguments
input- Input image data as 2D tensoroutput- Pre-allocated output tensor
Sourcepub fn is_simd_enabled(&self) -> bool
pub fn is_simd_enabled(&self) -> bool
Get SIMD capability status
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for SimdConvolution<T>
impl<T> RefUnwindSafe for SimdConvolution<T>where
T: RefUnwindSafe,
impl<T> Send for SimdConvolution<T>where
T: Send,
impl<T> Sync for SimdConvolution<T>where
T: Sync,
impl<T> Unpin for SimdConvolution<T>where
T: Unpin,
impl<T> UnsafeUnpin for SimdConvolution<T>
impl<T> UnwindSafe for SimdConvolution<T>where
T: UnwindSafe,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more