Added a critical barrier to fftw calls
This commit is contained in:
parent
6296f4c8cf
commit
4f1a7f7c12
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user