Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-07 10:11:37

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/optical/gen/detail/OffloadTraits.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include "corecel/Types.hh"
0010 #include "celeritas/global/ActionInterface.hh"
0011 #include "celeritas/optical/Types.hh"
0012 
0013 namespace celeritas
0014 {
0015 class CherenkovParams;
0016 class ScintillationParams;
0017 
0018 namespace detail
0019 {
0020 struct CherenkovOffloadExecutor;
0021 struct ScintOffloadExecutor;
0022 
0023 //---------------------------------------------------------------------------//
0024 //! Traits for offloading optical distribution data from a process
0025 template<GeneratorType G>
0026 struct OffloadTraits;
0027 
0028 template<>
0029 struct OffloadTraits<GeneratorType::cherenkov>
0030 {
0031     //! Params class
0032     using Params = CherenkovParams;
0033 
0034     //! Optical offload executor
0035     using Executor = CherenkovOffloadExecutor;
0036 
0037     //! Step action order
0038     static constexpr StepActionOrder order = StepActionOrder::pre_post;
0039 
0040     //! Label of the offload action
0041     static constexpr char const label[] = "cherenkov-offload";
0042 
0043     //! Description of the offload action
0044     static constexpr char const description[]
0045         = "generate Cherenkov optical distribution data";
0046 };
0047 
0048 template<>
0049 struct OffloadTraits<GeneratorType::scintillation>
0050 {
0051     //! Params class
0052     using Params = ScintillationParams;
0053 
0054     //! Optical offload executor
0055     using Executor = ScintOffloadExecutor;
0056 
0057     //! Step action order
0058     static constexpr StepActionOrder order = StepActionOrder::user_post;
0059 
0060     //! Label of the offload action
0061     static constexpr char const label[] = "scintillation-offload";
0062 
0063     //! Description of the offload action
0064     static constexpr char const description[]
0065         = "generate scintillation optical distribution data";
0066 };
0067 
0068 //---------------------------------------------------------------------------//
0069 }  // namespace detail
0070 }  // namespace celeritas