From 102a6a070ab0c068b8cb9a4704b421772edcbe9e Mon Sep 17 00:00:00 2001 From: MaxThevenet Date: Tue, 29 Oct 2019 12:05:07 -0700 Subject: add comments to explain cudaSynchroniwe --- Source/Particles/MultiParticleContainer.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Source/Particles/MultiParticleContainer.cpp') 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 -- cgit v1.2.3