From 2f559831a6e5b81050455095c6146b3f23103cc0 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 28 Aug 2024 08:56:32 -0700 Subject: [PATCH] Inline Comments: OpenMP For follow-up PRs on how to add OpenMP support. --- src/particles/wakefields/ChargeBinning.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/particles/wakefields/ChargeBinning.cpp b/src/particles/wakefields/ChargeBinning.cpp index 60b1a790d..5258ea798 100644 --- a/src/particles/wakefields/ChargeBinning.cpp +++ b/src/particles/wakefields/ChargeBinning.cpp @@ -30,7 +30,7 @@ namespace impactx::particles::wakefields int const nlevs = myspc.finestLevel(); for (int lev = 0; lev <= nlevs; ++lev) { - // OpenMP parallelization: + // TODO OpenMP parallelization: // To enable, charge_distribution needs to be copied and summed between threads. { // Loop over particles at the current grid level @@ -120,8 +120,6 @@ namespace impactx::particles::wakefields { using namespace amrex::literals; - - int const num_bins = mean_x.size(); amrex::Real* dptr_mean_x = mean_x.data(); amrex::Real* dptr_mean_y = mean_y.data(); @@ -138,9 +136,8 @@ namespace impactx::particles::wakefields int const nlevs = myspc.finestLevel(); for (int lev = 0; lev <= nlevs; ++lev) { - //ifdef AMREX_USE_OMP - //pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) - //endif + // TODO OpenMP parallelization: + // To enable, sum_x_ptr, sum_x_ptr, sum_y_ptr need to be copied and summed between threads. { for (impactx::ParIterSoA pti(myspc, lev); pti.isValid(); ++pti) {