- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
I would like to combine OpenMP and the FFT code and had a quick question. I havea for loop that is executing an FFT routine multiple times, but when it gets to the actual FFT routine, I have only allocated 1 memory space (see code) which all threads need to share, which is non-ideal.
IppsFFTSpec_R_32f* spec;
ippsFFTInitAlloc_R_32f(&spec, x, IPP_FFT_DIV_FWD_BY_N, ippAlgHintFast);
omp_set_num_threads(2);
#pragma
omp parallel forfor(int counter = 0; counter < 10000; counter++)
{
//I would like to allocate and copy the spec table so that the loops are independant
ippsFFTFwd_RToPerm_32f((float*)ptrFFTVector, (float*)ptrFFTVector, spec, 0);
}
The question is, how can I allocate and copy the spec space into another, loop independant local variable. In the IPP, there is a command to initialize an FFT table, a command to allocate memoryand initialize a table, but no command to allocate and copy a table. How can I do this?
Thanks in advance,
Austin
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Austin,
our experts said that you not necessary need to copy FFT spec for each thread. By IPP conventions, Spec is read-only data. So all threads can share the same Spec
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How about speed? Will it slow down calculations? Maybe it is more comfortable to have separate copy of FFT table for each thread? Even if I am using architecture with shared memory - Quad Core.
Thanks

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page