aboutsummaryrefslogtreecommitdiffstats
path: root/core/module-run.h
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-08 11:28:07 +0100
committereunhhu <[email protected]>2026-10-08 11:28:07 +0100
commitd0558a3a728af8c6c0d8bef2ce7fa55565c518a5 (patch)
treec213462dd867be69457178d0a22571e19519beda /core/module-run.h
parent1b902056b7f2b68277534bcfbfa32d0808dbe05b (diff)
downloadpure-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-run.h')
-rw-r--r--core/module-run.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/module-run.h b/core/module-run.h
index 67641ed..eeca98a 100644
--- a/core/module-run.h
+++ b/core/module-run.h
@@ -61,6 +61,7 @@ static inline bool number_op(uint8_t op, double a, double b, double *out) {
* a HAS in a batch's block beginning if !L.has(k) { ... } whose code only adds to L (a filter: L only grows, so a batch asks
* each round as it opens and again, in the rounds' order, at its end). */
enum { PLAN_TEXT = 1, PLAN_JOINED = 2, PLAN_ROW = 4, PLAN_BATCH = 8, PLAN_RECUR = 16, PLAN_GUARD = 32, PLAN_SPREAD = 64, PLAN_FILTER = 128 };
+enum { PURE_REUSE_KEPT = UINT32_MAX }; /* reuse_from at a root whose value later copies of its code take */
/* An item instruction's argument: its list and its field. */
static inline uint32_t list_of(uint32_t arg) { return arg & 0xFFFF; }