BioCMAMC-ST
alias.hpp
1#ifndef __MC__ALIAS_HPP__
2#define __MC__ALIAS_HPP__
3
4#include <Kokkos_Core_fwd.hpp>
5#include <common/traits.hpp>
6#include <Kokkos_ScatterView.hpp>
7
8namespace MC
9{
10 enum class Status : int
11 {
12 Idle = 0,
14 Exit,
15 Dead,
16 };
17
18 using ComputeSpace = Kokkos::DefaultExecutionSpace;
19 using ParticlePositions = Kokkos::View<uint64_t*, ComputeSpace>;
20 using ParticleStatus = Kokkos::View<Status*, ComputeSpace>;
21 using ParticleWeigths = Kokkos::View<double*, ComputeSpace>;
22 using ParticleAges = Kokkos::View<double*[2], Kokkos::LayoutLeft,ComputeSpace>;
23
24 template <typename MemorySpace>
25 using ParticlePropertyViewType = Kokkos::View<double**, Kokkos::LayoutRight, MemorySpace>;
26
28 Kokkos::Subview<ParticlePropertyViewType<ComputeSpace>, decltype(Kokkos::ALL), std::size_t>;
29
30 // Kernel alias
32 Kokkos::Experimental::ScatterView<double**, Kokkos::LayoutRight>;
35 // using access_type = decltype(std::declval<ContributionView>().access());
36
37
38 using KernelConcentrationType = Kokkos::View<const double**,
39 Kokkos::LayoutLeft,
40 ComputeSpace,
41 Kokkos::MemoryTraits<Kokkos::RandomAccess>>;
42 using LocalConcentration = Kokkos::Subview<KernelConcentrationType, int, decltype(Kokkos::ALL)>;
43
44
45
46}; // namespace MC
47// FIXME
48template <typename Space>
49using ConstNeighborsView = Kokkos::View<const std::size_t**,
50 Kokkos::LayoutRight,
51 Space,
52 Kokkos::MemoryTraits<Kokkos::RandomAccess>>;
53using kernelContribution = Kokkos::View<double**, Kokkos::LayoutRight, MC::ComputeSpace>;
54
55#endif
Namespace that contains classes and structures related to Monte Carlo (MC) simulations.
Definition alias.hpp:9
Kokkos::Subview< KernelConcentrationType, int, decltype(Kokkos::ALL)> LocalConcentration
Definition alias.hpp:42
Kokkos::View< double *, ComputeSpace > ParticleWeigths
Definition alias.hpp:21
Kokkos::View< Status *, ComputeSpace > ParticleStatus
Definition alias.hpp:20
Kokkos::View< double *[2], Kokkos::LayoutLeft, ComputeSpace > ParticleAges
Definition alias.hpp:22
Kokkos::View< uint64_t *, ComputeSpace > ParticlePositions
Definition alias.hpp:19
Kokkos::Experimental::ScatterView< double **, Kokkos::LayoutRight > ContributionView
Definition alias.hpp:31
Status
Definition alias.hpp:11
Kokkos::View< double **, Kokkos::LayoutRight, MemorySpace > ParticlePropertyViewType
Definition alias.hpp:25
Kokkos::Subview< ParticlePropertyViewType< ComputeSpace >, decltype(Kokkos::ALL), std::size_t > PropertySubViewtype
Definition alias.hpp:27
Kokkos::View< const double **, Kokkos::LayoutLeft, ComputeSpace, Kokkos::MemoryTraits< Kokkos::RandomAccess > > KernelConcentrationType
Definition alias.hpp:38