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_ccfftop_create_f(vsip_length length, vsip_scalar_f scale, vsip_fft_dir sign, vsip_length ntimes, vsip_alg_hint hint); vsip_fft_f* vsip_rcfftop_create_f(vsip_length length, vsip_scalar_f scale, vsip_fft_dir sign, vsip_length ntimes, vsip_alg_hint hint); vsip_fft_f* vsip_crfftop_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) objects for different types of FFT operations:
vsip_ccfftop_create_p : Creates an FFT object for complex-to-complex out-of-place FFT.
vsip_rcfftop_create_p : Creates an FFT object for real-to-complex out-of-place FFT.
vsip_crfftop_create_p : Creates an FFT object for complex-to-real out-of-place FFT.
Each function initializes the 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_ccfftop_create_f(length, scale, direction, ntimes, hint); if (fft_cc == NULL) { // Handle error }