code wiki / (root) / nx_task_graph_test.nx

nx_task_graph_test.nx

buildroot/runtime/nx_task_graph_test.nx

4552 B127 linesdepth 8pulls 15 transitivereach 0 importersview sourcekind gate/prooftopic task
docsdependenciesstructsconstsfunctions

about

nx_task_graph_test.nx -- DAG ordering + dependency satisfaction. T1: diamond DAG A -> B A -> C B -> D C -> D Each node writes its tag (1..4) into a sequence log at an atomic-FAA index. D must appear AFTER both B and C. T2: fan-out / fan-in (1 source, K fan-out, 1 sink) with hw-sized parallelism inside the fan.

dependencies 6 imports · 0 importers

nx_kernel_v2.nx nx_log.nx nx_atom.nx nx_thread_pool.nx nx_task_graph.nx nx_hw.nx nx_task_graph_test.nx

imports: nx_kernel_v2.nxnx_log.nxnx_atom.nxnx_thread_pool.nxnx_task_graph.nxnx_hw.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main nx_hw_worker_count nx_hw_cpu_count sys_mmap sys_munmap nx_pool_new nx_hw_worker_count ↻ sys_mmap ↻ nx_chan_new sys_mmap ↻ _nx_chan_cell sys_thread_create nx_thread_spawn sys_mmap ↻ nx_thread_spawn_fn sys_mmap ↻ nx_graph_new sys_mmap ↻ nx_graph_add_node _nx_graph_node_at nx_graph_add_edge _nx_graph_node_at ↻ _nx_graph_set_succ nx_graph_run _nx_graph_node_at ↻ nx_pool_submit nx_atom_faa_i64 nx_chan_send nx_chan_try_send _nx_chan_cell ↻ nx_thread_yield _pool_futex_wake_all sys_futex_wake nx_atom_load_i64 nx_thread_yield ↻ nx_graph_n_completed nx_atom_load_i64 ↻ nx_pool_shutdown nx_atom_faa_i64 ↻ nx_chan_send ↻

structs

25struct TraceState

consts

21const SEQ_LOG_CAP: i64 = 64

functions

32func _trace_log(state_addr: i64, tag: i64) -> i64
41func node_A(ctx: i64) -> i64
calls 1: _trace_log
45func node_B(ctx: i64) -> i64
calls 1: _trace_log
51func node_C(ctx: i64) -> i64
calls 1: _trace_log
57func node_D(ctx: i64) -> i64
calls 1: _trace_log
64func main() -> nx_exit