4#include <mc/domain.hpp> 
    5#include <mc/events.hpp> 
    6#include <mc/particles_container.hpp> 
    7#include <mc/prng/prng.hpp> 
    8#include <mc/traits.hpp> 
   10#include <variant_model.hpp> 
   15  operator()(
const Kokkos::TeamPolicy<ComputeSpace>::member_type& team_handle,
 
   16             int& dead_count)
 const 
 
 
   36  template <
typename FunctorType, 
typename Tag = 
void>
 
   37  Kokkos::TeamPolicy<ComputeSpace, Tag>
 
   38  get_policy(
const FunctorType& f, std::size_t range, 
bool reduce = 
false)
 
   42    Kokkos::TeamPolicy<> _policy;
 
   44    const char* env_team_size = std::getenv(
"BIOMC_TEAM_SIZE");
 
   46    int recommended_team_size = _policy.team_size_recommended(
 
   48    if (env_team_size != 
nullptr)
 
   50      recommended_team_size = std::stoi(env_team_size);
 
   53    int league_size = (
static_cast<int>(range) + recommended_team_size - 1) /
 
   54                      recommended_team_size;
 
   56    return Kokkos::TeamPolicy<ComputeSpace, Tag>(league_size,
 
   57                                                 recommended_team_size);
 
 
   60  template <
typename Tag = 
void>
 
   63    const char* env_team_size = std::getenv(
"BIOMC_LEAGUE_SIZE");
 
   66    if (env_team_size != 
nullptr)
 
   68      league_size = std::stoi(env_team_size);
 
   71    return Kokkos::TeamPolicy<ComputeSpace, Tag>(league_size, Kokkos::AUTO);
 
 
Utilities and wrap around kokkos random generator.
Definition prng.hpp:31
Represents the spatial domain where Monte Carlo particles can exist.
Definition domain.hpp:40
Namespace that contains classes and structures related to Monte Carlo (MC) simulations.
Definition alias.hpp:9
Kokkos::TeamPolicy< ComputeSpace, Tag > get_policy(const FunctorType &f, std::size_t range, bool reduce=false)
Definition unit.hpp:38
Kokkos::TeamPolicy< ComputeSpace, Tag > get_policy_team()
Definition unit.hpp:61
Use to count events that occurs during Monte-Carlo processing cycles.
Definition events.hpp:44
MonteCarloUnit(const MonteCarloUnit &)=delete
Prevent copying of the MonteCarloUnit.
std::vector< uint64_t > getRepartition() const
Definition unit.cpp:163
ReactorDomain domain
Represents the domain within which the simulation occurs.
Definition unit.hpp:86
KPRNG rng
Random number generator used for Monte Carlo methods.
Definition unit.hpp:93
double init_weight
Initial weight or factor used in the simulation.
Definition unit.hpp:94
void serialize(Archive &ar)
Definition unit.hpp:112
uint64_t n_particle() const
Definition unit.cpp:156
AutoGenerated::ContainerVariant container
Definition unit.hpp:91
MonteCarloUnit & operator=(const MonteCarloUnit &)=delete
Prevent copying of the MonteCarloUnit.
EventContainer events
Container to manage and store simulation events.
Definition unit.hpp:84
MonteCarloUnit & operator=(MonteCarloUnit &&) noexcept=default
Allow moving of the MonteCarloUn.
KOKKOS_FUNCTION void operator()(const Kokkos::TeamPolicy< ComputeSpace >::member_type &team_handle, int &dead_count) const
Definition unit.hpp:15