diff options
| author | eunhhu <[email protected]> | 2026-10-08 11:28:07 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-10-08 11:28:07 +0100 |
| commit | d0558a3a728af8c6c0d8bef2ce7fa55565c518a5 (patch) | |
| tree | c213462dd867be69457178d0a22571e19519beda /core/module.h | |
| parent | 1b902056b7f2b68277534bcfbfa32d0808dbe05b (diff) | |
| download | pure-d0558a3a728af8c6c0d8bef2ce7fa55565c518a5.tar.gz pure-d0558a3a728af8c6c0d8bef2ce7fa55565c518a5.zip | |
Batch: general cuts (docs/research/131). A value computed by the same code as an earlier one in a line of the block (nothing between setting what it reads: planned at load, reuse_from and reuse_length) is taken from the earlier, kept for it; if !c { ... } one branch the other way, no NOT; an arm whose lanes are a quarter or fewer runs in those lanes alone (a selection: outer values gathered by sel, reductions into their lanes around, locals set given back masked at its end, stores and sums expanded, appends and a filter's kept rounds by sel; PURE_SELECT=all every straight arm, 0 none); a list whose keys are bits asked by them in one loop of lanes, a filter decided by its bits and bits of our own (no hash set; a key with no bit is not there); L.first + i affine while within the list; a slice's two bounds in one call (pure_list_slice); a filter's kept rounds copied from numbers made once. The suite's BFS 211 to 112 instructions an edge (the compiled code 38.5), 41.0 to 23.5 ms; the frontier sum 70 to 56 (35). Seeds 1, 2, 3, 5, 23 alike by default and with every arm selected
Diffstat (limited to 'core/module.h')
| -rw-r--r-- | core/module.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/module.h b/core/module.h index 4f9e4a3..61c2e00 100644 --- a/core/module.h +++ b/core/module.h @@ -256,6 +256,10 @@ typedef struct { uint8_t state_key[PURE_MODULE_STATES]; bool state_indexed[PURE_MODULE_STATES]; /* list: an index state refers to it (set at load) */ uint8_t *height; /* the operand stack's height at each instruction, from its block's start (the verifier's) */ + /* In a batch's block (module-batch.c), a value computed again by the same code as an earlier one whose operands + * nothing changed between: at its code's first instruction, the earlier root + 1 and its code's length (reuse_from, + * reuse_length; 0: none); at such an earlier root, reuse_from PURE_REUSE_KEPT (its value kept for them). */ + uint32_t *reuse_from, *reuse_length; struct PureJit *jit; /* its blocks compiled (module-jit.c, docs/design/021), or NULL */ bool batches; /* a loop of it is planned to run in batches (module-batch.c, docs/design/024) */ PureInputShape input[PURE_MODULE_INPUTS]; |
