code wiki / _hdl_build / nx_sdfrender_mt_gate.nx
nx_sdfrender_mt_gate.nx
buildroot/runtime/_hdl_build/nx_sdfrender_mt_gate.nx
about
nx_sdfrender_mt_gate.nx -- R1c gate: the THREADED SDF render must be BYTE-IDENTICAL to the single-thread
renderer AND measurably faster (the whole point of the rung). A negative control proves the comparator bites.
T1 BODY: sdfmt_render (auto workers) == sdf_render, all 196608 px byte-identical
T2 FACE: the same identity law on the carve/material program (different code paths: no floor, eye/hair/lash mats)
T3 MEASURED speedup on the body frame (monotonic clock): threaded must be >= 2.0x faster (honest floor on a
multi-core box; the ACTUAL ratio is printed -- no-wave, measured exceed)
T4 NEG-CONTROL: corrupt one threaded pixel -> the comparator must flag EXACTLY one diff (then restore)
T5 mt-vs-mt determinism: two threaded renders byte-identical (scheduling-independence) + PNG knowledge/nx_sdfmt.png
license_tier: ORIGINAL expect_exit: 0
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_png.nxnx_hw.nxnx_sdfrender_mt.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
| none |
functions
| 15 | func hw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 16 | func pn(v: i64) -> i64 |
| 28 | func now_ms() -> i64 |
| 33 | func fbdiff(a: *i64, b: *i64, n: i64) -> i64 called by 1: main |
| 40 | func main() -> i64 |