nx_parallel_simd_reduce.nx
buildroot/runtime/nx_parallel_simd_reduce.nx
about
nx_parallel_simd_reduce.nx -- proof of L7 x L8 composition.
nx_parallel_reduce_i64 splits the array across worker threads;
each worker reduces its chunk using __simd_vreduce_sum_i64_x4
(4 lanes at a time). The orchestrator combines per-chunk
results into the final sum. Bit-exact vs scalar baseline.
In Flynn-taxonomy terms this is exactly the HPC stack pattern
the user named: MIMD across cores + SIMD inside each core =
N_cores x 4-lane speedup over scalar single-core on real
silicon. Under qemu the MIMD axis is fake (single CPU) and
the SIMD axis is interpretive overhead, so the wall-time will
LOSE vs scalar -- but the CORRECTNESS gate is hard.
dependencies 7 imports · 0 importers
imports: nx_kernel_v2.nxnx_log.nxnx_atom.nxnx_thread_pool.nxnx_parallel.nxnx_clock.nxnx_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
| 29 | const N: i64 = 65536 |
functions
| 39 | func scalar_add(acc: i64, x: i64) -> i64 { return acc + x } |
| 41 | func main() -> nx_exit |