From 41544624575aba6ed7c0712442ae0ecd587d9ad6 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Tue, 6 Oct 2026 03:50:03 +0100 Subject: Batch executor stage 4, first part (024): an item of numbers and bools appended in a batch's block (to a list the block reads nowhere else, no index into it, no nested loop) is made at the batch's end round by round through the executor's own step: keys there already, the memory budget, its undo log as the executor's; a fault there is the executor's at that round (the event undone: its kind, its instruction and the work so far tell), pure_batch_run's third way out. module_tier's handlers append (e, d) in rounds apart and run under a memory budget too (seeds 1, 2, 3, 5, 23 alike); knapsack's table loop batched (13.8 to 13.7 ms: the appends cost as the executor's) --- core/module-run.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'core/module-run.h') diff --git a/core/module-run.h b/core/module-run.h index 3f8a9ca..0bc97eb 100644 --- a/core/module-run.h +++ b/core/module-run.h @@ -158,10 +158,12 @@ int pure_run_rest(Frame *, uint32_t pc); /* Loops a batch of rounds at a time (module-batch.c, docs/design/024): the * innermost loop's rounds from loop->k (set up and counted; its LOOP - * planned PLAN_BATCH) run as one batch: how many (0: none ran, its block - * runs round by round next, at least until round loop->resume), the frame - * left as the last of them leaves it, their work counted. */ -unsigned pure_batch_run(Frame *, Loop *); + * planned PLAN_BATCH) run as one batch: *done how many (0: none ran, its + * block runs round by round next, at least until round loop->resume), the + * frame left as the last of them leaves it, their work counted. STEP_NEXT, + * 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); /* 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