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 <traits/Kokkos_IterationPatternTrait.hpp>
18 template <u
int64_t Nd, FloatingPo
intType F>
20 template <FloatingPo
intType F>
23 using HostSpace = Kokkos::DefaultHostExecutionSpace;
28using kernelMT = Kokkos::MemoryTraits<Kokkos::MemoryTraitsFlags::RandomAccess
29 | Kokkos::MemoryTraitsFlags::Atomic
30 | Kokkos::MemoryTraitsFlags::Restrict>;
32using kernelContribution
33 = Kokkos::View<float**, Kokkos::LayoutLeft, MC::ComputeSpace, kernelMT>;
37 template <
typename ExecSpace>
38 using gen_pool_type = Kokkos::Random_XorShift1024_Pool<ExecSpace>;
44 using restrict_mt = Kokkos::MemoryTraits<Kokkos::MemoryTraitsFlags::Restrict>;
53 template <
typename Exec>
54 using ParticleAgesBase
55 = Kokkos::View<double* [2], Kokkos::LayoutLeft, Exec>;
80 View<Kokkos::Experimental::half_t**, Kokkos::LayoutRight, ComputeSpace>;
82 template <
typename MemorySpace>
84 = Kokkos::View<double**, Kokkos::LayoutRight, MemorySpace>;
87 = Kokkos::Subview<ParticlePropertyViewType<ComputeSpace>,
88 decltype(Kokkos::ALL),
92 kernelContribution()));
95 = Kokkos::View<
const double**,
98 Kokkos::MemoryTraits<Kokkos::RandomAccess>>;
102 template <
class ExecSpace,
bool is_const>
105 Kokkos::View<
const double*,
107 Kokkos::MemoryTraits<Kokkos::RandomAccess>>,
108 Kokkos::View<double*, ExecSpace>>;
110 template <
class ExecSpace,
bool is_const>
113 Kokkos::View<
const double*,
116 Kokkos::MemoryTraits<Kokkos::RandomAccess>>,
117 Kokkos::View<double*, Kokkos::LayoutLeft, ExecSpace>>;
119 template <
bool is_const>
122 Kokkos::View<const LeavingFlow*, Kokkos::SharedHostPinnedSpace>,
123 Kokkos::View<LeavingFlow*, Kokkos::SharedHostPinnedSpace>>;
125 template <
class ExecSpace,
bool is_const>
128 Kokkos::View<
const double**,
131 Kokkos::MemoryTraits<Kokkos::RandomAccess>>,
132 Kokkos::View<double**, Kokkos::LayoutRight, ExecSpace>>;
134 template <
class ExecSpace,
bool is_const>
137 Kokkos::View<
const std::size_t**,
140 Kokkos::MemoryTraits<Kokkos::RandomAccess>>,
141 Kokkos::View<std::size_t**, Kokkos::LayoutRight, ExecSpace>>;
Namespace that contains classes and structures related to Monte Carlo (MC) simulations.
Definition alias.hpp:15
Kokkos::Subview< KernelConcentrationType, int, decltype(Kokkos::ALL)> LocalConcentration
Definition alias.hpp:95
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:130
Kokkos::View< double *, ComputeSpace > ParticleWeigths
Definition alias.hpp:75
Kokkos::DefaultHostExecutionSpace HostSpace
Definition alias.hpp:23
Kokkos::View< Status *, ComputeSpace > ParticleStatus
Definition alias.hpp:74
Kokkos::View< uint64_t *, ComputeSpace > ParticlePositions
Definition alias.hpp:73
Kokkos::MemoryTraits< Kokkos::MemoryTraitsFlags::Restrict > restrict_mt
Definition alias.hpp:43
decltype(Kokkos::Experimental::create_scatter_view( kernelContribution())) ContributionView
Definition alias.hpp:88
Kokkos::Subview< ParticlePropertyViewType< ComputeSpace >, decltype(Kokkos::ALL), std::size_t > PropertySubViewtype
Definition alias.hpp:84
Status
Definition alias.hpp:58
@ Dead
Definition alias.hpp:62
@ Division
Definition alias.hpp:60
@ Idle
Definition alias.hpp:59
@ Exit
Definition alias.hpp:61
ParticleAgesBase< ComputeSpace > ParticleAges
Definition alias.hpp:76
std::conditional_t< is_const, Kokkos::View< const double *, ExecSpace, Kokkos::MemoryTraits< Kokkos::RandomAccess > >, Kokkos::View< double *, ExecSpace > > VolumeView
Definition alias.hpp:98
gen_pool_type< Kokkos::DefaultExecutionSpace > pool_type
Definition alias.hpp:39
pool_type::generator_type generator_type
Definition alias.hpp:41
Kokkos::DefaultExecutionSpace ComputeSpace
Definition alias.hpp:22
Kokkos::View< const double **, Kokkos::LayoutLeft, ComputeSpace, Kokkos::MemoryTraits< Kokkos::RandomAccess > > KernelConcentrationType
Definition alias.hpp:91
std::conditional_t< is_const, Kokkos::View< const LeavingFlow *, Kokkos::SharedHostPinnedSpace >, Kokkos::View< LeavingFlow *, Kokkos::SharedHostPinnedSpace > > LeavingFlowView
Definition alias.hpp:115
Kokkos:: View< Kokkos::Experimental::half_t **, Kokkos::LayoutRight, ComputeSpace > ParticleSamples
Definition alias.hpp:78
Kokkos::View< double **, Kokkos::LayoutRight, MemorySpace > ParticlePropertyViewType
Definition alias.hpp:82
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:121
Kokkos::View< F *[Nd], Kokkos::LayoutRight > ParticlesModel
Definition alias.hpp:19
Kokkos::View< F **, Kokkos::LayoutRight > DynParticlesModel
Definition alias.hpp:21
Kokkos::Random_XorShift1024_Pool< ExecSpace > gen_pool_type
Definition alias.hpp:37
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:106
int end
Definition alias.hpp:68
int begin
Definition alias.hpp:67
Store position and value of volumic flow at outlet.
Definition domain.hpp:18