A high-performance general-purpose compute library

Fast Fourier Transform. More...

Functions

AFAPI array fft3Norm (const array &in, const double norm_factor, const dim_t odim0=0, const dim_t odim1=0, const dim_t odim2=0)
 C++ Interface for fast fourier transform on three dimensional signals. More...
 
AFAPI void fft3InPlace (array &in, const double norm_factor=1.0)
 C++ Interface for fast fourier transform on three dimensional signals. More...
 
AFAPI array fft3 (const array &in, const dim_t odim0=0, const dim_t odim1=0, const dim_t odim2=0)
 C++ Interface for fast fourier transform on three dimensional signals. More...
 
AFAPI af_err af_fft3 (af_array *out, const af_array in, const double norm_factor, const dim_t odim0, const dim_t odim1, const dim_t odim2)
 C Interface for fast fourier transform on three dimensional signals. More...
 
AFAPI af_err af_fft3_inplace (af_array in, const double norm_factor)
 C Interface for fast fourier transform on three dimensional signals. More...
 

Detailed Description

Fast Fourier Transform.

The Fast Fourier Transform (FFT) is an efficient algorithm to compute the discrete Fourier transform (DFT) of a signal or array. This is most commonly used to convert data in the time (or space) domain to the frequency domain, Then, the inverse FFT (iFFT) is used to return the data to the original domain.

There are numerous algorithms to compute the FFT of an array, and the specifics of the algorithm depend on the target hardware. Most algorithms, however, use a Cooley-Tukey scheme in a divide-and-conquer approach.

Note
There are some convenience functions provided for fft where normalization factor is not required as input paramter. In such cases, the normalization factor is calculated internally based on the input data provided.

Function Documentation

◆ af_fft3()

AFAPI af_err af_fft3 ( af_array out,
const af_array  in,
const double  norm_factor,
const dim_t  odim0,
const dim_t  odim1,
const dim_t  odim2 
)

C Interface for fast fourier transform on three dimensional signals.

Parameters
[out]outis the transformed array
[in]inis the input array
[in]norm_factoris the normalization factor with which the input is scaled after the transformation is applied
[in]odim0is the length of output signals along first dimension - used to either truncate/pad the input
[in]odim1is the length of output signals along second dimension - used to either truncate/pad the input
[in]odim2is the length of output signals along third dimension - used to either truncate/pad the input
Returns
AF_SUCCESS if the fft transform is successful, otherwise an appropriate error code is returned.

◆ af_fft3_inplace()

AFAPI af_err af_fft3_inplace ( af_array  in,
const double  norm_factor 
)

C Interface for fast fourier transform on three dimensional signals.

Parameters
[in,out]inis the input array on entry and the output of 3D forward fourier transform on exit
[in]norm_factoris the normalization factor with which the input is scaled after the transformation is applied
Returns
AF_SUCCESS if the fft transform is successful, otherwise an appropriate error code is returned.
Note
The input must be a complex array

◆ fft3()

AFAPI array fft3 ( const array in,
const dim_t  odim0 = 0,
const dim_t  odim1 = 0,
const dim_t  odim2 = 0 
)

C++ Interface for fast fourier transform on three dimensional signals.

This version of fft function uses a default norm_factor parameter that is calculated internally based on the input signals.

Parameters
[in]inis the input array
[in]odim0is the length of output signals along first dimension - used to either truncate/pad the input
[in]odim1is the length of output signals along second dimension - used to either truncate/pad the input
[in]odim2is the length of output signals along third dimension - used to either truncate/pad the input
Returns
the transformed array

◆ fft3InPlace()

AFAPI void fft3InPlace ( array in,
const double  norm_factor = 1.0 
)

C++ Interface for fast fourier transform on three dimensional signals.

Parameters
[in,out]inis the input array on entry and the output of 3D forward fourier transform on exit
[in]norm_factoris the normalization factor with which the input is scaled after the transformation is applied
Note
The input in must be complex

◆ fft3Norm()

AFAPI array fft3Norm ( const array in,
const double  norm_factor,
const dim_t  odim0 = 0,
const dim_t  odim1 = 0,
const dim_t  odim2 = 0 
)

C++ Interface for fast fourier transform on three dimensional signals.

Parameters
[in]inis the input array and the output of 1D fourier transform on exit
[in]norm_factoris the normalization factor with which the input is scaled after the transformation is applied
[in]odim0is the length of output signals along first dimension - used to either truncate/pad the input
[in]odim1is the length of output signals along second dimension - used to either truncate/pad the input
[in]odim2is the length of output signals along third dimension - used to either truncate/pad the input
Returns
the transformed array