code wiki / _hdl_build / nx_dr_densejudge_cli.nx

nx_dr_densejudge_cli.nx

buildroot/runtime/_hdl_build/nx_dr_densejudge_cli.nx

4150 B70 linesdepth 6pulls 9 transitivereach 0 importersview sourcekind tooltopic dr
docsdependenciesstructsconstsfunctions

about

nx_dr_densejudge_cli.nx -- score insights under THREE representations in one call (DR-13): lexical containment, sparse-PPMI late interaction, and TRAINED DENSE late interaction. Holding the document, the insights and the code constant makes the representations directly comparable -- which is the only way to test the ยง14 diagnosis (the ceiling is in the features). nx_dr_densejudge <ppmi.bin> <embed.bin> <document> <insight_1> [insight_2 ...] license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 5 imports · 0 importers

nx_dr_densejudge.nx nx_itoa_lib.nx nx_ppmi_lib.nx nx_dr_run.nx nx_dr_verify.nx nx_dr_densejudge_cli.nx

imports: nx_dr_densejudge.nxnx_itoa_lib.nxnx_ppmi_lib.nxnx_dr_run.nxnx_dr_verify.nx

imported by: nobody (leaf or entry point)

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

main dc_puts dc_key dc_q dc_puts ↻ dc_q ↻ ppl_load sys_openat_rd sys_mmap sys_read sys_close dj_load_embed sys_read ↻ dj_build_mean drr_strlen drr_tokenize drr_hash ppl_tokenize_ids ppl_wid_range sys_mmap ↻ db_bsearch_i64 db_semhash dc_num nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write sys_munmap dv_entail dv_contains ppl_maxsim ppl_dcos ppl_cos ppl_isqrt dj_maxsim dj_cos ppl_isqrt ↻ dj_maxsim_centered dj_cos_centered

structs

none

consts

12const K_MAGIC_16384: i64 = 16384
13const K_MAGIC_2048: i64 = 2048

functions

15func dc_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: dc_keymain
16func dc_q() -> i64 { let b: *u8 = sys_mmap(1); b[0] = 34 as u8; sys_write(1, b, 1); return 0 }
called by 2: dc_keymain
17func dc_key(name: *u8) -> i64 { dc_q(); dc_puts(name); dc_q(); dc_puts(":" as *u8); return 0 }
called by 1: main calls 2: dc_qdc_puts
22func dc_num(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
24func main(argc: i64, argv: *i64) -> i64