Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-17 08:53:42

0001 //------------------------------- -*- C++ -*- -------------------------------//
0002 // Copyright Celeritas contributors: see top-level COPYRIGHT file for details
0003 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
0004 //---------------------------------------------------------------------------//
0005 //! \file celeritas/optical/action/LocateVacanciesAction.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include "ActionInterface.hh"
0010 
0011 namespace celeritas
0012 {
0013 namespace optical
0014 {
0015 //---------------------------------------------------------------------------//
0016 /*!
0017  * Find the vacant track slots at the end of the step.
0018  *
0019  * \todo Create initializers from secondaries here once optical secondaries are
0020  * produced.
0021  *
0022  * \todo Rename?
0023  */
0024 class LocateVacanciesAction final : public OpticalStepActionInterface,
0025                                     public ConcreteAction
0026 {
0027   public:
0028     //! Construct with ID
0029     explicit LocateVacanciesAction(ActionId);
0030 
0031     //! Execute the action with host data
0032     void step(CoreParams const&, CoreStateHost&) const final;
0033 
0034     //! Execute the action with device data
0035     void step(CoreParams const&, CoreStateDevice&) const final;
0036 
0037     //! Dependency ordering of the action
0038     StepActionOrder order() const final { return StepActionOrder::end; }
0039 
0040   private:
0041     template<MemSpace M>
0042     void step_impl(CoreState<M>&) const;
0043 };
0044 
0045 //---------------------------------------------------------------------------//
0046 }  // namespace optical
0047 }  // namespace celeritas