diff options
author | 2019-11-06 09:41:50 -0800 | |
---|---|---|
committer | 2019-11-06 09:41:50 -0800 | |
commit | 2f5472ead913dd8587856e195f85e7f99d1ceb2f (patch) | |
tree | d28ed56664828d6e6e9b4c8bd0b59c1c63089dce /Source/Particles/ParticleCreation/ElementaryProcess.H | |
parent | 63a2fe01350f323c6fb07d645cf99c1950209efd (diff) | |
parent | d51108dd082d06c5d26f3ec95b2bd8b351dadf3e (diff) | |
download | WarpX-2f5472ead913dd8587856e195f85e7f99d1ceb2f.tar.gz WarpX-2f5472ead913dd8587856e195f85e7f99d1ceb2f.tar.zst WarpX-2f5472ead913dd8587856e195f85e7f99d1ceb2f.zip |
Merge pull request #511 from ax3l/fix-segfaulCreateParticles
Fix Segfault: Create Particle Functor
Diffstat (limited to 'Source/Particles/ParticleCreation/ElementaryProcess.H')
-rw-r--r-- | Source/Particles/ParticleCreation/ElementaryProcess.H | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Particles/ParticleCreation/ElementaryProcess.H b/Source/Particles/ParticleCreation/ElementaryProcess.H index fa791c244..9024900ea 100644 --- a/Source/Particles/ParticleCreation/ElementaryProcess.H +++ b/Source/Particles/ParticleCreation/ElementaryProcess.H @@ -123,7 +123,7 @@ public: int np_flagged = i_product[np_source-1]; if (np_flagged == 0) return; - amrex::Vector<copyParticle> v_copy_functor; + amrex::Gpu::ManagedDeviceVector<copyParticle> v_copy_functor; amrex::Gpu::ManagedDeviceVector<int> v_pid_product(nproducts); amrex::Gpu::ManagedDeviceVector<WarpXParticleContainer::ParticleType*> v_particles_product(nproducts); for (int iproduct=0; iproduct<nproducts; iproduct++){ @@ -212,12 +212,12 @@ public: amrex::Gpu::ManagedDeviceVector<int> v_pid_product, amrex::Gpu::ManagedDeviceVector<WarpXParticleContainer::ParticleType*> v_particles_product, WarpXParticleContainer::ParticleType* particles_source, - const amrex::Vector<copyParticle>& v_copy_functor, + const amrex::Gpu::ManagedDeviceVector<copyParticle>& v_copy_functor, amrex::GpuArray<int*,1> runtime_iattribs_source) { int const * const AMREX_RESTRICT p_is_flagged = is_flagged.dataPtr(); int const * const AMREX_RESTRICT p_i_product = i_product.dataPtr(); - copyParticle const * const p_copy_functor = v_copy_functor.data(); + copyParticle const * const AMREX_RESTRICT p_copy_functor = v_copy_functor.dataPtr(); WarpXParticleContainer::ParticleType * * p_particles_product = v_particles_product.data(); int const * const p_pid_product = v_pid_product.data(); |