code wiki / _hdl_build / nx_refbench.nx

nx_refbench.nx

buildroot/runtime/_hdl_build/nx_refbench.nx

5073 B126 linesdepth 9pulls 24 transitivereach 0 importersview sourcekind bench
docsdependenciesstructsconstsfunctions

about

nx_refbench.nx -- CLI/MCP surface for the reference-retention ruler. All measurement lives in nx_refbench_lib.nx, which the GATE imports too, so the thing that ships and the thing that is graded are the same code. VERBS compare <ref.png> <gen.png> -> JSON {ref/gen dims, plane, structure, perceptual, retention} selftest -> the anti-vacuity pair (identity must be 1000, mirror must not be) The full teeth live in nx_refbench_gate.nx; `selftest` is the fast in-tool smoke so an agent calling this over MCP can confirm the instrument is sane before trusting a number. expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_refbench_lib.nx nx_itoa_lib.nx nx_refbench.nx

imports: nx_refbench_lib.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

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

main rb_puts rb_streq rb_selftest rb_compare nx_phash_downscale rb_wrap nx_image_alloc sys_mmap nx_ssim_mean_image_q10 _ssim_local_q10 sys_mmap ↻ _ssim_window_stats nx_image_get nx_phash_dhash nx_phash_downscale ↻ nx_simhash_hamming nx_bits_popcount64_soft rb_puts ↻ rb_report rb_puts ↻ rb_num nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write sys_munmap rb_retention rb_num ↻ rb_load_gray sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_png_decode sys_mmap ↻ _png_check_signature

structs

none

consts

none

functions

15func rb_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
21func rb_num(v: i64) -> i64 { nxi_out(v); return 0 }
called by 3: rb_reportrb_selftestmain calls 1: nxi_out
23func rb_report(label: *u8, sp: i64, pp: i64) -> i64
33func rb_selftest() -> i64
74func rb_streq(a: *u8, b: *u8) -> i64
called by 1: main
84func main(argc: i64, argv: *i64) -> i64