forked from celeritas-project/celeritas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PreGenGatherAction.hh
68 lines (55 loc) · 1.92 KB
/
PreGenGatherAction.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//----------------------------------*-C++-*----------------------------------//
// Copyright 2024 UT-Battelle, LLC, and other Celeritas developers.
// See the top-level COPYRIGHT file for details.
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
//---------------------------------------------------------------------------//
//! \file celeritas/optical/detail/PreGenGatherAction.hh
//---------------------------------------------------------------------------//
#pragma once
#include <memory>
#include <vector>
#include "corecel/Macros.hh"
#include "corecel/data/Collection.hh"
#include "celeritas/global/ActionInterface.hh"
namespace celeritas
{
namespace detail
{
struct OpticalGenStorage;
//---------------------------------------------------------------------------//
/*!
* Generate optical distribution data.
*/
class PreGenGatherAction final : public ExplicitCoreActionInterface
{
public:
//!@{
//! \name Type aliases
using SPGenStorage = std::shared_ptr<detail::OpticalGenStorage>;
//!@}
public:
// Construct with action ID and storage
PreGenGatherAction(ActionId id, SPGenStorage storage);
// Launch kernel with host data
void execute(CoreParams const&, CoreStateHost&) const final;
// Launch kernel with device data
void execute(CoreParams const&, CoreStateDevice&) const final;
//! ID of the model
ActionId action_id() const final { return id_; }
//! Short name for the action
std::string_view label() const final
{
return "optical-pre-generator-pre";
}
// Name of the action (for user output)
std::string_view description() const final;
//! Dependency ordering of the action
ActionOrder order() const final { return ActionOrder::pre; }
private:
//// DATA ////
ActionId id_;
SPGenStorage storage_;
};
//---------------------------------------------------------------------------//
} // namespace detail
} // namespace celeritas