BioCMAMC-ST
execinfo.hpp
1#ifndef __EXEC_INFO_HPP__
2#define __EXEC_INFO_HPP__
3
4#include <biocma_cst_config.hpp>
5#include <common/has_serialize.hpp>
6#include <cstddef>
7#include <cstdint>
8#include <ostream>
9#include <string>
10
11// clang-format off
13{
14 std::size_t m_p_p_team_model = AutoGenerated::Kernels::particle_per_team_cycle;
15 std::size_t m_p_p_team_contribs = AutoGenerated::Kernels::particle_per_team_contributions;
16 std::size_t m_p_p_team_move = AutoGenerated::Kernels::particle_per_team_move;
17 std::size_t m_p_p_team_leave = AutoGenerated::Kernels::particle_per_team_leave;
18};
19// clang-format on
20
22{
23 uint64_t run_id;
24 uint32_t n_rank;
25 uint32_t current_rank;
27 bool verbose;
29
30 template <class Archive, typename T = void>
31 std::enable_if_t<AutoGenerated::FlagCompileTime::use_cereal_serde, T>
32 serialize(Archive& ar)
33 {
34 // Do not save kernel_options because options can change accross run and
35 // also overwritten before run
37 }
38
39 static std::string get_version();
40};
41
42inline std::ostream&
43operator<<(std::ostream& stream, const ExecInfo& obj)
44{
45 stream << obj.run_id << "\t" << obj.n_rank << "\t" << obj.thread_per_process
46 << "\t";
47 return stream;
48}
49
50#endif //__EXEC_INFO_HPP__
Definition execinfo.hpp:22
uint32_t current_rank
Definition execinfo.hpp:25
uint32_t n_rank
Definition execinfo.hpp:24
KernelDispatchOptions kernel_options
Definition execinfo.hpp:28
bool verbose
Definition execinfo.hpp:27
uint64_t run_id
Definition execinfo.hpp:23
std::enable_if_t< AutoGenerated::FlagCompileTime::use_cereal_serde, T > serialize(Archive &ar)
Definition execinfo.hpp:32
static std::string get_version()
Definition common.cpp:13
uint32_t thread_per_process
Definition execinfo.hpp:26
Definition execinfo.hpp:13
std::size_t m_p_p_team_leave
Definition execinfo.hpp:17
std::size_t m_p_p_team_contribs
Definition execinfo.hpp:15
std::size_t m_p_p_team_move
Definition execinfo.hpp:16
std::size_t m_p_p_team_model
Definition execinfo.hpp:14