From 472802158ee83790ec481ce392cdc2234fbfb0ab Mon Sep 17 00:00:00 2001 From: Josh Cardenzana Date: Thu, 29 Jun 2017 12:30:46 +0200 Subject: [PATCH] Add parallelization to ctbin (#1970) --- src/ctbin/ctbin.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ctbin/ctbin.cpp b/src/ctbin/ctbin.cpp index b20f936..e396073 100644 --- a/src/ctbin/ctbin.cpp +++ b/src/ctbin/ctbin.cpp @@ -236,8 +236,11 @@ void ctbin::run(void) log_header1(TERSE, gammalib::number("Bin observation", m_obs.size())); // Loop over all unbinned CTA observations in the container - for (GCTAObservation* obs = first_unbinned_observation(); obs != NULL; - obs = next_unbinned_observation()) { +// for (GCTAObservation* obs = first_unbinned_observation(); obs != NULL; +// obs = next_unbinned_observation()) { + #pragma omp parallel for + for (int o=0; o(m_obs[o]); // Fill the cube fill_cube(obs); @@ -555,6 +558,7 @@ void ctbin::fill_cube(GCTAObservation* obs) m_livetime += obs->livetime(); // Log filling results + log_header3(TERSE, get_obs_header(obs)); log_value(NORMAL, "Events in list", obs->events()->size()); log_value(NORMAL, "Events in cube", num_in_map); log_value(NORMAL, "Events outside RoI", num_outside_roi); -- libgit2 0.21.4