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.
ippsFFTInitAlloc_R_32f(&spec, x, IPP_FFT_DIV_FWD_BY_N, ippAlgHintFast);
#pragmaomp parallel for
for(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,
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