pub struct TransformKernel { /* private fields */ }Expand description
Transform kernel for frequency domain and geometric operations
Implementations§
Source§impl TransformKernel
impl TransformKernel
Sourcepub fn new(transform_type: TransformType) -> Self
pub fn new(transform_type: TransformType) -> Self
Create a new transform kernel
Sourcepub fn execute(
&self,
device: &GpuDevice,
input: &[f32],
output: &mut [f32],
width: u32,
height: u32,
) -> Result<()>
pub fn execute( &self, device: &GpuDevice, input: &[f32], output: &mut [f32], width: u32, height: u32, ) -> Result<()>
Sourcepub fn transform_type(&self) -> TransformType
pub fn transform_type(&self) -> TransformType
Get the transform type
Sourcepub fn is_frequency_domain(&self) -> bool
pub fn is_frequency_domain(&self) -> bool
Check if this is a frequency domain transform
Sourcepub fn is_geometric(&self) -> bool
pub fn is_geometric(&self) -> bool
Check if this is a geometric transform
Sourcepub fn estimate_flops(
width: u32,
height: u32,
transform_type: TransformType,
) -> u64
pub fn estimate_flops( width: u32, height: u32, transform_type: TransformType, ) -> u64
Estimate FLOPS for the transform operation
Auto Trait Implementations§
impl Freeze for TransformKernel
impl RefUnwindSafe for TransformKernel
impl Send for TransformKernel
impl Sync for TransformKernel
impl Unpin for TransformKernel
impl UnsafeUnpin for TransformKernel
impl UnwindSafe for TransformKernel
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> 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