diff --git a/Src/Particle/AMReX_ParticleUtil.H b/Src/Particle/AMReX_ParticleUtil.H index f6f2506ec7f..aa061013d0e 100644 --- a/Src/Particle/AMReX_ParticleUtil.H +++ b/Src/Particle/AMReX_ParticleUtil.H @@ -870,7 +870,7 @@ void PermutationForDeposition (Gpu::DeviceVector& perm, index_type n PermutationForDeposition(perm, nitems, bx.numPts() * ref_product, [=] AMREX_GPU_DEVICE (index_type idx) noexcept { - const auto& p = make_particle{}(ptd,idx); + const auto p = make_particle{}(ptd,idx); IntVect iv = ((p.pos() - pos_offset) * dxi).round();