/* C99 example */ #include "mkl_dfti.h" #include "stdio.h" #include #include #include int main() { float x[1][1][3]={(1,2),(4,7),(6,8)}; float _Complex y[1][1][2]; /* 10 = 5/2 + 1 */ DFTI_DESCRIPTOR_HANDLE my_desc_handle; MKL_LONG status, l[3]; MKL_LONG strides_out[4]; //...put input data into x[j][k][s] 0<=j<=31, 0<=k<=99, 0<=s<=18 l[0] = 1; l[1] = 1; l[2] = 3; strides_out[0] = 0; strides_out[1] = 1000; strides_out[2] = 10; strides_out[3] = 1; status = DftiCreateDescriptor( &my_desc_handle, DFTI_SINGLE, DFTI_REAL, 3, l ); status = DftiSetValue(my_desc_handle, DFTI_CONJUGATE_EVEN_STORAGE, DFTI_COMPLEX_COMPLEX); status = DftiSetValue( my_desc_handle, DFTI_PLACEMENT, DFTI_NOT_INPLACE ); status = DftiSetValue(my_desc_handle, DFTI_OUTPUT_STRIDES, strides_out); status = DftiCommitDescriptor(my_desc_handle); status = DftiComputeForward(my_desc_handle, x, y); status = DftiFreeDescriptor(&my_desc_handle); /* result is the complex value z(j,k,s) 0<=j<=31; 0<=k<=99, 0<=s<=9 and is stored in complex matrix y in CCE format. */ for(int i=0;i<1;i++) { for(int j=0;j<1;j++) { for(int k=0;k<2;k++) { printf("%f+%f\t",creal(y[i][j][k]),cimag(y[i][j][k])); } } } return 0; }