feral_amf/stats.rs
1//! Diagnostic counters exposed alongside the permutation.
2
3/// Diagnostic counters collected during AMF ordering.
4///
5/// Mirrors [`feral_amd::AmdStats`] field-by-field; the AMF inner
6/// loop populates the same `OrderDiagnostics` surface from the
7/// shared `feral-ordering-core` workspace.
8#[derive(Debug, Default, Clone, PartialEq, Eq)]
9pub struct AmfStats {
10 /// Number of garbage-collection compactions fired.
11 pub ncmpa: u32,
12 /// Number of mark-array generation-counter resets.
13 ///
14 /// Currently always `0`: not wired to a backing counter. The reset
15 /// it would count (`clear_flag`) only fires when the generation
16 /// counter `wflg` reaches `wbig = i32::MAX - n`, which during
17 /// elimination requires `n` on the order of tens of thousands, so
18 /// the true count is `0` on every practically testable input.
19 pub n_clear_flag: u32,
20 /// Number of variables absorbed by mass elimination.
21 pub n_mass_elim: u32,
22 /// Number of supervariable merges detected.
23 pub n_supervar_merge: u32,
24 /// Number of variables placed into the dense-deferred bucket
25 /// at initialization.
26 pub n_dense_deferred: u32,
27 /// Flop counter: divisions.
28 pub ndiv: u64,
29 /// Flop counter: LU multiply-subtracts.
30 pub nms_lu: u64,
31 /// Flop counter: LDLáµ multiply-subtracts.
32 pub nms_ldl: u64,
33}