aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/MultiParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar MaxThevenet <mthevenet@lbl.gov> 2019-10-29 12:05:07 -0700
committerGravatar MaxThevenet <mthevenet@lbl.gov> 2019-10-29 12:05:07 -0700
commit102a6a070ab0c068b8cb9a4704b421772edcbe9e (patch)
tree79e4996ec2106e903c3411acf6ffbe41418d9b02 /Source/Particles/MultiParticleContainer.cpp
parent02a5a2f105d612508df817d98781a5d628624aea (diff)
downloadWarpX-102a6a070ab0c068b8cb9a4704b421772edcbe9e.tar.gz
WarpX-102a6a070ab0c068b8cb9a4704b421772edcbe9e.tar.zst
WarpX-102a6a070ab0c068b8cb9a4704b421772edcbe9e.zip
add comments to explain cudaSynchroniwe
Diffstat (limited to 'Source/Particles/MultiParticleContainer.cpp')
-rw-r--r--Source/Particles/MultiParticleContainer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/Particles/MultiParticleContainer.cpp b/Source/Particles/MultiParticleContainer.cpp
index 0dbc55676..de2b4583d 100644
--- a/Source/Particles/MultiParticleContainer.cpp
+++ b/Source/Particles/MultiParticleContainer.cpp
@@ -604,6 +604,8 @@ MultiParticleContainer::doFieldIonization ()
// level of source particle
ionization_process.createParticles(lev, mfi, pc_source, v_pc_product,
is_ionized, v_do_back_transformed_product);
+ // Synchronize to prevent the destruction of temporary arrays (at the
+ // end of the function call) before the kernel executes.
Gpu::streamSynchronize();
}
} // lev