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>
34 template <std::
size_t buffer_size>
class Probes
37 template <
typename Space>
39 Kokkos::View<double[buffer_size], Kokkos::LayoutRight, Space>;
42 [[nodiscard]] KOKKOS_INLINE_FUNCTION
bool set(
double val)
const;
48 [[nodiscard]] std::span<const
double>
get() const;
63 using MapProbes = std::unordered_map<ProbeType, ProbeAutogeneratedBuffer>;
71 if (AutoGenerated::FlagCompileTime::use_probe)
82 template <std::
size_t buffer_size>
88 if ((i < buffer_size) &&
active)
109 template <std::
size_t buffer_size>
116 Kokkos::deep_copy(
buffer, 0.);
120 template <std::
size_t buffer_size>
Class to store time event as bulk storage.
Definition probe.hpp:35
Kokkos::View< uint64_t, Kokkos::SharedSpace > internal_counter
Definition probe.hpp:56
Probes()
Definition probe.hpp:69
buffer_type< Kokkos::DefaultHostExecutionSpace > host_buffer
Definition probe.hpp:57
bool need_export() const noexcept
Definition probe.hpp:110
std::span< const double > get() const
Kokkos::View< double[buffer_size], Kokkos::LayoutRight, Space > buffer_type
Definition probe.hpp:38
void clear()
Definition probe.hpp:114
buffer_type< Kokkos::DefaultExecutionSpace > buffer
Definition probe.hpp:55
KOKKOS_INLINE_FUNCTION bool set(double val) const
Definition probe.hpp:83
bool active
Definition probe.hpp:53
Namespace that contains classes and structures related to simulation handling.
Definition host_specific.hpp:14
ProbeType
Definition probe.hpp:24
@ LeavingTime
Definition probe.hpp:25
@ DivisionTime
Definition probe.hpp:26
Probes< AutoGenerated::probe_buffer_size > ProbeAutogeneratedBuffer
Definition probe.hpp:61
std::unordered_map< ProbeType, ProbeAutogeneratedBuffer > MapProbes
Definition probe.hpp:63