code wiki / _hdl_build / nx_gguf_write_gate.nx
nx_gguf_write_gate.nx
buildroot/runtime/_hdl_build/nx_gguf_write_gate.nx
dependencies 7 imports · 0 importers
imports: nx_gate_gn.nxnx_gate_base.nxnx_syscalls.nxnx_le.nxnx_gguf.nxnx_gguf_meta.nxnx_f32_hw.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
| 16 | 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 |
| 18 | func gslen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 21 | func w_u8(buf: *u8, pos: *i64, v: i64) -> i64 { buf[pos[0]]=(v & 0xff) as u8; pos[0]=pos[0]+1; return 0 } |
| 22 | func w_u32(buf: *u8, pos: *i64, v: i64) -> i64 { w_u8(buf,pos,v); w_u8(buf,pos,v>>8); w_u8(buf,pos,v>>16); w_u8(buf,pos,v>>24); return 0 } |
| 23 | func w_u64(buf: *u8, pos: *i64, v: i64) -> i64 { w_u32(buf,pos,v & 0xffffffff); w_u32(buf,pos,(v>>32) & 0xffffffff); return 0 } called by 1: w_gstr |
| 24 | func w_bytes(buf: *u8, pos: *i64, src: *u8, n: i64) -> i64 { var i: i64=0; while i<n { buf[pos[0]]=src[i]; pos[0]=pos[0]+1; i=i+1 } return 0 } |
| 25 | func w_gstr(buf: *u8, pos: *i64, s: *u8, slen: i64) -> i64 { w_u64(buf,pos,slen); w_bytes(buf,pos,s,slen); return 0 } called by 1: ggw_write |
| 26 | func w_align(buf: *u8, pos: *i64, a: i64) -> i64 { while (pos[0] % a) != 0 { buf[pos[0]]=0 as u8; pos[0]=pos[0]+1 } return 0 } |
| 31 | func ggw_write(buf: *u8, arch: *u8, tspecs: *i64, ntensor: i64) -> i64 |
| 65 | func main() -> i64 |