Celeritas
0.5.0-86+4a8eea4
|
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 | |
CELER_FUNCTION | TrackSlotExecutor (ParamsPtr params, StatePtr state, T &&execute_track) |
Construct with core data and executor. | |
CELER_FUNCTION void | operator() (TrackSlotId ts) |
Call the underlying function based on the index in the state array. | |
CELER_FORCEINLINE_FUNCTION 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.