Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
eab3aca
Move CoreStateCounters in global to the GPU
LSchwiebert Jan 3, 2026
74b3cde
Don't include thrust header for host code
LSchwiebert Jan 4, 2026
6a8f12c
Formatting
LSchwiebert Jan 4, 2026
6ab3479
Check for device usage
LSchwiebert Jan 4, 2026
5651842
Different code paths for host and device tests
LSchwiebert Jan 6, 2026
4272438
Resolve issue with host-only builds
LSchwiebert Jan 6, 2026
09beb0d
Fix preprocessor command
LSchwiebert Jan 6, 2026
ff07cb7
Fake parameter usage on error path to avoid unused-parameter warning
LSchwiebert Jan 6, 2026
50b138a
Artificial parameter use on error path to avoid unused-parameter warning
LSchwiebert Jan 6, 2026
cdeee5d
Artificial parameter use on error path to avoid unused-parameter warning
LSchwiebert Jan 6, 2026
cb09dbd
Remove unused variable
LSchwiebert Jan 6, 2026
610f038
Remove unused variable
LSchwiebert Jan 6, 2026
600dce6
Fix parameter list
LSchwiebert Jan 7, 2026
be1d7df
Synchronize the stream after copy
LSchwiebert Jan 7, 2026
3e132a3
Merge branch 'develop' into CoreStateCounters-track
LSchwiebert Jan 7, 2026
bde318f
Merge branch 'celeritas-project:develop' into CoreStateCounters-track
LSchwiebert Jan 14, 2026
a68bec5
Remove synchronization from remove_if_alive track device function
LSchwiebert Jan 14, 2026
69c2253
Use constexpr tests for memory space
LSchwiebert Jan 14, 2026
1434459
Add braces to resolve ambiguous else warnings
LSchwiebert Jan 14, 2026
9b57366
Incorporate feedback on PR
LSchwiebert Jan 17, 2026
9f8e1b7
Remove unnecessary leftover testing code
LSchwiebert Jan 17, 2026
6922a22
Merge branch 'develop' into CoreStateCounters-track
LSchwiebert Jan 17, 2026
f245762
Update StepDiagnostic example
LSchwiebert Jan 17, 2026
85546eb
Merge branch 'CoreStateCounters-track' of https://github.com/LSchwieb…
LSchwiebert Jan 17, 2026
46b1d0f
Update StepDiagnostic device example
LSchwiebert Jan 17, 2026
0111367
Remove unnecessary header to resolve ROCm compiler issue
LSchwiebert Jan 20, 2026
59e3d0b
Merge branch 'develop' into CoreStateCounters-track
sethrj Jan 20, 2026
3953361
Merge branch 'celeritas-project:develop' into CoreStateCounters-track
LSchwiebert Jan 20, 2026
c07dc85
Resolve PR Feedback and minor code cleanup
LSchwiebert Jan 21, 2026
dc3e792
Merge branch 'celeritas-project:develop' into CoreStateCounters-track
LSchwiebert Jan 21, 2026
9e3cbf1
Merge branch 'CoreStateCounters-track' of https://github.com/LSchwieb…
LSchwiebert Jan 21, 2026
5e43449
Merge branch 'CoreStateCounters-optical' of https://github.com/LSchwi…
LSchwiebert Jan 25, 2026
843926e
Initial move of counters to device. Some tests not passing yet
LSchwiebert Jan 25, 2026
f6acaf8
Retrieve updated counters earlier to resolve most failing tests
LSchwiebert Jan 26, 2026
266b90a
Resolve compiler warning on unused variable
LSchwiebert Jan 26, 2026
bb644ce
Merge branch 'celeritas-project:develop' into CoreStateCounters-optical
LSchwiebert Jan 26, 2026
2e51bc1
Empty commit to trigger CI
LSchwiebert Jan 26, 2026
01215be
Don't need to sync counters in optical CoreState constructor
LSchwiebert Jan 28, 2026
42a6181
Merge branch 'celeritas-project:develop' into CoreStateCounters-optical
LSchwiebert Jan 28, 2026
20f093a
Merge branch 'CoreStateCounters-optical' of https://github.com/LSchwi…
LSchwiebert Jan 28, 2026
0ebd24b
Replace sync in Stepper function with an executor
LSchwiebert Feb 6, 2026
3bbbead
Add SetPending executor class
LSchwiebert Feb 6, 2026
4daf06e
Merge branch 'CoreStateCounters-kernels' of https://github.com/LSchwi…
LSchwiebert Feb 6, 2026
00297ef
Allow zero primaries
LSchwiebert Feb 8, 2026
acef449
Merge branch 'celeritas-project:develop' into CoreStateCounters-kernels
LSchwiebert Feb 10, 2026
3a40fcb
Update Stepper functors to remove core state counter synchronization
LSchwiebert Feb 12, 2026
59cb44a
Update Stepper functors to remove core state counter synchronization
LSchwiebert Feb 12, 2026
5a5eb8b
Remove extraneous parameter
LSchwiebert Feb 12, 2026
26cf3e5
Use KernelLauncher instead of ActionLauncher
LSchwiebert Feb 16, 2026
9ce90ba
Minor Doxygen Comment Change
LSchwiebert Mar 2, 2026
37cca9b
First try at absorbing copy_if_vacant return value into the function
LSchwiebert Mar 2, 2026
a51e6d6
Fix tests of new copy_if_vacant function
LSchwiebert Mar 2, 2026
066bc73
Move Stepper calls and copy_if_vacant function to use functors
LSchwiebert Mar 9, 2026
1c8552e
Merge branch 'celeritas-project:develop' into CoreStateCounters-kernels
LSchwiebert Mar 9, 2026
9fd7983
Merge branch 'celeritas-project:develop' into CoreStateCounters-kernels
LSchwiebert Mar 11, 2026
40ba507
Add new functors and initial implementation of generating and transpo…
LSchwiebert Mar 12, 2026
d6a13ba
Revised implementation of generating and transporting optical photons
LSchwiebert Apr 4, 2026
2105af5
Pull in recent develop patches
LSchwiebert Apr 4, 2026
369095d
Remove synchronization from LocalOpticalGenOffload::Flush()
LSchwiebert Apr 5, 2026
73f9fd9
Fix parameter list for undefined device function
LSchwiebert Apr 6, 2026
4de4636
Move UpdatePendingExecutor to optical/gen
LSchwiebert Apr 6, 2026
6d36f60
Remove params from update_pending functor
LSchwiebert Apr 6, 2026
00def81
Replace sync_get_counters in DirectGeneratorAction::insert_impl()
LSchwiebert Apr 6, 2026
75e25a3
Remove need for sync_get_counters before calling DirectGeneratorExecutor
LSchwiebert Apr 8, 2026
0f004a3
Merge branch 'celeritas-project:develop' into CoreStateCounters-kernels
LSchwiebert Apr 8, 2026
ef954a8
Make pointer type explicit with auto*
LSchwiebert Apr 10, 2026
988335f
Remove state counter synchronization in step_impl
LSchwiebert Apr 10, 2026
249e6fa
Move update num_pending to GeneratorBase base class
LSchwiebert Apr 12, 2026
8162f50
Remove optical state sync from insert_impl
LSchwiebert Apr 12, 2026
9b51187
Remove Core State counter sync from all GeneratorAction classes
LSchwiebert Apr 16, 2026
c338ff3
Remove last synchronization and update comments
LSchwiebert Apr 16, 2026
87fd459
Remove core state synchronization from Runner::operator()
LSchwiebert Apr 17, 2026
67b6a09
Remove some unnecessary header files
LSchwiebert Apr 17, 2026
c0cc319
Resolve merge conflicts
LSchwiebert Apr 17, 2026
62078b0
Resolve nvcc warning
LSchwiebert Apr 17, 2026
51de5b7
Remove extraneous semicolon ending a namespace -- old gcc versions pr…
LSchwiebert Apr 17, 2026
7c7946f
Merge branch 'celeritas-project:develop' into CoreStateCounters-kernels
LSchwiebert Apr 20, 2026
8fabd0b
Resolve merge conflict
LSchwiebert Apr 20, 2026
5a24b26
Merge branch 'celeritas-project:develop' into CoreStateCounters-kernels
LSchwiebert Apr 23, 2026
359f451
Fix typo in documentation of filename
LSchwiebert Apr 23, 2026
2593a75
Merge branch 'CoreStateCounters-kernels' of https://github.com/LSchwi…
LSchwiebert Apr 23, 2026
3755a26
Use dynamic_cast instead of static_cast
LSchwiebert Apr 24, 2026
177390a
Remove synchronization from InitializeTracksAction::step_impl
LSchwiebert Apr 27, 2026
e71afa8
Fix step_impl device function header in host-only code
LSchwiebert Apr 27, 2026
cf9ccd1
WIP: interactive code review
sethrj Apr 28, 2026
20e6776
Merge branch 'celeritas-project:develop' into CoreStateCounters-kernels
LSchwiebert Apr 29, 2026
9b90ff0
Merge branch 'celeritas-project:develop' into CoreStateCounters-kernels
LSchwiebert May 6, 2026
93e0e74
Incorporate WIP review comments
LSchwiebert May 7, 2026
99a4228
Merge branch 'CoreStateCounters-kernels' of https://github.com/LSchwi…
LSchwiebert May 7, 2026
8c24758
Fix some of the WIP code review
LSchwiebert May 13, 2026
2486cc0
Updates for the SetGenerated executor
LSchwiebert May 13, 2026
84c2ba4
Incorporate draft PR feedback for LocateVacanciesAction::update_alive
LSchwiebert May 17, 2026
746adc9
Add Track Executor for optical tracks
LSchwiebert May 17, 2026
8f91be5
Change UpdateCountersExecutor to use make_single_executor
LSchwiebert May 17, 2026
9244df9
Remove old commented code
LSchwiebert May 17, 2026
dc0934b
Change UpdateNumActiveExecutor to use make_single_executor
LSchwiebert May 17, 2026
5bc712b
Remove unused header
LSchwiebert May 18, 2026
fe6469f
Move header to source files
LSchwiebert May 18, 2026
4fdb7ae
Remove unused header files
LSchwiebert May 21, 2026
02d1f9a
Remove commented function
LSchwiebert May 21, 2026
be7f3d6
Revise UpdatePendingExecutor per WIP feedback
LSchwiebert May 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/accel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ list(APPEND SOURCES
)

celeritas_polysource(ExceptionConverter)
celeritas_polysource(LocalOpticalGenOffload)

if(Geant4_VERSION VERSION_GREATER_EQUAL 11.0)
list(APPEND SOURCES
Expand Down
65 changes: 50 additions & 15 deletions src/accel/LocalOpticalGenOffload.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
#include "corecel/sys/ScopedProfiling.hh"
#include "geocel/GeantUtils.hh"
#include "celeritas/global/CoreParams.hh"
#include "celeritas/optical/CoreParams.hh"
#include "celeritas/optical/CoreState.hh"
#include "celeritas/optical/TrackExecutor.hh"
#include "celeritas/optical/Transporter.hh"
#include "celeritas/optical/action/ActionLauncher.hh"
#include "celeritas/optical/gen/GeneratorAction.hh"
#include "celeritas/optical/gen/detail/UpdatePendingExecutor.hh"
#include "celeritas/phys/GeneratorRegistry.hh"

#include "SetupOptions.hh"
Expand Down Expand Up @@ -105,17 +106,14 @@ void LocalOpticalGenOffload::InitializeEvent(int id)
CELER_EXPECT(id >= 0);

event_id_ = id_cast<UniqueEventId>(id);
if constexpr (CELERITAS_RESEED == CELERITAS_RESEED_TRACKSLOT)

if (!(G4Threading::IsMultithreadedApplication()
&& G4MTRunManager::SeedOncePerCommunication()))
{
if (!(G4Threading::IsMultithreadedApplication()
&& G4MTRunManager::SeedOncePerCommunication()))
{
// Since Geant4 schedules events dynamically, reseed the Celeritas
// RNGs using the Geant4 event ID for reproducibility. This
// guarantees that an event can be reproduced given the event ID.
state_->reseed(transport_->params()->rng(),
id_cast<UniqueEventId>(id));
}
// Since Geant4 schedules events dynamically, reseed the Celeritas RNGs
// using the Geant4 event ID for reproducibility. This guarantees that
// an event can be reproduced given the event ID.
state_->reseed(transport_->params()->rng(), id_cast<UniqueEventId>(id));
}
}

Expand Down Expand Up @@ -186,9 +184,19 @@ void LocalOpticalGenOffload::Flush()
// Copy the buffered distributions to device
generate_->insert(*state_, make_span(buffer_));

auto counters = state_->sync_get_counters();
counters.num_pending += num_photons_;
state_->sync_put_counters(counters);
// Update the number of primaries waiting to be generated based on the
// number of photons.
if (celeritas::device())
{
auto* s = dynamic_cast<optical::CoreState<MemSpace::device>*>(&*state_);
this->update_primaries(*s);
}
else
{
auto* s = dynamic_cast<optical::CoreState<MemSpace::host>*>(&*state_);
this->update_primaries(*s);
}

num_photons_ = 0;
buffer_.clear();

Expand Down Expand Up @@ -243,5 +251,32 @@ void LocalOpticalGenOffload::Finalize()
CELER_ENSURE(!*this);
}

//---------------------------------------------------------------------------//
/*!
* Call the UpdatePending functor to update the number of primaries to be
* generated to include the buffered optical photons; use only one host thread.
*/
void LocalOpticalGenOffload::update_primaries(
optical::CoreState<MemSpace::host>& state) const
{
auto const& optical_params = *transport_->params();
auto execute_thread = make_single_track_executor(
optical_params.ptr<MemSpace::native>(),
state.ptr(),
optical::detail::UpdatePendingExecutor{num_photons_});
launch_action(1, execute_thread);
}

//---------------------------------------------------------------------------//
// DEVICE-DISABLED IMPLEMENTATION
//---------------------------------------------------------------------------//
#if !CELER_USE_DEVICE
inline void LocalOpticalGenOffload::update_primaries(
optical::CoreState<MemSpace::device>&) const
{
CELER_NOT_CONFIGURED("CUDA OR HIP");
}
#endif

//---------------------------------------------------------------------------//
} // namespace celeritas
36 changes: 36 additions & 0 deletions src/accel/LocalOpticalGenOffload.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//------------------------------ -*- cuda -*- -------------------------------//
// Copyright Celeritas contributors: see top-level COPYRIGHT file for details
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
//---------------------------------------------------------------------------//
//! \file accel/LocalOpticalGenOffload.cu
//---------------------------------------------------------------------------//
#include "LocalOpticalGenOffload.hh"

#include "celeritas/global/CoreParams.hh"
#include "celeritas/optical/TrackExecutor.hh"
#include "celeritas/optical/Transporter.hh"
#include "celeritas/optical/action/ActionLauncher.device.hh"
#include "celeritas/optical/gen/detail/UpdatePendingExecutor.hh"

namespace celeritas
{
//---------------------------------------------------------------------------//
/*!
* Call the UpdatePending functor to update number of primaries to be generated
* to include the buffered optical photons; use only one device thread.
*/
void LocalOpticalGenOffload::update_primaries(
optical::CoreState<MemSpace::device>& state) const
{
auto const& optical_params = *transport_->params();
auto execute_thread = make_single_track_executor(
optical_params.ptr<MemSpace::native>(),
state.ptr(),
optical::detail::UpdatePendingExecutor{num_photons_});
static KernelLauncher<decltype(execute_thread)> const launch_kernel(
"update-pending");
launch_kernel(1, state.stream_id(), execute_thread);
}

//---------------------------------------------------------------------------//
} // namespace celeritas
7 changes: 7 additions & 0 deletions src/accel/LocalOpticalGenOffload.hh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include "corecel/Types.hh"
#include "celeritas/Types.hh"
#include "celeritas/inp/Control.hh"
#include "celeritas/optical/CoreParams.hh"
#include "celeritas/optical/CoreState.hh"
#include "celeritas/optical/gen/GeneratorData.hh"

#include "LocalOffloadInterface.hh"
Expand Down Expand Up @@ -80,6 +82,11 @@ class LocalOpticalGenOffload final : public LocalOffloadInterface
explicit operator bool() const { return this->Initialized(); }

private:
// Update the number of primaries waiting to be generated on host/device
// Called by Flush()
void update_primaries(optical::CoreState<MemSpace::host>&) const;
void update_primaries(optical::CoreState<MemSpace::device>&) const;

// Transport pending optical tracks
std::shared_ptr<optical::Transporter> transport_;

Expand Down
4 changes: 4 additions & 0 deletions src/celeritas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -397,24 +397,28 @@ celeritas_polysource(em/model/RelativisticBremModel)
celeritas_polysource(em/model/SeltzerBergerModel)
celeritas_polysource(em/model/CoulombScatteringModel)
celeritas_polysource(geo/detail/BoundaryAction)
celeritas_polysource(global/Stepper)
celeritas_polysource(global/detail/KillActive)
celeritas_polysource(global/detail/TrackSlotUtils)
celeritas_polysource(mucf/model/DTMixMucfModel)
celeritas_polysource(neutron/model/ChipsNeutronElasticModel)
celeritas_polysource(neutron/model/NeutronCaptureModel)
celeritas_polysource(neutron/model/NeutronInelasticModel)
celeritas_polysource(optical/model/AbsorptionModel)
celeritas_polysource(optical/Runner)
celeritas_polysource(optical/model/MieModel)
celeritas_polysource(optical/model/RayleighModel)
celeritas_polysource(optical/model/WavelengthShiftModel)
celeritas_polysource(optical/action/AlongStepAction)
celeritas_polysource(optical/action/DetectorAction)
celeritas_polysource(optical/action/DiscreteSelectAction)
celeritas_polysource(optical/action/LocateVacanciesAction)
celeritas_polysource(optical/action/PreStepAction)
celeritas_polysource(optical/action/StepDiagnostic)
celeritas_polysource(optical/action/TrackingCutAction)
celeritas_polysource(optical/action/detail/TrackInitAlgorithms)
celeritas_polysource(optical/gen/GeneratorAction)
celeritas_polysource(optical/gen/GeneratorBase)
celeritas_polysource(optical/gen/OffloadAction)
celeritas_polysource(optical/gen/OffloadGatherAction)
celeritas_polysource(optical/gen/PrimaryGeneratorAction)
Expand Down
6 changes: 3 additions & 3 deletions src/celeritas/global/CoreTrackView.hh
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ class CoreTrackView
inline CELER_FUNCTION CoreStateCounters const& counters() const;

private:
StateRef const& states_;
ParamsRef const& params_;
StateRef const& states_;
ThreadId const thread_id_;
TrackSlotId track_slot_id_;
};
Expand All @@ -136,7 +136,7 @@ CELER_FUNCTION
CoreTrackView::CoreTrackView(ParamsRef const& params,
StateRef const& states,
ThreadId thread)
: states_(states), params_(params), thread_id_(thread)
: params_(params), states_(states), thread_id_(thread)
{
CELER_EXPECT(states_.track_slots.empty()
|| thread_id_ < states_.track_slots.size());
Expand All @@ -157,7 +157,7 @@ CELER_FUNCTION
CoreTrackView::CoreTrackView(ParamsRef const& params,
StateRef const& states,
TrackSlotId track_slot)
: states_(states), params_(params), track_slot_id_(track_slot)
: params_(params), states_(states), track_slot_id_(track_slot)
{
CELER_EXPECT(track_slot_id_ < states_.size());
}
Expand Down
40 changes: 31 additions & 9 deletions src/celeritas/global/Stepper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@
#include "corecel/sys/ScopedProfiling.hh"
#include "orange/OrangeData.hh"
#include "celeritas/Types.hh"
#include "celeritas/global/TrackExecutor.hh"
#include "celeritas/random/RngReseed.hh"
#include "celeritas/track/ExtendFromPrimariesAction.hh"
#include "celeritas/track/TrackInitParams.hh"

#include "ActionLauncher.hh"
#include "CoreParams.hh"

#include "detail/KillActive.hh"
#include "detail/SetGeneratedExecutor.hh"

namespace celeritas
{
Expand Down Expand Up @@ -127,13 +130,10 @@ template<MemSpace M>
auto Stepper<M>::operator()() -> result_type
{
ScopedProfiling profile_this{"step"};
auto counters = state_->sync_get_counters();
counters.num_generated = 0;
counters.num_cut = 0;
counters.num_errored = 0;
state_->sync_put_counters(counters);
// Initialize the num_generated counter to zero
this->set_generated();
actions_->step(*params_, *state_);
counters = state_->sync_get_counters();
auto counters = state_->sync_get_counters();

// Get the number of track initializers and active tracks
result_type result;
Expand Down Expand Up @@ -169,9 +169,6 @@ auto Stepper<M>::operator()(SpanConstPrimary primaries) -> result_type
<< "event number " << max_id->event_id.unchecked_get()
<< " exceeds max_events=" << params_->init()->max_events());

auto counters = state_->sync_get_counters();
counters.num_pending = primaries.size();
state_->sync_put_counters(counters);
primaries_action_->insert(*params_, *state_, primaries);

return (*this)();
Expand Down Expand Up @@ -213,6 +210,31 @@ void Stepper<M>::reseed(UniqueEventId event_id)
params_->init()->reset_track_ids(state_->stream_id(), &state_->ref().init);
}

//---------------------------------------------------------------------------//
/*!
* Set the num_pending counter to the number of generated primaries.
*/
template<>
void Stepper<MemSpace::host>::set_generated()
{
auto execute_thread
= make_single_track_executor(params_->ptr<MemSpace::native>(),
state_->ptr(),
detail::SetGeneratedExecutor{});
launch_core(1, "set-generated", *params_, *state_, execute_thread);
}

//---------------------------------------------------------------------------//
// DEVICE-DISABLED IMPLEMENTATION
//---------------------------------------------------------------------------//
#if !CELER_USE_DEVICE
template<>
void Stepper<MemSpace::device>::set_generated()
{
CELER_NOT_CONFIGURED("CUDA OR HIP");
}
#endif

//---------------------------------------------------------------------------//
// EXPLICIT INSTANTIATION
//---------------------------------------------------------------------------//
Expand Down
38 changes: 38 additions & 0 deletions src/celeritas/global/Stepper.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//------------------------------ -*- cuda -*- -------------------------------//
// Copyright Celeritas contributors: see top-level COPYRIGHT file for details
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
//---------------------------------------------------------------------------//
//! \file celeritas/global/Stepper.cu
//---------------------------------------------------------------------------//
#include "Stepper.hh"

#include "corecel/Assert.hh"
#include "corecel/Types.hh"
#include "corecel/sys/KernelLauncher.device.hh"
#include "celeritas/global/TrackExecutor.hh"

#include "CoreParams.hh"
#include "CoreState.hh"

#include "detail/SetGeneratedExecutor.hh"

namespace celeritas
{
//---------------------------------------------------------------------------//
/*!
* Set the num_pending counter to the number of generated primaries.
*/
template<>
void Stepper<MemSpace::device>::set_generated()
{
auto execute_thread
= make_single_track_executor(params_->ptr<MemSpace::native>(),
state_->ptr(),
detail::SetGeneratedExecutor{});
static KernelLauncher<decltype(execute_thread)> const launch_kernel(
"set-generated");
launch_kernel(1, state_->stream_id(), execute_thread);
}

//---------------------------------------------------------------------------//
} // namespace celeritas
11 changes: 7 additions & 4 deletions src/celeritas/global/Stepper.hh
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ class Stepper final : public StepperInterface
//!@{
//! \name Type aliases
using StateRef = CoreStateData<Ownership::reference, M>;
using CoreStateHost = CoreState<MemSpace::host>;
using CoreStateDevice = CoreState<MemSpace::device>;
//!@}

public:
Expand Down Expand Up @@ -184,6 +186,9 @@ class Stepper final : public StepperInterface
//! Reset the core state counters and data so it can be reused
void reset_state() { state_->reset(); }

//! Reset the num_generated state counter to zero
void set_generated();

//! Get a shared pointer to the state (TEMPORARY, DO NOT USE)
SPState sp_state() final { return state_; }

Expand All @@ -199,11 +204,9 @@ class Stepper final : public StepperInterface
};

//---------------------------------------------------------------------------//
// EXPLICIT INSTANTIATION
// EXPLICIT INSTANTIATION removed but retained in Stepper.cc so that the
// set_generated() member function can be specialized based on MemSpace
//---------------------------------------------------------------------------//

extern template class Stepper<MemSpace::host>;
extern template class Stepper<MemSpace::device>;

//---------------------------------------------------------------------------//
} // namespace celeritas
Loading