aboutsummaryrefslogtreecommitdiffstats
path: root/core/module-list.h
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-05 22:53:09 +0100
committereunhhu <[email protected]>2026-10-05 22:53:09 +0100
commit10a50dd20abe8542d6ed6487d2c46d964af59c75 (patch)
tree863b2026aee2ffa84a2edbd2fb3ec3ad3010703a /core/module-list.h
parentaf43fa227f71c16eb806191d4928cf03166ff76c (diff)
downloadpure-10a50dd20abe8542d6ed6487d2c46d964af59c75.tar.gz
pure-10a50dd20abe8542d6ed6487d2c46d964af59c75.zip
Batch executor stage 1 (024): a count's loop whose block has batch forms (lane forms, locals set before read in every round, ifs, numbers set in items) runs, in the executor, up to 1024 rounds at a time: values uniform, affine or lanes (numbers, or whole numbers in four bytes), branches as masks, cells read by affine rows as strided columns, sets kept to the batch's end and made only when no round reads an earlier round's; a fault, a form it lacks or such a read gives the rounds back to the executor one by one, work counted as written. Planned at load (PURE_BATCH=0: none); the executor of a module without such loops is the same code (run aligned to 64: as many instructions and cycles), with one its own copy. knapsack with PURE_JIT=0: 1,056 to 13.7 ms. module_tier compares batches with the executor alone and makes loops of rounds apart; BATCH_SOURCE: widened columns, -0, a fault mid-batch, rounds reading the last's sets
Diffstat (limited to 'core/module-list.h')
-rw-r--r--core/module-list.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/module-list.h b/core/module-list.h
index 369e8ed..28c1936 100644
--- a/core/module-list.h
+++ b/core/module-list.h
@@ -173,6 +173,19 @@ size_t pure_list_extra(const PureList *);
* gets allow; a clear makes it FLAT again. Answers are the tree's. False
* when the list cannot (it stays a tree). */
bool pure_list_arrays(PureList *);
+/* A list's cells as a batch reads and sets them (docs/design/024): FLAT (a
+ * position its row) or DENSE with every key below its count (a key its
+ * position and its row); each field's column and its cells' bytes (0: a
+ * DENSE list's key, the row itself; 1 or 4: whole numbers; 8: numbers; 255:
+ * neither, a text or an i64); owned when a batch may set them in place (an
+ * event's list, not a pack's). false when it is neither form. */
+typedef struct { size_t count; void *columns[16]; uint8_t width[16]; bool owned; } PureCells;
+bool pure_list_cells(PureList *, PureCells *);
+/* Field's column of an owned list's cells widened to bytes (wider than it
+ * is) before a batch sets cells that need it; false without memory (as it was). */
+bool pure_list_widen(PureList *, unsigned field, uint8_t bytes);
+/* A batch set cells of it in place: it changed (its version). */
+void pure_list_touched(PureList *);
/* What it keeps its items in now: 0 a tree, 1 FLAT arrays, 2 DENSE (for tests and counts). */
unsigned pure_list_form(const PureList *);
/* Field of the item whose key_field is key, in a list ordered by key_field