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
23 template <typename MemorySpace>
24 using ParticlePropertyViewType = Kokkos::View<double**, Kokkos::LayoutRight, MemorySpace>;
25
27 Kokkos::Subview<ParticlePropertyViewType<ComputeSpace>, decltype(Kokkos::ALL), std::size_t>;
28
29 // Kernel alias
31 Kokkos::Experimental::ScatterView<double**, Kokkos::LayoutRight>;
34 // using access_type = decltype(std::declval<ContributionView>().access());
35
36
37 using KernelConcentrationType = Kokkos::View<const double**,
38 Kokkos::LayoutLeft,
39 ComputeSpace,
40 Kokkos::MemoryTraits<Kokkos::RandomAccess>>;
41 using LocalConcentration = Kokkos::Subview<KernelConcentrationType, int, decltype(Kokkos::ALL)>;
42
43
44
45}; // namespace MC
46// FIXME
47template <typename Space>
48using ConstNeighborsView = Kokkos::View<const std::size_t**,
49 Kokkos::LayoutRight,
50 Space,
51 Kokkos::MemoryTraits<Kokkos::RandomAccess>>;
52using kernelContribution = Kokkos::View<double**, Kokkos::LayoutRight, MC::ComputeSpace>;
53
54#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:41
Kokkos::View< double *, ComputeSpace > ParticleWeigths
Definition alias.hpp:21
Kokkos::View< Status *, ComputeSpace > ParticleStatus
Definition alias.hpp:20
Kokkos::View< uint64_t *, ComputeSpace > ParticlePositions
Definition alias.hpp:19
Kokkos::Experimental::ScatterView< double **, Kokkos::LayoutRight > ContributionView
Definition alias.hpp:30
Status
Definition alias.hpp:11
Kokkos::View< double **, Kokkos::LayoutRight, MemorySpace > ParticlePropertyViewType
Definition alias.hpp:24
Kokkos::Subview< ParticlePropertyViewType< ComputeSpace >, decltype(Kokkos::ALL), std::size_t > PropertySubViewtype
Definition alias.hpp:26
Kokkos::View< const double **, Kokkos::LayoutLeft, ComputeSpace, Kokkos::MemoryTraits< Kokkos::RandomAccess > > KernelConcentrationType
Definition alias.hpp:37