File indexing completed on 2025-09-17 08:53:42
0001
0002
0003
0004
0005
0006
0007 #pragma once
0008
0009 #include <memory>
0010
0011 #include "corecel/Macros.hh"
0012 #include "corecel/data/AuxInterface.hh"
0013 #include "corecel/data/Collection.hh"
0014 #include "celeritas/global/ActionInterface.hh"
0015
0016 #include "OffloadParams.hh"
0017 #include "../GeneratorDistributionData.hh"
0018
0019 namespace celeritas
0020 {
0021 namespace optical
0022 {
0023 class CherenkovParams;
0024 class MaterialParams;
0025 }
0026
0027 namespace detail
0028 {
0029
0030
0031
0032
0033 class CherenkovOffloadAction final : public CoreStepActionInterface
0034 {
0035 public:
0036
0037
0038 using SPConstCherenkov
0039 = std::shared_ptr<celeritas::optical::CherenkovParams const>;
0040 using SPConstMaterial
0041 = std::shared_ptr<celeritas::optical::MaterialParams const>;
0042
0043
0044 public:
0045
0046 CherenkovOffloadAction(ActionId id,
0047 AuxId data_id,
0048 SPConstMaterial material,
0049 SPConstCherenkov cherenkov);
0050
0051
0052 void step(CoreParams const&, CoreStateHost&) const final;
0053
0054
0055 void step(CoreParams const&, CoreStateDevice&) const final;
0056
0057
0058 ActionId action_id() const final { return id_; }
0059
0060
0061 std::string_view label() const final { return "cherenkov-offload"; }
0062
0063
0064 std::string_view description() const final;
0065
0066
0067 StepActionOrder order() const final { return StepActionOrder::user_post; }
0068
0069 private:
0070
0071
0072 ActionId id_;
0073 AuxId data_id_;
0074 SPConstMaterial material_;
0075 SPConstCherenkov cherenkov_;
0076
0077
0078
0079 template<MemSpace M>
0080 void step_impl(CoreParams const&, CoreState<M>&) const;
0081
0082 void pre_generate(CoreParams const&, CoreStateHost&) const;
0083 void pre_generate(CoreParams const&, CoreStateDevice&) const;
0084 };
0085
0086
0087 }
0088 }