Added a critical barrier to fftw calls

This commit is contained in:
Guilhem Lavaux 2013-04-08 16:26:31 -04:00
parent 6296f4c8cf
commit 4f1a7f7c12

View File

@ -85,12 +85,15 @@ namespace CosmoTool
boost::shared_ptr<std::complex<T> >((std::complex<T>*)calls::alloc_complex(Nc),
std::ptr_fun(calls::free)),
dims[0], m_dims_hc, dk);
#pragma omp critical
{
m_analysis = calls::plan_dft_r2c(dims.size(), &swapped_dims[0],
realMap->data(), (typename calls::complex_type *)fourierMap->data(),
FFTW_DESTROY_INPUT|FFTW_MEASURE);
m_synthesis = calls::plan_dft_c2r(dims.size(), &swapped_dims[0],
(typename calls::complex_type *)fourierMap->data(), realMap->data(),
FFTW_DESTROY_INPUT|FFTW_MEASURE);
}
}
virtual ~EuclidianFourierTransform()