Celeritas 0.7.0-dev.242+develop.62c3034b
Loading...
Searching...
No Matches
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

 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.
 

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: