code wiki / _hdl_build / nx_gen_rank.nx
nx_gen_rank.nx
buildroot/runtime/_hdl_build/nx_gen_rank.nx
about
nx_gen_rank.nx -- FULL-SCALE score-and-rank on a SOVEREIGN seg-store PLANE (NOT a .tsv -- sovereign-formats-first
law, operator 2026-07-21 "why are you building tsvs again"). Scores live in knowledge/store/genscores- (row = cid<TAB>
symmetry_q1000), written via sts_seed (one commit per beat run, NOT per gen -> avoids the seg-store quadratic) and
read via sts_load. Verbs:
score [batch] -> score up to batch not-yet-scored gallery cids (cid list from the daemon sidecar) INTO the plane.
rank [n] -> load the ENTIRE plane, sort by symmetry DESC, return top n (default all). Full-scale, no sampling.
Scoring uses the shared symmetry lib. license_tier: ORIGINAL expect_exit: 0
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_image_symmetry_lib.nxnx_seg_store.nxnx_store_seed_lib.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_1048576: i64 = 1048576 |
| 13 | const K_MAGIC_8192: i64 = 8192 |
| 14 | const K_MAGIC_1024: i64 = 1024 |
functions
| 16 | func gr_streq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8) { if (a[i]&0xff)!=(b[i]&0xff) { return 0 } i=i+1 } if b[i]!=(0 as u8) { return 0 } return 1 } |
| 18 | func gr_contains(buf: *u8, n: i64, cid: *u8) -> i64 called by 1: do_score |
| 31 | func do_score(batch: i64) -> i64 |
| 70 | func do_rank(topn: i64) -> i64 |
| 129 | func main(argc: i64, argv: *i64) -> i64 |