nx_phash_test.nx
buildroot/runtime/nx_phash_test.nx
about
nx_phash_test.nx -- KAT + benchmark for perceptual image hashing.
Native sovereign lane; exit 0 = pass, N = assertion N failed.
Prints the measured Hamming distances (the benchmark), then asserts the
research-documented properties: deterministic; INVARIANT to uniform
brightness (dHash's defining property); near-dup strictly closer than a
different image; reverse-image lookup returns the right image.
dependencies 2 imports · 0 importers
imports: fx.nxnx_phash.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
| 11 | func nx_putc(c: i64) -> i64 { let b: *u8 = sys_mmap(1); b[0] = c; sys_write(1, b, 1); return 0 } |
| 12 | func nx_puts(s: *u8) -> i64 { var i: i64 = 0; while (s[i] as i64) != 0 { nx_putc(s[i] as i64); i = i + 1 } return 0 } |
| 13 | func nx_put_i64(n: i64) -> i64 |
| 21 | func main() -> i64 |