1#ifndef __UTILS_SERDES_HPP__
2#define __UTILS_SERDES_HPP__
5#include <mc/traits.hpp>
25 static constexpr std::string_view
name =
"simple";
37 KOKKOS_INLINE_FUNCTION
static double mass([[maybe_unused]] std::size_t idx,
46 [[maybe_unused]] std::size_t idx,
54 KOKKOS_INLINE_FUNCTION
static void
56 [[maybe_unused]] std::size_t idx,
57 [[maybe_unused]] std::size_t idx2,
63 KOKKOS_INLINE_FUNCTION
static void
65 [[maybe_unused]] std::size_t position,
66 [[maybe_unused]]
double weight,
Kokkos::Random_XorShift1024_Pool< Kokkos::DefaultExecutionSpace > pool_type
Definition prng.hpp:17
Model type.
Definition traits.hpp:130
Kokkos::Subview< KernelConcentrationType, int, decltype(Kokkos::ALL)> LocalConcentration
Definition alias.hpp:42
Kokkos::Experimental::ScatterView< double **, Kokkos::LayoutRight > ContributionView
Definition alias.hpp:31
Kokkos::View< F *[Nd]> ParticlesModel
Definition traits.hpp:34
Status
Definition alias.hpp:11
Definition serdes_class.hpp:10
static constexpr std::string_view name
Definition serdes_class.hpp:25
static constexpr std::size_t n_var
Definition serdes_class.hpp:24
static KOKKOS_INLINE_FUNCTION void init(const MC::KPRNG::pool_type &random_pool, std::size_t idx, const SelfParticle &arr)
Definition serdes_class.hpp:30
particle_var
Definition serdes_class.hpp:17
static KOKKOS_INLINE_FUNCTION MC::Status update(const MC::KPRNG::pool_type &random_pool, FloatType d_t, std::size_t idx, const SelfParticle &arr, const MC::LocalConcentration &c)
Definition serdes_class.hpp:44
std::nullopt_t Config
Definition serdes_class.hpp:14
static KOKKOS_INLINE_FUNCTION void division(const MC::KPRNG::pool_type &random_pool, std::size_t idx, std::size_t idx2, const SelfParticle &arr, const SelfParticle &buffer_arr)
Definition serdes_class.hpp:55
float FloatType
Definition serdes_class.hpp:13
static KOKKOS_INLINE_FUNCTION void contribution(std::size_t idx, std::size_t position, double weight, const SelfParticle &arr, const MC::ContributionView &contributions)
Definition serdes_class.hpp:64
MC::ParticlesModel< Self::n_var, Self::FloatType > SelfParticle
Definition serdes_class.hpp:26
std::true_type uniform_weight
Definition serdes_class.hpp:11
static KOKKOS_INLINE_FUNCTION double mass(std::size_t idx, const SelfParticle &arr)
Definition serdes_class.hpp:37
MODEL_CONSTANT FloatType a_i
Definition serdes_class.hpp:28