typedef enum _vsip_fft_dir { VSIP_FFT_FWD = -1, VSIP_FFT_INV = +1 } vsip_fft_dir; typedef enum _vsip_alg_hint { VSIP_ALG_TIME = 0, VSIP_ALG_SPACE = 1, VSIP_ALG_NOISE = 2 } vsip_alg_hint; vsip_fft_f* vsip_ccfftip_create_f(vsip_length length, vsip_scalar_f scale, vsip_fft_dir sign, vsip_length ntimes, vsip_alg_hint hint);
These functions create FFT (Fast Fourier Transform) object for a complex-to-complex in-place FFT. The functions initialize a FFT object with the specified length, scale factor, direction, number of times to apply the FFT, and algorithm hint.
The performance for supported FFT sizes is standardized as
. For sizes not directly supported by the FFT kernels a
DFT fallback with a performance of
is standardized.
vsip_length length: The length of the FFT.
vsip_scalar_f scale: The scale factor to apply to the FFT result.
vsip_fft_dir sign: The direction of the FFT.
VSIP_FFT_FWD - Forward
VSIP_FFT_INV - Inverse
vsip_length ntimes: The number of times to apply the FFT.
vsip_alg_hint hint: Algorithm hint for the FFT.
VSIP_ALG_TIME - Optimize for time
VSIP_ALG_SPACE - Optimize for memory usage
VSIP_ALG_NOISE - Optimize for noise
On success, a pointer to the newly created FFT object is returned.
On error, NULL is returned.
vsip_length length = 1024; vsip_scalar_f scale = 1.0; vsip_fft_dir direction = VSIP_FFT_FWD; // Forward FFT vsip_length ntimes = 1; vsip_alg_hint hint = VSIP_ALG_TIME; vsip_fft_f *fft_cc; vsip_fft_f *fft_rc; vsip_fft_f *fft_cr; // Create complex-to-complex FFT object fft_cc = vsip_ccfftip_create_f(length, scale, direction, ntimes, hint); if (fft_cc == NULL) { // Handle error }