1#ifndef __CORE__PROBE_HPP__
2#define __CORE__PROBE_HPP__
4#include "Kokkos_Core_fwd.hpp"
5#include <Kokkos_Core.hpp>
6#include <biocma_cst_config.hpp>
9#include <unordered_map>
33 template <std::
size_t buffer_size>
class Probes
36 template <
typename Space>
37 using buffer_type = Kokkos::View<double[buffer_size], Kokkos::LayoutRight, Space>;
40 [[nodiscard]] KOKKOS_INLINE_FUNCTION
bool set(
double val)
const;
46 [[nodiscard]] std::span<const
double>
get() const;
61 using MapProbes = std::unordered_map<ProbeType, ProbeAutogeneratedBuffer>;
69 if (AutoGenerated::FlagCompileTime::use_probe)
79 template <std::
size_t buffer_size>
85 if ((i < buffer_size) &&
active)
111 Kokkos::deep_copy(
buffer, 0.);
115 template <std::
size_t buffer_size>
Class to store time event as bulk storage.
Definition probe.hpp:34
Kokkos::View< uint64_t, Kokkos::SharedSpace > internal_counter
Definition probe.hpp:54
Probes()
Definition probe.hpp:67
buffer_type< Kokkos::DefaultHostExecutionSpace > host_buffer
Definition probe.hpp:55
bool need_export() const noexcept
Definition probe.hpp:105
std::span< const double > get() const
void clear()
Definition probe.hpp:109
buffer_type< Kokkos::DefaultExecutionSpace > buffer
Definition probe.hpp:53
Kokkos::View< double[buffer_size], Kokkos::LayoutRight, Space > buffer_type
Definition probe.hpp:37
KOKKOS_INLINE_FUNCTION bool set(double val) const
Definition probe.hpp:80
bool active
Definition probe.hpp:51
Namespace that contains classes and structures related to simulation handling.
Definition host_specific.hpp:13
ProbeType
Definition probe.hpp:23
@ LeavingTime
Definition probe.hpp:24
@ DivisionTime
Definition probe.hpp:25
Probes< AutoGenerated::probe_buffer_size > ProbeAutogeneratedBuffer
Definition probe.hpp:59
std::unordered_map< ProbeType, ProbeAutogeneratedBuffer > MapProbes
Definition probe.hpp:61