cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
report.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_PARAMETER_REPORT_H
4#define pRC_CORE_PARAMETER_REPORT_H
5
8
9namespace pRC
10{
11 template<class... Ps>
12 static inline constexpr auto report(Ps &&...parameters)
13 {
14 auto const print = [](auto const &parameter)
15 {
16 Logging::log(" ", parameter.name() + ":", parameter.value());
17 };
18
19 Logging::log("Compile Time Parameters:");
20
21 auto const printCompileTime = [&print](auto const &parameter)
22 {
23 if constexpr(typename RemoveReference<
24 decltype(parameter)>::Context() ==
26 {
28 }
29 };
30 (printCompileTime(parameters), ...);
31
32 Logging::log("");
33 Logging::log("Run Time Parameters:");
34
35 auto const printRunTime = [&print](auto const &parameter)
36 {
37 if constexpr(typename RemoveReference<
38 decltype(parameter)>::Context() ==
40 {
42 }
43 };
44 (printRunTime(parameters), ...);
45
46 Logging::log("");
47 }
48}
49#endif // pRC_CORE_PARAMETER_REPORT_H
static void log(X &&arg, Xs &&...args)
Definition io.hpp:17
Definition cholesky.hpp:10
std::remove_reference_t< T > RemoveReference
Definition basics.hpp:41
static auto print(String< N > const &string, std::FILE *stream)
Definition print.hpp:18
static constexpr auto report(Ps &&...parameters)
Definition report.hpp:12
static constexpr auto parameter(A &&argument, N &&name, D &&description, T const &defaultValue)
Definition parameter.hpp:216
Context
Definition context.hpp:9