Celeritas  0.5.0-56+6b053cd
Public Member Functions | List of all members
celeritas::optical::TrackSlotExecutor< T > Class Template Reference

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.
 

Detailed Description

template<class T>
class celeritas::optical::TrackSlotExecutor< T >

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.


The documentation for this class was generated from the following file: