-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlog.hpp
More file actions
45 lines (39 loc) · 1.58 KB
/
Copy pathlog.hpp
File metadata and controls
45 lines (39 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// SPDX-License-Identifier: MIT
// numeric::log — env-var-gated diagnostic trace gate.
//
//
// All compile-time-disabled diagnostic stderr in this project is wrapped in
//
// AMFLOW_TRACE("AMFLOW_DEBUG_FOO") {
// std::cerr << "[FOO] ..." << ... << "\n";
// }
//
// which fires only when the named environment variable is set non-empty.
//
// Trace categories (set the env var non-empty to enable diagnostic stderr):
//
// AMFLOW_DEBUG_BC — boundary-condition assembly (qft regions, amflow build/solve)
// AMFLOW_DEBUG_DBO — DetermineBoundaryOrder internals (ode)
// AMFLOW_DEBUG_CT_PERM — CalcTaylor row permutation (ode)
// AMFLOW_DEBUG_REGULAR — regular-point recurrence (ode)
// AMFLOW_DEBUG_STAGES — top-level stage labels (ode)
// AMFLOW_TRACE_LAYER6 — fine-grained layer 6 trace (ode)
// AMFLOW_DEBUG_PRECISE — full-precision arb_get_str (numeric)
// AMFLOW_DEBUG_SCHEME — EndingScheme dispatch (amflow Cutkosky/SingleMass firing)
//
// Behavior-modifier env vars (NOT diagnostic; these change semantics —
// listed for completeness, not routed through trace_enabled):
//
// AMFLOW_NO_SPARSE_CHOP
// AMFLOW_SPARSE_CHOP_DIGITS
// AMFLOW_JORDAN_DUMP
// AMFLOW_KIRA_DUMP
#ifndef AMFLOW_NUMERIC_LOG_HPP
#define AMFLOW_NUMERIC_LOG_HPP
namespace amflow::numeric::log {
// True iff env var `env_name` is set to a non-empty string.
bool trace_enabled(const char* env_name);
} // namespace amflow::numeric::log
#define AMFLOW_TRACE(env_name) \
if (::amflow::numeric::log::trace_enabled(env_name))
#endif // AMFLOW_NUMERIC_LOG_HPP