aboutsummaryrefslogtreecommitdiff
path: root/Source/Laser/LaserParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar MaxThevenet <mthevenet@lbl.gov> 2019-06-19 14:13:35 -0700
committerGravatar GitHub <noreply@github.com> 2019-06-19 14:13:35 -0700
commitd8c1a9f471ea517a66b52700a9e9332bbfb8762f (patch)
tree6e0bd685cb860fc3a3347439bbc5dd2faaac3e80 /Source/Laser/LaserParticleContainer.cpp
parenta51731f01c5f7e0cd9f218ac3cad468ef181335c (diff)
parent19fa3eaaf87ce778f72b5559e94584615313a051 (diff)
downloadWarpX-d8c1a9f471ea517a66b52700a9e9332bbfb8762f.tar.gz
WarpX-d8c1a9f471ea517a66b52700a9e9332bbfb8762f.tar.zst
WarpX-d8c1a9f471ea517a66b52700a9e9332bbfb8762f.zip
Merge pull request #182 from WeiqunZhang/unmanagedfab
Turn off FAB_IS_MANAGED
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;
});
}
}