aboutsummaryrefslogtreecommitdiff
path: root/Source/Laser/LaserParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Remi Lehe <remi.lehe@normalesup.org> 2019-06-24 15:32:08 -0700
committerGravatar Remi Lehe <remi.lehe@normalesup.org> 2019-06-24 15:32:08 -0700
commite1189f12a53106df5cc096501bedf80d835be5c3 (patch)
tree36500e519d45e9d6ca2e7b419a84691cbb9ad486 /Source/Laser/LaserParticleContainer.cpp
parentdc92a96cbecb27bcae8abc29a0610a43dce53040 (diff)
parentaf336d881e641b43df054d2701e6e0095fe48d8c (diff)
downloadWarpX-e1189f12a53106df5cc096501bedf80d835be5c3.tar.gz
WarpX-e1189f12a53106df5cc096501bedf80d835be5c3.tar.zst
WarpX-e1189f12a53106df5cc096501bedf80d835be5c3.zip
Merge branch 'dev' into fft_from_local_boxes
Diffstat (limited to 'Source/Laser/LaserParticleContainer.cpp')
-rw-r--r--Source/Laser/LaserParticleContainer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Laser/LaserParticleContainer.cpp b/Source/Laser/LaserParticleContainer.cpp
index 2f964b6f3..de410b31f 100644
--- a/Source/Laser/LaserParticleContainer.cpp
+++ b/Source/Laser/LaserParticleContainer.cpp
@@ -518,10 +518,11 @@ LaserParticleContainer::Evolve (int lev,
if (cost) {
const Box& tbx = pti.tilebox();
wt = (amrex::second() - wt) / tbx.d_numPts();
- FArrayBox* costfab = cost->fabPtr(pti);
- AMREX_LAUNCH_HOST_DEVICE_LAMBDA ( tbx, work_box,
+ Array4<Real> const& costarr = cost->array(pti);
+ amrex::ParallelFor(tbx,
+ [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
{
- costfab->plus(wt, work_box);
+ costarr(i,j,k) += wt;
});
}
}