celeritas-project / celeritas

Celeritas is a new Monte Carlo transport code designed to accelerate scientific discovery in high energy physics by improving detector simulation throughput and energy efficiency using GPUs.
https://celeritas-project.github.io/celeritas/user/index.html
Other
58 stars 32 forks source link

Skip indirection array for sorted track slots #1315

Closed sethrj closed 2 weeks ago

sethrj commented 2 weeks ago

This updates the core state to avoid allocating or accessing a track slot array in the usual case that we're not sorting tracks. It also defines a constructor directly from track slot ID which we can use to simplify the track initialization kernel. Finally, it adds a core track helper function to simultaneously mark a track as "errored" and to set the post-step action to kill it. I've made this function non-const, which requires updating a number of function signatures to make it mutable.