nx_loop.nx
buildroot/runtime/nx_loop.nx
about
dependencies 3 imports · 51 importers
diagram shows first 10 each side; +0 more imports, +41 more importers in the complete lists below.
imports: nx_tier.nxnx_syscalls.nxnx_clock.nx
imported by: _nx_bits_clz64_oracle.nx_nx_loop_v2_oracle.nxnx_activation_steer.nxnx_attn_window.nxnx_attribution.nxnx_bpe.nxnx_chem_peak_list.nxnx_closed_loop.nxnx_conv2d.nxnx_diffusion_loop.nxnx_embedding.nxnx_gelu.nxnx_gguf.nxnx_gguf_load.nxnx_gguf_load_block.nxnx_gguf_meta.nxnx_groupnorm.nxnx_knn.nxnx_layernorm.nxnx_llm_run.nxnx_llm_run_v2.nxnx_loop_gate.nxnx_mesh.nxnx_model_spec.nxnx_monte_carlo.nxnx_ms_ssim.nxnx_multivariate.nxnx_nlex.nxnx_nparse.nxnx_patch_attribution.nxnx_placement.nxnx_quant_policy.nxnx_raster_legacy.nxnx_render_pass.nxnx_rmsnorm.nxnx_root.nxnx_rope.nxnx_silu.nxnx_ssim.nxnx_tex_sample.nxnx_theorem_ingest.nxnx_token_sample.nxnx_transformer_block.nxnx_transformer_stack.nxnx_trig.nxnx_uleb.nxnx_unet_block.nxnx_upsample.nxnx_vae_decode_stage.nxnx_vae_tile.nxnx_zbuf.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| 185 | struct NxLoopFrame |
| 196 | struct NxLoopVerdict |
consts
| 65 | const NX_LOOP_RUNNING: nx_int = 0 |
| 66 | const NX_LOOP_DONE_SUCCESS: nx_int = 1 |
| 67 | const NX_LOOP_DONE_EXIT: nx_int = 2 |
| 68 | const NX_LOOP_BUDGET_EXHAUSTED: nx_int = 3 |
| 69 | const NX_LOOP_ABORTED: nx_int = 4 |
| 70 | const NX_LOOP_N_VERDICTS: nx_int = 5 |
| 180 | const NX_LV_NORMAL: i64 = 1 // body broke OR predicate matched |
| 181 | const NX_LV_BOUND_EXHAUSTED: i64 = 2 // hit declared max_iters |
| 182 | const NX_LV_TIMED_OUT: i64 = 3 // wall-time watchdog fired |
| 183 | const NX_LV_STALLED: i64 = 4 // no progress for max_no_progress iters |
functions
| 72 | func nx_loop_verdict_is_valid(v: nx_int) -> nx_int |
| 83 | func nx_loop_is_success(v: nx_int) -> nx_int |
| 89 | func nx_loop_is_failure(v: nx_int) -> nx_int |
| 114 | func nx_loop_settle(verdict_in: nx_int, iter: nx_int, max_iters: nx_int) -> nx_int |
| 139 | func nx_loop_settle_counted(verdict_in: nx_int, iter: nx_int, n_required: nx_int) -> nx_int |
| 202 | func nx_loop_begin(max_iters: i64) -> *NxLoopFrame called by 23: _ref_clz64_ref_ctz64mainnx_chem_parse_decimal_q4nx_chem_peak_list_parsenx_chem_path_from_literal+17 calls 1: sys_mmap |
| 216 | func nx_loop_begin_watchdog(max_iters: i64, max_wall_ns: i64, max_no_progress: i64) -> *NxLoopFrame |
| 227 | func nx_loop_step(lp: *NxLoopFrame) -> i64 |
| 254 | func nx_loop_break(lp: *NxLoopFrame) -> i64 |
| 259 | func nx_loop_break_with(lp: *NxLoopFrame, reason: i64) -> i64 called by 1: main |
| 265 | func nx_loop_mark_progress(lp: *NxLoopFrame) -> i64 called by 1: main |
| 274 | func nx_loop_finish(lp: *NxLoopFrame) -> *NxLoopFrame called by 1: main |
| 278 | func nx_loop_was_normal(lp: *NxLoopFrame) -> i64 called by 1: main |
| 291 | func main() -> i64 |