code wiki / (root) / nx_photogrambench.nx

nx_photogrambench.nx

buildroot/runtime/nx_photogrambench.nx

26154 B536 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind bench
docsdependenciesstructsconstsfunctions

about

nx_photogrambench.nx -- THE PHOTOGRAMMETRY RULER. Measures where the Nishi stack stands on the FULL photo->metric-3D pipeline vs the July-2026 SOTA bar (COLMAP / RealityCapture / Metashape / OpenMVS / MVSNet / VGGT-Pi3 feed-forward / 3DGS), so the build order is CHOSEN BY MEASUREMENT, not by taste. WHY THIS INSTRUMENT AND NOT THE OLD ONE: nx_cadtwin_census scores a photogrammetry-adjacent slice by HAND-TYPED cell values, and its citations drift from what the files actually do -- it credits classical image features to "nx_descriptor", which is a TEXT descriptor profiler for the writing arc (dx_profile over a term lexicon), with no pixel in it. Presence-scoring plus hand-typed cells is exactly the author-optimism the operator liar-killed. So this ruler is built the other way round: 1. EVERY score is COMPUTED FROM DISK, never typed. us = f(source-file exists, gate/test exists). us=0 ABSENT (no source) us=1 PRESENT-UNPROVEN (source, no gate) us=2 PROVEN (source + gate). "Unproven = absent" is softened to 1 rather than 0 only because the source is a real head start; it can never reach 2 without a gate on disk. No file, no credit. 2. A read-grounded CAP per axis: us = min(computed, cap). The cap is the honest ceiling of what the named organ ACTUALLY does, set only after reading it. This is what stops a file-name from voting. Every cap below 2 carries its reason inline. THIS is where the old census leaked. 3. INSTRUMENT SELF-CHECK: a positive probe (a file that must exist) and a negative probe (a file that must not) run every time. If the prober cannot tell present from absent, the census is VOID and the organ exits RED -- a ruler that cannot discriminate must refuse to publish a number. 4. GAP QUEUE: axes ranked by (2-us) * weight * (1+blocks), where `blocks` counts how many OTHER axes are structurally dead until this one exists. Weight alone is not a build order -- graded on weight only, twelve axes tie at the top and the "queue" orders nothing. The blocking term is what makes it an order: it promotes the axis whose absence sterilizes the most of the pipeline. The top of the queue is the next rung, chosen by the ruler and not by me. Run from the nxc2 root (paths are repo-relative). Emits human rows, a summary, the gap queue, and a final one-line JSON envelope for the MCP/API surface. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_estate_path.nx nx_photogrambench.nx

imports: nx_syscalls.nxnx_estate_path.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main ep_anchor sys_openat_rd sys_close sys_chdir sys_mmap pgb_boot sys_mmap ↻ pgb_load_bench sys_mmap ↻ sys_openat_rd ↻ sys_read sys_close ↻ pgb_bench_row sys_mmap ↻ pw sys_write phave sys_openat_rd ↻ sys_close ↻ sys_mmap ↻ pn sys_mmap ↻ sys_write ↻ pgb_axis pgb_boot ↻ phave ↻ ppad sys_write ↻ sys_mmap ↻ pw ↻ pn ↻ pgb_axis_measured pgb_boot ↻ ppad ↻ pw ↻ pn ↻ sys_mmap ↻ ppad ↻

structs

none

consts

32const PGB_MAGIC_1048576: i64 = 1048576
33const PGB_MAGIC_65536: i64 = 65536
34const PGB_MAGIC_917504: i64 = 917504
36const PGB_MAX: i64 = 64
37const PGB_NONE: *u8 = "runtime/_pgb_no_such_file.nx"

functions

58func pw(s: *u8) -> i64
65func pn(v: i64) -> i64
83func ppad(s: *u8, width: i64) -> i64
104func phave(path: *u8) -> i64
135func pgb_bench_row(buf: *u8, a: i64, b: i64) -> i64
called by 1: pgb_load_bench calls 1: sys_mmap
188func pgb_load_bench() -> i64
231func pgb_boot() -> i64
247func pgb_axis(name: *u8, bar: *u8, src1: *u8, src2: *u8, g1: *u8, g2: *u8, w: i64, cap: i64, blk: i64) -> i64
called by 1: main calls 5: pgb_bootphaveppadpwpn
289func pgb_axis_measured(name: *u8, bar: *u8, w: i64, blk: i64) -> i64
called by 1: main calls 4: pgb_bootppadpwpn
334func main() -> i64