BioCMAMC-ST
move_info.hpp
1#ifndef __SIMULATION__MOVE_INFO_HPP__
2#define __SIMULATION__MOVE_INFO_HPP__
3
4#include <Kokkos_Core_fwd.hpp>
5#include <cma_utils/cache_hydro_state.hpp>
6#include <mc/alias.hpp>
7#include <simulation/alias.hpp>
8
10{
11
13 {
14 std::size_t index;
15 double flow;
16 };
17
18 template <typename ExecSpace> struct MoveInfo
19 {
20 ConstNeighborsView<ExecSpace> neighbors;
23 // LeavingFlowType leaving_flow;
24 // LeavingFlowIndexType index_leaving_flow;
25 Kokkos::View<LeavingFlow*,
26 Kokkos::SharedHostPinnedSpace,
27 Kokkos::MemoryTraits<Kokkos::MemoryTraitsFlags::Aligned |
28 Kokkos::MemoryTraitsFlags::Restrict>>
30 Kokkos::View<double*, ExecSpace> liquid_volume;
31
33 {
34 }
35
36 MoveInfo(const std::size_t n_compartments, const std::size_t n_flows)
37 : diag_transition("diag_transition", n_compartments),
38 leaving_flow("leaving_flow", n_flows),
39 liquid_volume("liquid_volume", n_compartments)
40
41 {
42 }
43
44 void
45 set_flow(const std::size_t i, const std::size_t i_flow, const double flow)
46 {
47 leaving_flow(i) = {i_flow, flow};
48 // Kokkos::deep_copy(leaving_flow(i), LeavingFlow{i_flow, flow});
49 }
50 };
51} // namespace Simulation::KernelInline
52#endif
Definition kernels.hpp:9
Kokkos::View< double *, Kokkos::LayoutLeft, ExecSpace, Kokkos::MemoryTraits< Kokkos::RandomAccess > > DiagonalView
Definition alias.hpp:14
Kokkos::View< const double **, Kokkos::LayoutRight, Space, Kokkos::MemoryTraits< Kokkos::RandomAccess > > CumulativeProbabilityView
Definition alias.hpp:20
Definition move_info.hpp:13
double flow
Definition move_info.hpp:15
std::size_t index
Definition move_info.hpp:14
void set_flow(const std::size_t i, const std::size_t i_flow, const double flow)
Definition move_info.hpp:45
MoveInfo()
Definition move_info.hpp:32
Kokkos::View< LeavingFlow *, Kokkos::SharedHostPinnedSpace, Kokkos::MemoryTraits< Kokkos::MemoryTraitsFlags::Aligned|Kokkos::MemoryTraitsFlags::Restrict > > leaving_flow
Definition move_info.hpp:29
DiagonalView< ExecSpace > diag_transition
Definition move_info.hpp:21
MoveInfo(const std::size_t n_compartments, const std::size_t n_flows)
Definition move_info.hpp:36
CumulativeProbabilityView< ExecSpace > cumulative_probability
Definition move_info.hpp:22
ConstNeighborsView< ExecSpace > neighbors
Definition move_info.hpp:20
Kokkos::View< double *, ExecSpace > liquid_volume
Definition move_info.hpp:30