GPRidge v1.0.0
GPR-accelerated saddle point searches on potential energy surfaces
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
StartupReport.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
// Copyright (c) gpridge developers
3
// See LICENSE for details.
4
#pragma once
5
6
// One line format for everything the programs report about themselves at
7
// start: "[startup] <topic> key=value key=value". The engine report and the
8
// ABI report use it, so a campaign log is parsed one way.
9
10
#include <string>
11
#include <utility>
12
#include <vector>
13
14
namespace
gpr::startup
{
15
16
using
Field
= std::pair<std::string, std::string>;
17
18
[[nodiscard]]
inline
std::string
line
(
const
std::string& topic,
19
const
std::vector<Field>& fields)
20
{
21
std::string
out
=
"[startup] "
+ topic;
22
for
(
const
auto
& [key, value]: fields)
23
out
+=
" "
+ key +
"="
+ value;
24
return
out
;
25
}
26
28
[[nodiscard]]
constexpr
bool
annealStageCompiled
() noexcept
29
{
30
#ifdef USE_ANNEAL
31
return
true
;
32
#else
33
return
false
;
34
#endif
35
}
36
38
[[nodiscard]]
inline
std::string
annealLine
(
bool
requested)
39
{
40
return
line
(
"anneal"
,
41
{{
"stage"
,
annealStageCompiled
() ?
"compiled"
:
"absent"
},
42
{
"requested"
, requested ?
"true"
:
"false"
}});
43
}
44
46
[[nodiscard]]
inline
std::string
linalgLine
(
const
std::string& mode,
47
int
threads)
48
{
49
return
line
(
"linalg"
,
50
{{
"mode"
, mode}, {
"threads"
, std::to_string(threads)}});
51
}
52
53
}
// namespace gpr::startup
out
eon_relax_band_t eon_relax_surface_fn void eon_relax_outcome_t * out
Definition
eon_relax_engine.h:240
gpr::startup
Definition
StartupReport.h:14
gpr::startup::annealLine
std::string annealLine(bool requested)
"[startup] anneal stage=compiled|absent requested=true|false".
Definition
StartupReport.h:38
gpr::startup::annealStageCompiled
constexpr bool annealStageCompiled() noexcept
Whether the anneal box-ensemble stage is compiled into this build.
Definition
StartupReport.h:28
gpr::startup::line
std::string line(const std::string &topic, const std::vector< Field > &fields)
Definition
StartupReport.h:18
gpr::startup::linalgLine
std::string linalgLine(const std::string &mode, int threads)
"[startup] linalg mode=reproducible|library threads=N".
Definition
StartupReport.h:46
gpr::startup::Field
std::pair< std::string, std::string > Field
Definition
StartupReport.h:16
gpr
StartupReport.h
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf