![]() |
|
|||
File indexing completed on 2025-09-18 09:09:12
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/phys/detail/DiscreteSelectAction.hh 0006 //---------------------------------------------------------------------------// 0007 #pragma once 0008 0009 #include "corecel/Assert.hh" 0010 #include "corecel/Macros.hh" 0011 #include "celeritas/global/ActionInterface.hh" 0012 0013 namespace celeritas 0014 { 0015 namespace detail 0016 { 0017 //---------------------------------------------------------------------------// 0018 /*! 0019 * Select a model for tracks undergoing a discrete interaction. 0020 */ 0021 class DiscreteSelectAction final : public CoreStepActionInterface, 0022 public StaticConcreteAction 0023 { 0024 public: 0025 // Construct with ID 0026 explicit DiscreteSelectAction(ActionId); 0027 0028 // Launch kernel with host data 0029 void step(CoreParams const&, CoreStateHost&) const final; 0030 0031 // Launch kernel with device data 0032 void step(CoreParams const&, CoreStateDevice&) const final; 0033 0034 //! Dependency ordering of the action 0035 StepActionOrder order() const final { return StepActionOrder::pre_post; } 0036 }; 0037 0038 //---------------------------------------------------------------------------// 0039 // INLINE DEFINITIONS 0040 //---------------------------------------------------------------------------// 0041 0042 #if !CELER_USE_DEVICE 0043 inline void 0044 DiscreteSelectAction::step(CoreParams const&, CoreStateDevice&) const 0045 { 0046 CELER_NOT_CONFIGURED("CUDA OR HIP"); 0047 } 0048 #endif 0049 0050 //---------------------------------------------------------------------------// 0051 } // namespace detail 0052 } // namespace celeritas
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |