Celeritas
0.5.0-86+4a8eea4
|
Store all state data for a single thread. More...
#include <CoreState.hh>
Public Types | |
Type aliases | |
template<template< Ownership, MemSpace > class S> | |
using | StateRef = S< Ownership::reference, M > |
using | Ref = StateRef< CoreStateData > |
using | Ptr = ObserverPtr< Ref, M > |
Public Types inherited from celeritas::optical::CoreStateInterface | |
using | size_type = TrackSlotId::size_type |
Public Types inherited from celeritas::AuxStateInterface | |
using | SPState = std::shared_ptr< AuxStateInterface > |
Default destructor. | |
Public Member Functions | |
CoreState (CoreParams const ¶ms, StreamId stream_id, size_type num_track_slots) | |
Construct from CoreParams. | |
StreamId | stream_id () const final |
Thread/stream ID. | |
size_type | size () const final |
Number of track slots. | |
bool | warming_up () const |
Whether the state is being transported with no active particles. More... | |
Ref & | ref () |
Get a reference to the mutable state data. | |
Ref const & | ref () const |
Get a reference to the mutable state data. | |
Ptr | ptr () |
Get a native-memspace pointer to the mutable state data. | |
CoreStateCounters & | counters () |
Track initialization counters. | |
CoreStateCounters const & | counters () const final |
Track initialization counters. | |
void | insert_primaries (Span< TrackInitializer const > host_primaries) final |
Inject primaries to be turned into TrackInitializers. More... | |
Public Member Functions inherited from celeritas::optical::CoreStateInterface | |
~CoreStateInterface () override | |
Support polymorphic deletion. | |
Public Member Functions inherited from celeritas::AuxStateInterface | |
virtual | ~AuxStateInterface () |
Default destructor. | |
Additional Inherited Members | |
Protected Member Functions inherited from celeritas::optical::CoreStateInterface | |
CELER_DEFAULT_COPY_MOVE (CoreStateInterface) | |
Protected Member Functions inherited from celeritas::AuxStateInterface | |
AuxStateInterface ()=default | |
CELER_DEFAULT_COPY_MOVE (AuxStateInterface) | |
Default destructor. | |
Store all state data for a single thread.
When the state lives on the device, we maintain a separate copy of the device "ref" in device memory: otherwise we'd have to copy the entire state in launch arguments and access it through constant memory.
|
finalvirtual |
Inject primaries to be turned into TrackInitializers.
These will be converted by the ProcessPrimaries action.
Implements celeritas::optical::CoreStateInterface.
bool celeritas::optical::CoreState< M >::warming_up |
Whether the state is being transported with no active particles.
The warmup stage is useful for profiling and debugging since the first step iteration can do the following: