Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 10:31:26

0001 //----------------------------------*-C++-*----------------------------------//
0002 // Copyright 2024 UT-Battelle, LLC, and other Celeritas developers.
0003 // See the top-level COPYRIGHT file for details.
0004 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
0005 //---------------------------------------------------------------------------//
0006 //! \file celeritas/optical/action/InitializeTracksAction.hh
0007 //---------------------------------------------------------------------------//
0008 #pragma once
0009 
0010 #include "ActionInterface.hh"
0011 
0012 namespace celeritas
0013 {
0014 namespace optical
0015 {
0016 //---------------------------------------------------------------------------//
0017 /*!
0018  * Initialize optical track states.
0019  */
0020 class InitializeTracksAction final : public OpticalStepActionInterface,
0021                                      public ConcreteAction
0022 {
0023   public:
0024     //! Construct with ID
0025     explicit InitializeTracksAction(ActionId);
0026 
0027     //! Execute the action with host data
0028     void step(CoreParams const&, CoreStateHost&) const final;
0029 
0030     //! Execute the action with device data
0031     void step(CoreParams const&, CoreStateDevice&) const final;
0032 
0033     //! Dependency ordering of the action
0034     StepActionOrder order() const final { return StepActionOrder::start; }
0035 
0036   private:
0037     template<MemSpace M>
0038     void step_impl(CoreParams const&, CoreState<M>&) const;
0039 
0040     void step_impl(CoreParams const&, CoreStateHost&, size_type) const;
0041     void step_impl(CoreParams const&, CoreStateDevice&, size_type) const;
0042 };
0043 
0044 //---------------------------------------------------------------------------//
0045 }  // namespace optical
0046 }  // namespace celeritas