Added a critical barrier to fftw calls
This commit is contained in:
parent
6296f4c8cf
commit
4f1a7f7c12
@ -85,6 +85,8 @@ namespace CosmoTool
|
|||||||
boost::shared_ptr<std::complex<T> >((std::complex<T>*)calls::alloc_complex(Nc),
|
boost::shared_ptr<std::complex<T> >((std::complex<T>*)calls::alloc_complex(Nc),
|
||||||
std::ptr_fun(calls::free)),
|
std::ptr_fun(calls::free)),
|
||||||
dims[0], m_dims_hc, dk);
|
dims[0], m_dims_hc, dk);
|
||||||
|
#pragma omp critical
|
||||||
|
{
|
||||||
m_analysis = calls::plan_dft_r2c(dims.size(), &swapped_dims[0],
|
m_analysis = calls::plan_dft_r2c(dims.size(), &swapped_dims[0],
|
||||||
realMap->data(), (typename calls::complex_type *)fourierMap->data(),
|
realMap->data(), (typename calls::complex_type *)fourierMap->data(),
|
||||||
FFTW_DESTROY_INPUT|FFTW_MEASURE);
|
FFTW_DESTROY_INPUT|FFTW_MEASURE);
|
||||||
@ -92,6 +94,7 @@ namespace CosmoTool
|
|||||||
(typename calls::complex_type *)fourierMap->data(), realMap->data(),
|
(typename calls::complex_type *)fourierMap->data(), realMap->data(),
|
||||||
FFTW_DESTROY_INPUT|FFTW_MEASURE);
|
FFTW_DESTROY_INPUT|FFTW_MEASURE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
virtual ~EuclidianFourierTransform()
|
virtual ~EuclidianFourierTransform()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user