Split AdePT kernels to separate physics from geometry #313
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds the option to use a split version of the Electrons and Gammas transport kernels. The main motivation for this is to split geometry calls from physics as much as possible, to allow for better device occupancy.
The gammas kernel is split in:
The electrons kernel is split in:
Splitting the kernels means that we now need to carry over some information from one kernel to the next. Part of this information, related to scoring and navigation, is stored as part of the AdePT track. In order to keep track of the information needed for physics we add 3 arrays keeping a G4HepEM track of the corresponding type per AdePT track.
This means that the memory needed per track increases:
Single kernel:
AdePT Track: 264B
Split kernels:
AdePT Track: 512B
HepEM Electron: 328B
HepEM Gamma: 176B
On average we need 789B per track when using split kernels
This is the simplest implementation of a split kernels approach, and can be optimized further