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