MCPcopy Index your code
hub / github.com/arrayfire/arrayfire-rust / fft

Function fft

src/signal/mod.rs:504–515  ·  view source on GitHub ↗

Fast fourier transform for 1d signals # Parameters - `input` is the input Array - `norm_factor` is the normalization factor with which the input is scaled before the transformation is applied - `odim0` is the length of output signals - used for either truncating or padding the input signals # Return Values Transformed Array

(input: &Array<T>, norm_factor: f64, odim0: i64)

Source from the content-addressed store, hash-verified

502///
503/// Transformed Array
504pub fn fft<T>(input: &Array<T>, norm_factor: f64, odim0: i64) -> Array<T::ComplexOutType>
505where
506 T: HasAfEnum + FloatingPoint,
507 <T as HasAfEnum>::ComplexOutType: HasAfEnum,
508{
509 unsafe {
510 let mut temp: af_array = std::ptr::null_mut();
511 let err_val = af_fft(&mut temp as *mut af_array, input.get(), norm_factor, odim0);
512 HANDLE_ERROR(AfError::from(err_val));
513 temp.into()
514 }
515}
516
517/// Fast fourier transform for 2d signals
518///

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Calls 3

HANDLE_ERRORFunction · 0.85
intoMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected