![]() |
|
|||
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/detail/OffloadGatherAction.hh 0007 //---------------------------------------------------------------------------// 0008 #pragma once 0009 0010 #include <memory> 0011 #include <vector> 0012 0013 #include "corecel/Macros.hh" 0014 #include "corecel/data/AuxInterface.hh" 0015 #include "corecel/data/Collection.hh" 0016 #include "celeritas/global/ActionInterface.hh" 0017 0018 namespace celeritas 0019 { 0020 namespace detail 0021 { 0022 //---------------------------------------------------------------------------// 0023 /*! 0024 * Collect pre-step data needed to generate optical distribution data. 0025 * 0026 * This pre-step action stores the optical material ID and other 0027 * beginning-of-step properties so that optical photons can be generated 0028 * between the start and end points of the step. 0029 * 0030 * \sa OffloadGatherExecutor 0031 */ 0032 class OffloadGatherAction final : public CoreStepActionInterface 0033 { 0034 public: 0035 // Construct with action ID and storage 0036 OffloadGatherAction(ActionId id, AuxId data_id); 0037 0038 // Launch kernel with host data 0039 void step(CoreParams const&, CoreStateHost&) const final; 0040 0041 // Launch kernel with device data 0042 void step(CoreParams const&, CoreStateDevice&) const final; 0043 0044 //! ID of the model 0045 ActionId action_id() const final { return id_; } 0046 0047 //! Short name for the action 0048 std::string_view label() const final { return "optical-offload-gather"; } 0049 0050 // Name of the action (for user output) 0051 std::string_view description() const final; 0052 0053 //! Dependency ordering of the action 0054 StepActionOrder order() const final { return StepActionOrder::user_pre; } 0055 0056 private: 0057 //// DATA //// 0058 0059 ActionId id_; 0060 AuxId data_id_; 0061 }; 0062 0063 //---------------------------------------------------------------------------// 0064 } // namespace detail 0065 } // 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 |
![]() ![]() |