Skip to content

Commit

Permalink
Inline Comments: OpenMP
Browse files Browse the repository at this point in the history
For follow-up PRs on how to add OpenMP support.
  • Loading branch information
ax3l committed Aug 28, 2024
1 parent ea1cacc commit 2f55983
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/particles/wakefields/ChargeBinning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand All @@ -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)
{
Expand Down

0 comments on commit 2f55983

Please sign in to comment.