|
Celeritas 0.7.0-dev.242+develop.62c3034b
|
Transform a thread or track slot ID into a core track view. More...
#include <TrackSlotExecutor.hh>
Public Types | |
Type aliases | |
| using | ParamsPtr = CoreParamsPtr< MemSpace::native > |
| using | StatePtr = CoreStatePtr< MemSpace::native > |
| using | Applier = T |
Public Member Functions | |
| TrackSlotExecutor (ParamsPtr params, StatePtr state, T &&execute_track) | |
| Construct with core data and executor. | |
| void | operator() (TrackSlotId ts) |
| Call the underlying function based on the index in the state array. | |
| void | operator() (ThreadId thread) |
| Call the underlying function using the thread index. | |
Transform a thread or track slot ID into a core track view.
This class can be used to call a functor that applies to optical::CoreTrackView using a TrackSlotId, so that the tracks can be easily looped over as a group on CPU or GPU.
To facilitate kernel launches, the class can also directly map ThreadId to TrackSlotId, which will have the same numerical value because optical photons do not implement sorting.