aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2017-02-07 13:15:52 +0800
committerAaron LI <aaronly.me@outlook.com>2017-02-07 13:15:52 +0800
commit574ad179eb932503857137dce47abc1117cb4049 (patch)
treec10b3d74dc42eb5c0c0a939f80cc6732474ad0b5
parent5404b8b722bbea792ff605c669bf369ec9925598 (diff)
downloadchandra-acis-analysis-574ad179eb932503857137dce47abc1117cb4049.tar.bz2
Handle #pragma omp warning when not give -fopenmp
-rw-r--r--mass_profile/nfw_ne.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/mass_profile/nfw_ne.hpp b/mass_profile/nfw_ne.hpp
index 8f23820..1eeb17c 100644
--- a/mass_profile/nfw_ne.hpp
+++ b/mass_profile/nfw_ne.hpp
@@ -157,7 +157,9 @@ namespace opt_utilities
std::vector<T> yvec(r.size());
const T kT_erg0=pTfunc->eval((r.at(0)+r.at(1))/2)*k;
//calculate the integration
+#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic)
+#endif
for(size_t i=0;i<r.size();++i)
{
T r_cm=r[i]*cm_per_pixel;
@@ -172,7 +174,9 @@ namespace opt_utilities
}
std::vector<T> ydxvec(r.size()-1);
+#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic)
+#endif
for(size_t i=1;i<r.size();++i)
{
T dr=r[i]-r[i-1];
@@ -182,7 +186,9 @@ namespace opt_utilities
std::partial_sum(ydxvec.begin(),ydxvec.end(),ydxvec.begin());
//construct the result
std::vector<T> result(r.size()-1);
+#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic)
+#endif
for(size_t i=0;i<r.size()-1;++i)
{
T y=-ydxvec.at(i);