- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Below is a block of codes for using 2D FFT from MKL:
MKL_LONG flen1[2]={nffty,nfftx};
MKL_LONG status;
DFTI_DESCRIPTOR_HANDLE hand1;
status=DftiCreateDescriptor(&hand1,DFTI_SINGLE,DFTI_COMPLEX,2,flen1);
status=DftiCommitDescriptor(hand1);
status=DftiComputeForward(hand1,tmp);
tmp is a 2D complex array.
problems:
tmp in DftiComputeForward: if tmp is given by tmp[ ][ ] the compiling can go through and the block codes works well. If tmp is given by **tmp and alloc memory to it, the compiling can go through but executing is crushed at DftiComputeForward.
So, the problem is in/out parameter in DftiComputeForward has to be hard-coding 2D array and cannot be pointer type?
Any answer is welcomed. Thank you very much.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are correct, the i/o pointers should point directly to the data, not to the pointers to the rows/columns. See also what FFTW3 documentation says on this.
Thanks
Dima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, Dima, for your reply.
Same block code with different problem as below:
complex tmp[nffty][nfftx],swap[nffty][nfftx];
MKL_LONG flen1[2];
flen1[0]=nffty;
flen1[1]=nfftx;
MKL_LONG status;
DFTI_DESCRIPTOR_HANDLE hand1;
status=DftiCreateDescriptor(&hand1,DFTI_SINGLE,DFTI_COMPLEX,2,flen1);
status=DftiCommitDescriptor(hand1);
status=DftiComputeForward(hand1,tmp);
Problem: If I define nffty=1024 and nfftx=1024, the executing of program is crushed at "complex tmp[nffty][nfftx],swap[nffty][nfftx];"
Do you think there is size limitation for 2D complex array of tmp and swap?
Thank you very much in advanced.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, 16 megabytes exceed the typical size of thread stack.
Try allocating the arrays at run time or extend the size of stack using an appropriate compiler switch.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page