BioCMAMC-ST
Simulation::KernelInline Namespace Reference

Classes

struct  CycleFunctor
struct  CycleFunctors
class  CycleReducer
struct  CycleReduceType
struct  LeavingFlow
struct  MoveFunctor
struct  MoveInfo
struct  TagContribution
struct  TagCycle
struct  TagLeave
struct  TagMove

Typedefs

template<typename Space>
using cycle_reducer_view_type
template<typename Space>
using move_reducer_view_type = Kokkos::View<std::size_t, Space>

Functions

KOKKOS_INLINE_FUNCTION std::size_t __find_next_compartment (const bool do_serch, const ConstNeighborsView< ComputeSpace > &neighbors, const CumulativeProbabilityView< ComputeSpace > &cumulative_probability, const std::size_t i_compartment, const double random_number)
 probably overkill binary search to find next compartment
template<typename FastSample = int>
KOKKOS_INLINE_FUNCTION bool probability_leaving (float random_number, double volume, double flow, double dt)
template<>
KOKKOS_INLINE_FUNCTION bool probability_leaving< void > (float random_number, double volume, double flow, double dt)

Variables

constexpr bool enable_leave = true
constexpr bool disable_leave = false
constexpr bool disable_move = false
constexpr bool enable_move = true
static constexpr bool _use_kokkos_log = true

Typedef Documentation

◆ cycle_reducer_view_type

template<typename Space>
using Simulation::KernelInline::cycle_reducer_view_type
Initial value:
Kokkos::View< value_type, Space > result_view_type
Definition model_kernel.hpp:48

◆ move_reducer_view_type

template<typename Space>
using Simulation::KernelInline::move_reducer_view_type = Kokkos::View<std::size_t, Space>

Function Documentation

◆ __find_next_compartment()

KOKKOS_INLINE_FUNCTION std::size_t Simulation::KernelInline::__find_next_compartment ( const bool do_serch,
const ConstNeighborsView< ComputeSpace > & neighbors,
const CumulativeProbabilityView< ComputeSpace > & cumulative_probability,
const std::size_t i_compartment,
const double random_number )

probably overkill binary search to find next compartment

Compared with first impl it might not change anything Binary seach is O(log(n)) vs first linear is (n)

Here is the caller graph for this function:

◆ probability_leaving()

template<typename FastSample = int>
KOKKOS_INLINE_FUNCTION bool Simulation::KernelInline::probability_leaving ( float random_number,
double volume,
double flow,
double dt )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ probability_leaving< void >()

template<>
KOKKOS_INLINE_FUNCTION bool Simulation::KernelInline::probability_leaving< void > ( float random_number,
double volume,
double flow,
double dt )
Here is the caller graph for this function:

Variable Documentation

◆ _use_kokkos_log

bool Simulation::KernelInline::_use_kokkos_log = true
staticconstexpr

◆ disable_leave

bool Simulation::KernelInline::disable_leave = false
constexpr

◆ disable_move

bool Simulation::KernelInline::disable_move = false
constexpr

◆ enable_leave

bool Simulation::KernelInline::enable_leave = true
constexpr

◆ enable_move

bool Simulation::KernelInline::enable_move = true
constexpr