From 042dbfd98d664d67dcb006f1870984fc97bfebe1 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Thu, 8 Oct 2026 14:51:46 +0100 Subject: Batch plans, stage 1 of design 025: each batch loop's block read once at load (pure_batch_plans, after its instructions' plans are final): the locals it sets and whether it sets items, its sums into cells, and at each instruction a role (a sum's again, add or set) and how far on a LOCAL_LOAD's x = x op e is; batch_run, pass and local_load read the plan instead of scanning the block each batch; PURE_BATCH_LANES to build other lane counts; PURE_BATCH_CHECK (a build flag, while the stage is made) reads the block again each batch and stops if the plan differs; seeds 1 2 3 5 23 (default and PURE_SELECT=all), the fixed sources and the unit tests pass with it --- core/module-run.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core/module-run.h') diff --git a/core/module-run.h b/core/module-run.h index 9168c84..dc4a023 100644 --- a/core/module-run.h +++ b/core/module-run.h @@ -169,6 +169,9 @@ int pure_run_rest(Frame *, uint32_t pc); * or how an item it appends stopped at its round (as the executor's step: * the event is undone, the work so far counted). */ int pure_batch_run(Frame *, Loop *, unsigned *done); +/* Each batch loop's plan (docs/design/025), made once the plans of the module's instructions are final. false: no memory. */ +bool pure_batch_plans(PureModule *); +void pure_batch_plans_free(PureModule *); /* Whether the LOCAL_LOAD at pc, in a block ending at end, begins x = x op e * (x its local, op ADD, MIN or MAX, e computed above x with no branch or * loop): a reduction across a batch's rounds. *at: op's pc. */ -- cgit v1.2.3