code wiki / (root) / nx_parallelism_census.nx

nx_parallelism_census.nx

buildroot/runtime/nx_parallelism_census.nx

6431 B111 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_parallelism_census.nx -- the PARALLELIZATION WORKLIST: walk the tree and flag COMPUTE-HEAVY organs (deep nested loops = the hot-path signature: matmul / convolution / codec macroblock loops / hashing rounds) that would benefit from multi-core once NishiLang threading is unblocked. Every organ is single-threaded today (thread-parallelism is toolchain-blocked, 2026-07-06), so this names WHERE the wins are when threads land. Structural signal = max concurrent `while`-nesting depth (comment/string-aware). Depth>=3 = a candidate. HONEST: a candidate-generator, not proof of compute-boundedness (a deep parse/IO loop can also nest); confirm with nx_parallelism_probe on the actual run. Sovereign (getdents64 walk, no shell). expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_dir.nx nx_parallelism_census.nx

imports: nx_syscalls.nxnx_itoa_lib.nxnx_dir.nx

imported by: nobody (leaf or entry point)

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

main pc_puts sys_write sys_mmap nx_dir_list nx_openat nx_dirent_read nx_dirent_iter nx_dir_is_dotlike nx_dir_name_strlen nx_dir_arena_copy_name sys_exit pc_read sys_openat_rd sys_read sys_close pc_max_loop_depth pc_match pc_alnum pc_putn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap

structs

none

consts

12const PC_CAP: i64 = 16384
13const PC_BUF: i64 = 1048576

functions

15func pc_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 1: main calls 1: sys_write
20func pc_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
21func pc_alnum(c: u8) -> i64
called by 1: pc_max_loop_depth
28func pc_match(buf: *u8, i: i64, total: i64, lit: *u8) -> i64
called by 1: pc_max_loop_depth
33func pc_read(path: *u8, buf: *u8) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
41func pc_max_loop_depth(buf: *u8, total: i64) -> i64
called by 1: main calls 2: pc_matchpc_alnum
72func main() -> i64