diff options
author | 2019-07-09 18:06:24 -0700 | |
---|---|---|
committer | 2019-07-09 18:06:24 -0700 | |
commit | 9957d80bce7bf685f96ccffe15b420b2216d7f11 (patch) | |
tree | 6520c6f9957dc67c06f5fef277a583b368e9ca33 /Source/Particles/PhysicalParticleContainer.cpp | |
parent | eee063ceca2707824b63ac0966acf265c2b67457 (diff) | |
download | WarpX-9957d80bce7bf685f96ccffe15b420b2216d7f11.tar.gz WarpX-9957d80bce7bf685f96ccffe15b420b2216d7f11.tar.zst WarpX-9957d80bce7bf685f96ccffe15b420b2216d7f11.zip |
Attempt to fix segfault issue - Unsuccessful. Tested alternatives to <Real* AMREX_RESTRICT>.
Diffstat (limited to '')
-rw-r--r-- | Source/Particles/PhysicalParticleContainer.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 69c27cd21..e8654e573 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1866,20 +1866,22 @@ void PhysicalParticleContainer::warpx_copy_attribs(WarpXParIter& pti,const amrex { auto& attribs = pti.GetAttribs(); - Real* AMREX_RESTRICT uxp = attribs[PIdx::ux].dataPtr(); - Real* AMREX_RESTRICT uyp = attribs[PIdx::uy].dataPtr(); - Real* AMREX_RESTRICT uzp = attribs[PIdx::uz].dataPtr(); + //Real* AMREX_RESTRICT - Real* AMREX_RESTRICT xpold = attribs[PIdx::nattribs].dataPtr(); - Real* AMREX_RESTRICT ypold = attribs[PIdx::nattribs+1].dataPtr(); - Real* AMREX_RESTRICT zpold = attribs[PIdx::nattribs+2].dataPtr(); - Real* AMREX_RESTRICT uxpold = attribs[PIdx::nattribs+3].dataPtr(); - Real* AMREX_RESTRICT uypold = attribs[PIdx::nattribs+4].dataPtr(); - Real* AMREX_RESTRICT uzpold = attribs[PIdx::nattribs+5].dataPtr(); + const amrex::Real* uxp = attribs[PIdx::ux].dataPtr(); + const amrex::Real* uyp = attribs[PIdx::uy].dataPtr(); + const amrex::Real* uzp = attribs[PIdx::uz].dataPtr(); + + amrex::Real* xpold = attribs[PIdx::nattribs].dataPtr(); + amrex::Real* ypold = attribs[PIdx::nattribs+1].dataPtr(); + amrex::Real* zpold = attribs[PIdx::nattribs+2].dataPtr(); + amrex::Real* uxpold = attribs[PIdx::nattribs+3].dataPtr(); + amrex::Real* uypold = attribs[PIdx::nattribs+4].dataPtr(); + amrex::Real* uzpold = attribs[PIdx::nattribs+5].dataPtr(); const long np = pti.numParticles(); - ParallelFor( np, + amrex::ParallelFor( np, [=] AMREX_GPU_DEVICE (long i) { xpold[i]=xp[i]; ypold[i]=yp[i]; |