Fast Fourier Transform. More...

Functions

AFAPI array fftNorm (const array &in, const double norm_factor, const dim_t odim0=0)
 C++ Interface for fast fourier transform on one dimensional data. More...
 
AFAPI array fft (const array &in, const dim_t odim0=0)
 C++ Interface for fast fourier transform on one dimensional data. More...
 
AFAPI array dft (const array &in, const double norm_factor, const dim4 outDims)
 C++ Interface for fast fourier transform on any(1d, 2d, 3d) dimensional data. More...
 
AFAPI array dft (const array &in, const dim4 outDims)
 C++ Interface for fast fourier transform on any(1d, 2d, 3d) dimensional data. More...
 
AFAPI array dft (const array &in)
 C++ Interface for fast fourier transform on any(1d, 2d, 3d) dimensional data. More...
 
AFAPI array idft (const array &in, const double norm_factor, const dim4 outDims)
 C++ Interface for inverse fast fourier transform on any(1d, 2d, 3d) dimensional data. More...
 
AFAPI array idft (const array &in, const dim4 outDims)
 C++ Interface for inverse fast fourier transform on any(1d, 2d, 3d) dimensional data. More...
 
AFAPI array idft (const array &in)
 C++ Interface for inverse fast fourier transform on any(1d, 2d, 3d) dimensional data. More...
 
AFAPI af_err af_fft (af_array *out, const af_array in, const double norm_factor, const dim_t odim0)
 C Interface for fast fourier transform on one dimensional data. 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

AFAPI af_err af_fft ( af_array out,
const af_array  in,
const double  norm_factor,
const dim_t  odim0 
)

C Interface for fast fourier transform on one dimensional data.

Parameters
[out]outis the transformed array
[in]inis the input array
[in]norm_factoris the normalization factor with which the input is scaled before the transformation is applied
[in]odim0is the length of output data - used to either truncate or pad the input data
Returns
AF_SUCCESS if the fft transform is successful, otherwise an appropriate error code is returned.
AFAPI array af::dft ( const array in,
const double  norm_factor,
const dim4  outDims 
)

C++ Interface for fast fourier transform on any(1d, 2d, 3d) dimensional data.

Parameters
[in]inis the input array
[in]norm_factoris the normalization factor with which the input is scaled before the transformation is applied
[in]outDimsis an object of dim4 that has the output array dimensions - used to either truncate or pad the input data
Returns
the transformed array
AFAPI array af::dft ( const array in,
const dim4  outDims 
)

C++ Interface for fast fourier transform on any(1d, 2d, 3d) dimensional data.

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

Parameters
[in]inis the input array
[in]outDimsis an object of dim4 that has the output array dimensions - used to either truncate or pad the input data
Returns
the transformed array
AFAPI array af::dft ( const array in)

C++ Interface for fast fourier transform on any(1d, 2d, 3d) dimensional data.

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

Parameters
[in]inis the input array
Returns
the transformed array
AFAPI array af::fft ( const array in,
const dim_t  odim0 = 0 
)

C++ Interface for fast fourier transform on one dimensional data.

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

Parameters
[in]inis the input array
[in]odim0is the length of output data - used to either truncate or pad the input data
Returns
the transformed array
Examples:
helloworld.cpp.
AFAPI array af::fftNorm ( const array in,
const double  norm_factor,
const dim_t  odim0 = 0 
)

C++ Interface for fast fourier transform on one dimensional data.

Parameters
[in]inis the input array
[in]norm_factoris the normalization factor with which the input is scaled before the transformation is applied
[in]odim0is the length of output data - used to either truncate or pad the input data
Returns
the transformed array
AFAPI array af::idft ( const array in,
const double  norm_factor,
const dim4  outDims 
)

C++ Interface for inverse fast fourier transform on any(1d, 2d, 3d) dimensional data.

Parameters
[in]inis the input array
[in]norm_factoris the normalization factor with which the input is scaled before the transformation is applied
[in]outDimsis an object of dim4 that has the output array dimensions - used to either truncate or pad the input data
Returns
the transformed array
AFAPI array af::idft ( const array in,
const dim4  outDims 
)

C++ Interface for inverse fast fourier transform on any(1d, 2d, 3d) dimensional data.

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

Parameters
[in]inis the input array
[in]outDimsis an object of dim4 that has the output array dimensions - used to either truncate or pad the input data
Returns
the transformed array
AFAPI array af::idft ( const array in)

C++ Interface for inverse fast fourier transform on any(1d, 2d, 3d) dimensional data.

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

Parameters
[in]inis the input array
Returns
the transformed array