nx_lbp_batch.nx
buildroot/runtime/nx_lbp_batch.nx
about
nx_lbp_batch.nx -- SOVEREIGN face-descriptor RUNG 5: batch descriptor builder over the corpus. Walks the
gallery sidecar (galx_cid_paths.tsv: cid\tpath per line), FORKS ONE CHILD PER IMAGE (nx_png_decode mmaps
64MiB/call with no munmap, so each decode must die to reclaim memory), each child: PNG -> luma gray ->
resize 128x128 -> 8x8 grid LBP descriptor, appends a fixed-size record {cid(72) + 16384 i64} to a store.
Times ITSELF natively (sys_clock_now_us) and reports us/img so we MEASURE sovereign decode+descriptor speed
against the insightface benchmark (244 ms/img CPU) instead of guessing. Targets N EXISTING images (skips
cleaned-up originals). arg1 = target count (default 60). Build/run: ./_offc/nx_sov_build_run.elf nx_lbp_batch
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_lbp_core.nxnx_lbp_imgio.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 12 | const K_MAGIC_2048: i64 = 2048 |
| 13 | const K_MAGIC_131144: i64 = 131144 |
| 14 | const K_MAGIC_16384: i64 = 16384 |
functions
| 16 | func bt_atoi(s: *u8) -> i64 { var v: i64=0; var i: i64=0; while s[i]!=(0 as u8) { if s[i]>=(48 as u8) { if s[i]<=(57 as u8) { v=v*10+((s[i] as i64)-48) } } i=i+1 } return v } called by 1: main |
| 17 | func bt_exists(path: *u8) -> i64 { let fd: i64=sys_openat_rd(path); if fd<0 {return 0} sys_close(fd); return 1 } |
| 19 | func main(argc: i64, argv: *i64) -> i64 |