Community
cancel
Showing results for 
Search instead for 
Did you mean: 
rakesh
Beginner
45 Views

issue while performing fast fourier transform(FFT)

I'm using dft descriptor to perform fft of real input. i am giving real array of some size.

i'm getting half of the size of fft output.

 

0 Kudos
2 Replies
Ying_H_Intel
Employee
45 Views

Hi rakesh, no sure if it is still problem for you. I saw you have tried some example like complex_1d_double_ex1.c. which is do compler 1D FFT. I guess, you can try the 1D Real example too. for example basic_dp_real_dft_1d.c or real_1d_cce_double_ex2.c in older MKL version. As real FFT input will have conjugate-even complex output, there are all packed to store the half of the output. for example CCE, CCS, Pack, Perm etc. for example, the below (itbasic_dp_real_dft_1d.c) is CCE (same as CCS) format. (Re, Im) whic stores the values of the first half of the output complex conjugate-even signal resulting from the forward FFT. The input is N double data. and output is N/2+1 complex data. You may refer to the details in MKL Reference manual. in section : DFTI_PACKED_FORMAT. And let us know if any problem. Best Regards, Ying printf("Create DFTI descriptor\n"); status = DftiCreateDescriptor(&hand, DFTI_DOUBLE, DFTI_REAL, 1, (MKL_LONG)N); if (0 != status) goto failed; printf("Set configuration: out-of-place\n"); status = DftiSetValue(hand, DFTI_PLACEMENT, DFTI_NOT_INPLACE); if (0 != status) goto failed; printf("Set configuration: CCE storage\n"); status = DftiSetValue(hand, DFTI_CONJUGATE_EVEN_STORAGE, DFTI_COMPLEX_COMPLEX); if (0 != status) goto failed; /* This is not needed for DFTI_COMPLEX_COMPLEX storage */ /* status = DftiSetValue(hand, DFTI_PACKED_FORMAT, DFTI_CCE_FORMAT); */ /* if (0 != status) goto failed; */ printf("Commit the descriptor\n"); status = DftiCommitDescriptor(hand); if (0 != status) goto failed; printf("Allocate data arrays\n"); x_real = (double*)malloc(N*sizeof(double)); x_cmplx = (MKL_Complex16*)malloc((N/2+1)*sizeof(MKL_Complex16));
rakesh
Beginner
45 Views

thanks Ying
Reply