1#ifndef __MC__ALIAS_HPP__
2#define __MC__ALIAS_HPP__
4#include <Kokkos_Core_fwd.hpp>
5#include <Kokkos_Random.hpp>
6#include <Kokkos_ScatterView.hpp>
7#include <common/traits.hpp>
8#include <decl/Kokkos_Declare_OPENMP.hpp>
9#include <traits/Kokkos_IterationPatternTrait.hpp>
18 using HostSpace = Kokkos::DefaultHostExecutionSpace;
23 template <u
int64_t Nd, FloatingPo
intType F>
53 = Kokkos::View<F* [Nd],
54 ComputeSpace::array_layout,
56 Kokkos::MemoryTraits<Kokkos::MemoryTraitsFlags::Restrict>>;
66 template <u
int64_t Nc, FloatingPo
intType F>
68 = Kokkos::View<F* [Nc],
69 ComputeSpace::array_layout,
71 Kokkos::MemoryTraits<Kokkos::MemoryTraitsFlags::Restrict>>;
73 template <FloatingPo
intType F>
76 ComputeSpace::array_layout,
78 Kokkos::MemoryTraits<Kokkos::MemoryTraitsFlags::Restrict>>;
80 template <FloatingPo
intType F>
83 ComputeSpace::array_layout,
85 Kokkos::MemoryTraits<Kokkos::MemoryTraitsFlags::Restrict>>;
91using kernelMT = Kokkos::MemoryTraits<Kokkos::MemoryTraitsFlags::RandomAccess
92 | Kokkos::MemoryTraitsFlags::Atomic
93 | Kokkos::MemoryTraitsFlags::Restrict>;
97 template <
typename ExecSpace>
104 using restrict_mt = Kokkos::MemoryTraits<Kokkos::MemoryTraitsFlags::Restrict>;
119 template <
typename Exec>
120 using ParticleAgesBase
121 = Kokkos::View<float* [2], Kokkos::LayoutLeft, Exec>;
142 template <FloatingPo
intType ftype>
152 = Kokkos::View<float**, Kokkos::LayoutRight, ComputeSpace>;
154 template <
typename MemorySpace>
156 = Kokkos::View<double**, Kokkos::LayoutRight, MemorySpace>;
159 = Kokkos::Subview<ParticlePropertyViewType<ComputeSpace>,
160 decltype(Kokkos::ALL),
164 = Kokkos::View<float**, Kokkos::LayoutLeft, MC::ComputeSpace, kernelMT>;
166 using ContributionView =
decltype(Kokkos::Experimental::create_scatter_view(
170 = Kokkos::View<
const double**,
173 Kokkos::MemoryTraits<Kokkos::RandomAccess>>;
177 template <
class ExecSpace,
bool is_const>
180 Kokkos::View<
const double*,
182 Kokkos::MemoryTraits<Kokkos::RandomAccess>>,
183 Kokkos::View<double*, ExecSpace>>;
185 template <
class ExecSpace,
bool is_const>
188 Kokkos::View<
const double*,
191 Kokkos::MemoryTraits<Kokkos::RandomAccess>>,
192 Kokkos::View<double*, Kokkos::LayoutLeft, ExecSpace>>;
194 template <
bool is_const>
197 Kokkos::View<const LeavingFlow*, Kokkos::SharedHostPinnedSpace>,
198 Kokkos::View<LeavingFlow*, Kokkos::SharedHostPinnedSpace>>;
201 template <
class ExecSpace,
bool is_const>
204 Kokkos::View<
const double**,
207 Kokkos::MemoryTraits<Kokkos::RandomAccess>>,
208 Kokkos::View<double**, Kokkos::LayoutRight, ExecSpace>>;
210 template <
class ExecSpace,
bool is_const>
213 Kokkos::View<
const std::size_t**,
216 Kokkos::MemoryTraits<Kokkos::RandomAccess>>,
217 Kokkos::View<std::size_t**, Kokkos::LayoutRight, ExecSpace>>;
Namespace that contains classes and structures related to Monte Carlo (MC) simulations.
Definition alias.hpp:16
std::conditional_t< is_const, Kokkos::View< const std::size_t **, Kokkos::LayoutRight, ExecSpace, Kokkos::MemoryTraits< Kokkos::RandomAccess > >, Kokkos::View< std::size_t **, Kokkos::LayoutRight, ExecSpace > > NeighborsView
Definition alias.hpp:206
Kokkos::DefaultHostExecutionSpace HostSpace
Definition alias.hpp:18
Kokkos::View< float **, Kokkos::LayoutRight, ComputeSpace > ParticleSamples
Definition alias.hpp:151
Kokkos::View< Status *, ComputeSpace > ParticleStatus
Definition alias.hpp:141
Kokkos::View< uint64_t *, ComputeSpace > ParticlePositions
Definition alias.hpp:140
Kokkos::MemoryTraits< Kokkos::MemoryTraitsFlags::Restrict > restrict_mt
Definition alias.hpp:104
decltype(Kokkos::Experimental::create_scatter_view( kernelContribution())) ContributionView
Definition alias.hpp:162
Kokkos::Subview< ParticlePropertyViewType< ComputeSpace >, decltype(Kokkos::ALL), std::size_t > PropertySubViewtype
Definition alias.hpp:156
Kokkos::View< F **, ComputeSpace::array_layout, ComputeSpace, Kokkos::MemoryTraits< Kokkos::MemoryTraitsFlags::Restrict > > DynParticlesContribs
Definition alias.hpp:78
Status
Definition alias.hpp:125
@ Dead
Definition alias.hpp:129
@ Division
Definition alias.hpp:127
@ Idle
Definition alias.hpp:126
@ Exit
Definition alias.hpp:128
ParticleAgesBase< ComputeSpace > ParticleAges
Definition alias.hpp:144
std::conditional_t< is_const, Kokkos::View< const double *, ExecSpace, Kokkos::MemoryTraits< Kokkos::RandomAccess > >, Kokkos::View< double *, ExecSpace > > VolumeView
Definition alias.hpp:173
gen_pool_type< Kokkos::DefaultExecutionSpace > pool_type
Definition alias.hpp:100
ComputeSpace::array_layout ComputeLayout
Definition alias.hpp:20
pool_type::generator_type generator_type
Definition alias.hpp:102
Kokkos::View< ftype *, ComputeSpace > ParticleWeigths
Definition alias.hpp:143
Kokkos::View< float **, Kokkos::LayoutLeft, MC::ComputeSpace, kernelMT > kernelContribution
Definition alias.hpp:160
KernelConcentrationType LocalConcentration
Definition alias.hpp:170
Kokkos::DefaultExecutionSpace ComputeSpace
Definition alias.hpp:17
Kokkos::View< const double **, Kokkos::LayoutLeft, ComputeSpace, Kokkos::MemoryTraits< Kokkos::RandomAccess > > KernelConcentrationType
Definition alias.hpp:165
std::conditional_t< is_const, Kokkos::View< const LeavingFlow *, Kokkos::SharedHostPinnedSpace >, Kokkos::View< LeavingFlow *, Kokkos::SharedHostPinnedSpace > > LeavingFlowView
Definition alias.hpp:190
Kokkos::View< double **, Kokkos::LayoutRight, MemorySpace > ParticlePropertyViewType
Definition alias.hpp:154
Kokkos::View< F *[Nc], ComputeSpace::array_layout, ComputeSpace, Kokkos::MemoryTraits< Kokkos::MemoryTraitsFlags::Restrict > > ParticlesContribs
Definition alias.hpp:66
Kokkos::View< F *[Nd], ComputeSpace::array_layout, ComputeSpace, Kokkos::MemoryTraits< Kokkos::MemoryTraitsFlags::Restrict > > ParticlesModel
Definition alias.hpp:52
std::conditional_t< is_const, Kokkos::View< const double **, Kokkos::LayoutRight, ExecSpace, Kokkos::MemoryTraits< Kokkos::RandomAccess > >, Kokkos::View< double **, Kokkos::LayoutRight, ExecSpace > > CumulativeProbabilityView
Definition alias.hpp:197
Kokkos::Random_XorShift1024_Pool< ExecSpace > gen_pool_type
Definition alias.hpp:98
std::conditional_t< is_const, Kokkos::View< const double *, Kokkos::LayoutLeft, ExecSpace, Kokkos::MemoryTraits< Kokkos::RandomAccess > >, Kokkos::View< double *, Kokkos::LayoutLeft, ExecSpace > > DiagonalView
Definition alias.hpp:181
Kokkos::View< F **, ComputeSpace::array_layout, ComputeSpace, Kokkos::MemoryTraits< Kokkos::MemoryTraitsFlags::Restrict > > DynParticlesModel
Definition alias.hpp:72
int end
Definition alias.hpp:135
int begin
Definition alias.hpp:134
Store position and value of volumic flow at outlet.
Definition domain.hpp:18