Fixes to compile on OSX
This commit is contained in:
parent
170e7b7020
commit
bf0874bbd3
3 changed files with 21 additions and 4 deletions
|
@ -1,4 +1,6 @@
|
|||
#ifdef _OPENMP
|
||||
#include <omp.h>
|
||||
#endif
|
||||
#include <iostream>
|
||||
#include <boost/format.hpp>
|
||||
#include <boost/multi_array.hpp>
|
||||
|
@ -171,7 +173,11 @@ void CosmoTool_compute_bispectrum(
|
|||
{
|
||||
// First remap to multi_array for easy access
|
||||
size_t kNz = Nz/2+1;
|
||||
#ifdef _OPENMP
|
||||
int Ntasks = omp_get_max_threads();
|
||||
#else
|
||||
int Ntasks = 1;
|
||||
#endif
|
||||
boost::multi_array_ref<std::complex<double>, 3> a_delta(reinterpret_cast<std::complex<double>*>(delta_hat), boost::extents[Nx][Ny][kNz]);
|
||||
boost::multi_array_ref<size_t, 3> a_Nt(Ntriangles, boost::extents[Nk][Nk][Nk]);
|
||||
boost::multi_array_ref<std::complex<double>, 3> a_B(reinterpret_cast<std::complex<double>*>(B), boost::extents[Nk][Nk][Nk]);
|
||||
|
@ -190,6 +196,7 @@ void CosmoTool_compute_bispectrum(
|
|||
delta_mirror[n1.i1][n1.i2][n1.i3] = std::conj(delta_mirror[n2.i1][n2.i2][n2.i3]);
|
||||
}
|
||||
|
||||
#ifdef _OPENMP
|
||||
// First loop over m1
|
||||
#pragma omp parallel
|
||||
{
|
||||
|
@ -236,6 +243,9 @@ void CosmoTool_compute_bispectrum(
|
|||
a_B_p[q] += b_B_p[q];
|
||||
}
|
||||
}
|
||||
#else
|
||||
#warning Serial version not implemented
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue