code wiki / _hdl_build / nx_simulated_annealing_gate.nx
nx_simulated_annealing_gate.nx
buildroot/runtime/_hdl_build/nx_simulated_annealing_gate.nx
dependencies 4 imports · 0 importers
imports: nx_gate_gn.nxnx_gate_base.nxnx_f32_hw.nxnx_syscalls.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
| 19 | func grow(name: *u8, ok: i64) -> i64 { if ok==1 { gw(" PASS " as *u8) } else { gw(" FAIL " as *u8) } gw(name); gw(" calls 1: gw |
| 21 | func f32_le(x: i64, y: i64) -> i64 { let d: i64=f32_sub(x,y) & 0xFFFFFFFF; if ((d>>31)&1)==1 { return 1 } if (d & 0x7FFFFFFF)==0 { return 1 } return 0 } |
| 22 | func f32_exp(x: i64) -> i64 |
| 29 | func rng(st: *i64) -> i64 { st[0]=((st[0]*1103515245)+12345) & 0x7FFFFFFF; return st[0] } |
| 30 | func rng_n(st: *i64, n: i64) -> i64 { return ((rng(st)>>16)&0x7FFF)%n } // HIGH bits -- LCG low bits have tiny period |
| 32 | func fval(x: i64, F: *i64) -> i64 { if x<0 { return 999 } if x>10 { return 999 } return F[x] } |
| 34 | func main() -> i64 |