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