TwoDimensionalFftExecutor

Trait TwoDimensionalFftExecutor 

Source
pub trait TwoDimensionalFftExecutor<T>: ExecutorWithScratch {
    // Required methods
    fn execute(&self, data: &mut [Complex<T>]) -> Result<(), ZaftError>;
    fn execute_with_scratch(
        &self,
        data: &mut [Complex<T>],
        scratch: &mut [Complex<T>],
    ) -> Result<(), ZaftError>;
    fn width(&self) -> usize;
    fn height(&self) -> usize;
}

Required Methods§

Source

fn execute(&self, data: &mut [Complex<T>]) -> Result<(), ZaftError>

Executes a 2D FFT on source and writes the result into output.

Both source and output must have length equal to width() * height().

§Errors

Returns a ZaftError if the execution fails.

Source

fn execute_with_scratch( &self, data: &mut [Complex<T>], scratch: &mut [Complex<T>], ) -> Result<(), ZaftError>

Executes a 2D FFT using a pre-allocated scratch buffer for temporary storage. This can reduce allocations and improve performance for repeated calls. Both source, output, and scratch must have sufficient length.

§Errors

Returns a ZaftError if the execution fails.

Source

fn width(&self) -> usize

Returns the width (number of columns, X-dimension) of the 2D input data grid.

Source

fn height(&self) -> usize

Returns the height (number of rows, Y-dimension) of the 2D input data grid.

Implementors§