@graphty/webgpu-graph-algorithms 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/README.md +98 -52
  2. package/dist/browser.js +1 -1
  3. package/dist/chunks/{context-BR7fx3vR.js → context-BXqgCifx.js} +190 -40
  4. package/dist/chunks/context-BXqgCifx.js.map +1 -0
  5. package/dist/node.js +1 -1
  6. package/dist/src/algorithms/components.d.ts.map +1 -1
  7. package/dist/src/algorithms/components.js +12 -13
  8. package/dist/src/algorithms/components.js.map +1 -1
  9. package/dist/src/algorithms/degree.d.ts +6 -8
  10. package/dist/src/algorithms/degree.d.ts.map +1 -1
  11. package/dist/src/algorithms/degree.js +58 -35
  12. package/dist/src/algorithms/degree.js.map +1 -1
  13. package/dist/src/algorithms/pagerank.d.ts.map +1 -1
  14. package/dist/src/algorithms/pagerank.js +16 -14
  15. package/dist/src/algorithms/pagerank.js.map +1 -1
  16. package/dist/src/algorithms/power-iteration.d.ts +2 -2
  17. package/dist/src/algorithms/power-iteration.d.ts.map +1 -1
  18. package/dist/src/algorithms/power-iteration.js +17 -14
  19. package/dist/src/algorithms/power-iteration.js.map +1 -1
  20. package/dist/src/constants.d.ts +38 -8
  21. package/dist/src/constants.d.ts.map +1 -1
  22. package/dist/src/constants.js +38 -8
  23. package/dist/src/constants.js.map +1 -1
  24. package/dist/src/errors.d.ts +3 -2
  25. package/dist/src/errors.d.ts.map +1 -1
  26. package/dist/src/errors.js +2 -1
  27. package/dist/src/errors.js.map +1 -1
  28. package/dist/src/index.d.ts +6 -4
  29. package/dist/src/index.d.ts.map +1 -1
  30. package/dist/src/index.js +8 -3
  31. package/dist/src/index.js.map +1 -1
  32. package/dist/src/kernel/dispatch.d.ts +8 -3
  33. package/dist/src/kernel/dispatch.d.ts.map +1 -1
  34. package/dist/src/kernel/dispatch.js +18 -7
  35. package/dist/src/kernel/dispatch.js.map +1 -1
  36. package/dist/src/kernel/kernel.d.ts +30 -1
  37. package/dist/src/kernel/kernel.d.ts.map +1 -1
  38. package/dist/src/kernel/kernel.js +49 -5
  39. package/dist/src/kernel/kernel.js.map +1 -1
  40. package/dist/src/kernel/prelude.d.ts.map +1 -1
  41. package/dist/src/kernel/prelude.js +6 -1
  42. package/dist/src/kernel/prelude.js.map +1 -1
  43. package/dist/src/kernel/profiler.d.ts +15 -3
  44. package/dist/src/kernel/profiler.d.ts.map +1 -1
  45. package/dist/src/kernel/profiler.js +27 -4
  46. package/dist/src/kernel/profiler.js.map +1 -1
  47. package/dist/src/kernels.d.ts +17 -7
  48. package/dist/src/kernels.d.ts.map +1 -1
  49. package/dist/src/kernels.js +323 -16
  50. package/dist/src/kernels.js.map +1 -1
  51. package/dist/src/layouts/calibrate.d.ts +51 -0
  52. package/dist/src/layouts/calibrate.d.ts.map +1 -0
  53. package/dist/src/layouts/calibrate.js +172 -0
  54. package/dist/src/layouts/calibrate.js.map +1 -0
  55. package/dist/src/layouts/force-simulation.d.ts +39 -4
  56. package/dist/src/layouts/force-simulation.d.ts.map +1 -1
  57. package/dist/src/layouts/force-simulation.js +71 -19
  58. package/dist/src/layouts/force-simulation.js.map +1 -1
  59. package/dist/src/layouts/forceatlas2.d.ts +107 -36
  60. package/dist/src/layouts/forceatlas2.d.ts.map +1 -1
  61. package/dist/src/layouts/forceatlas2.js +296 -100
  62. package/dist/src/layouts/forceatlas2.js.map +1 -1
  63. package/dist/src/layouts/fruchterman-reingold.d.ts +73 -27
  64. package/dist/src/layouts/fruchterman-reingold.d.ts.map +1 -1
  65. package/dist/src/layouts/fruchterman-reingold.js +230 -70
  66. package/dist/src/layouts/fruchterman-reingold.js.map +1 -1
  67. package/dist/src/layouts/model-common.d.ts +41 -3
  68. package/dist/src/layouts/model-common.d.ts.map +1 -1
  69. package/dist/src/layouts/model-common.js +74 -3
  70. package/dist/src/layouts/model-common.js.map +1 -1
  71. package/dist/src/layouts/repulsion-grid.d.ts +152 -0
  72. package/dist/src/layouts/repulsion-grid.d.ts.map +1 -0
  73. package/dist/src/layouts/repulsion-grid.js +318 -0
  74. package/dist/src/layouts/repulsion-grid.js.map +1 -0
  75. package/dist/src/layouts/spring-electrical.d.ts +75 -30
  76. package/dist/src/layouts/spring-electrical.d.ts.map +1 -1
  77. package/dist/src/layouts/spring-electrical.js +231 -74
  78. package/dist/src/layouts/spring-electrical.js.map +1 -1
  79. package/dist/src/memory/residency.d.ts +6 -2
  80. package/dist/src/memory/residency.d.ts.map +1 -1
  81. package/dist/src/memory/residency.js +84 -14
  82. package/dist/src/memory/residency.js.map +1 -1
  83. package/dist/src/primitives/core-shape.d.ts +38 -2
  84. package/dist/src/primitives/core-shape.d.ts.map +1 -1
  85. package/dist/src/primitives/core-shape.js +71 -3
  86. package/dist/src/primitives/core-shape.js.map +1 -1
  87. package/dist/src/primitives/grid-pyramid.d.ts +71 -0
  88. package/dist/src/primitives/grid-pyramid.d.ts.map +1 -0
  89. package/dist/src/primitives/grid-pyramid.js +143 -0
  90. package/dist/src/primitives/grid-pyramid.js.map +1 -0
  91. package/dist/src/primitives/grid.d.ts +118 -0
  92. package/dist/src/primitives/grid.d.ts.map +1 -0
  93. package/dist/src/primitives/grid.js +225 -0
  94. package/dist/src/primitives/grid.js.map +1 -0
  95. package/dist/src/primitives/histogram.d.ts +67 -0
  96. package/dist/src/primitives/histogram.d.ts.map +1 -0
  97. package/dist/src/primitives/histogram.js +190 -0
  98. package/dist/src/primitives/histogram.js.map +1 -0
  99. package/dist/src/primitives/radix-sort.d.ts +75 -0
  100. package/dist/src/primitives/radix-sort.d.ts.map +1 -0
  101. package/dist/src/primitives/radix-sort.js +168 -0
  102. package/dist/src/primitives/radix-sort.js.map +1 -0
  103. package/dist/src/primitives/scan.d.ts +44 -0
  104. package/dist/src/primitives/scan.d.ts.map +1 -0
  105. package/dist/src/primitives/scan.js +151 -0
  106. package/dist/src/primitives/scan.js.map +1 -0
  107. package/dist/src/primitives/segmented-reduce.d.ts +25 -17
  108. package/dist/src/primitives/segmented-reduce.d.ts.map +1 -1
  109. package/dist/src/primitives/segmented-reduce.js +166 -47
  110. package/dist/src/primitives/segmented-reduce.js.map +1 -1
  111. package/dist/src/primitives/spmv.d.ts +18 -14
  112. package/dist/src/primitives/spmv.d.ts.map +1 -1
  113. package/dist/src/primitives/spmv.js +94 -58
  114. package/dist/src/primitives/spmv.js.map +1 -1
  115. package/dist/src/primitives/verify.d.ts +49 -0
  116. package/dist/src/primitives/verify.d.ts.map +1 -0
  117. package/dist/src/primitives/verify.js +229 -0
  118. package/dist/src/primitives/verify.js.map +1 -0
  119. package/dist/src/types/context.d.ts +53 -0
  120. package/dist/src/types/context.d.ts.map +1 -1
  121. package/dist/src/types/layout.d.ts +20 -0
  122. package/dist/src/types/layout.d.ts.map +1 -1
  123. package/dist/src/wgsl/counting-scatter.wgsl.d.ts +8 -0
  124. package/dist/src/wgsl/counting-scatter.wgsl.d.ts.map +1 -0
  125. package/dist/src/wgsl/counting-scatter.wgsl.js +17 -0
  126. package/dist/src/wgsl/counting-scatter.wgsl.js.map +1 -0
  127. package/dist/src/wgsl/fa2-attraction.wgsl.d.ts +23 -11
  128. package/dist/src/wgsl/fa2-attraction.wgsl.d.ts.map +1 -1
  129. package/dist/src/wgsl/fa2-attraction.wgsl.js +98 -20
  130. package/dist/src/wgsl/fa2-attraction.wgsl.js.map +1 -1
  131. package/dist/src/wgsl/fa2-stats-finalize.wgsl.d.ts +6 -2
  132. package/dist/src/wgsl/fa2-stats-finalize.wgsl.d.ts.map +1 -1
  133. package/dist/src/wgsl/fa2-stats-finalize.wgsl.js +22 -1
  134. package/dist/src/wgsl/fa2-stats-finalize.wgsl.js.map +1 -1
  135. package/dist/src/wgsl/grid-cell-key.wgsl.d.ts +8 -0
  136. package/dist/src/wgsl/grid-cell-key.wgsl.d.ts.map +1 -0
  137. package/dist/src/wgsl/grid-cell-key.wgsl.js +30 -0
  138. package/dist/src/wgsl/grid-cell-key.wgsl.js.map +1 -0
  139. package/dist/src/wgsl/grid-centroid-hub.wgsl.d.ts +8 -0
  140. package/dist/src/wgsl/grid-centroid-hub.wgsl.d.ts.map +1 -0
  141. package/dist/src/wgsl/grid-centroid-hub.wgsl.js +29 -0
  142. package/dist/src/wgsl/grid-centroid-hub.wgsl.js.map +1 -0
  143. package/dist/src/wgsl/grid-centroid.wgsl.d.ts +8 -0
  144. package/dist/src/wgsl/grid-centroid.wgsl.d.ts.map +1 -0
  145. package/dist/src/wgsl/grid-centroid.wgsl.js +29 -0
  146. package/dist/src/wgsl/grid-centroid.wgsl.js.map +1 -0
  147. package/dist/src/wgsl/grid-downsample.wgsl.d.ts +7 -0
  148. package/dist/src/wgsl/grid-downsample.wgsl.d.ts.map +1 -0
  149. package/dist/src/wgsl/grid-downsample.wgsl.js +28 -0
  150. package/dist/src/wgsl/grid-downsample.wgsl.js.map +1 -0
  151. package/dist/src/wgsl/grid-far-field.wgsl.d.ts +13 -0
  152. package/dist/src/wgsl/grid-far-field.wgsl.d.ts.map +1 -0
  153. package/dist/src/wgsl/grid-far-field.wgsl.js +98 -0
  154. package/dist/src/wgsl/grid-far-field.wgsl.js.map +1 -0
  155. package/dist/src/wgsl/grid-near-field.wgsl.d.ts +19 -0
  156. package/dist/src/wgsl/grid-near-field.wgsl.d.ts.map +1 -0
  157. package/dist/src/wgsl/grid-near-field.wgsl.js +129 -0
  158. package/dist/src/wgsl/grid-near-field.wgsl.js.map +1 -0
  159. package/dist/src/wgsl/histogram.wgsl.d.ts +7 -0
  160. package/dist/src/wgsl/histogram.wgsl.d.ts.map +1 -0
  161. package/dist/src/wgsl/histogram.wgsl.js +15 -0
  162. package/dist/src/wgsl/histogram.wgsl.js.map +1 -0
  163. package/dist/src/wgsl/indirect-finalize.wgsl.d.ts +8 -0
  164. package/dist/src/wgsl/indirect-finalize.wgsl.d.ts.map +1 -0
  165. package/dist/src/wgsl/indirect-finalize.wgsl.js +26 -0
  166. package/dist/src/wgsl/indirect-finalize.wgsl.js.map +1 -0
  167. package/dist/src/wgsl/radix-hist.wgsl.d.ts +9 -0
  168. package/dist/src/wgsl/radix-hist.wgsl.d.ts.map +1 -0
  169. package/dist/src/wgsl/radix-hist.wgsl.js +31 -0
  170. package/dist/src/wgsl/radix-hist.wgsl.js.map +1 -0
  171. package/dist/src/wgsl/radix-scatter.wgsl.d.ts +9 -0
  172. package/dist/src/wgsl/radix-scatter.wgsl.d.ts.map +1 -0
  173. package/dist/src/wgsl/radix-scatter.wgsl.js +40 -0
  174. package/dist/src/wgsl/radix-scatter.wgsl.js.map +1 -0
  175. package/dist/src/wgsl/scan-add.wgsl.d.ts +6 -0
  176. package/dist/src/wgsl/scan-add.wgsl.d.ts.map +1 -0
  177. package/dist/src/wgsl/scan-add.wgsl.js +14 -0
  178. package/dist/src/wgsl/scan-add.wgsl.js.map +1 -0
  179. package/dist/src/wgsl/scan-block.wgsl.d.ts +8 -0
  180. package/dist/src/wgsl/scan-block.wgsl.d.ts.map +1 -0
  181. package/dist/src/wgsl/scan-block.wgsl.js +30 -0
  182. package/dist/src/wgsl/scan-block.wgsl.js.map +1 -0
  183. package/dist/src/wgsl/segmented-reduce.wgsl.d.ts +22 -8
  184. package/dist/src/wgsl/segmented-reduce.wgsl.d.ts.map +1 -1
  185. package/dist/src/wgsl/segmented-reduce.wgsl.js +84 -15
  186. package/dist/src/wgsl/segmented-reduce.wgsl.js.map +1 -1
  187. package/dist/src/wgsl/spmv-pull.wgsl.d.ts +22 -11
  188. package/dist/src/wgsl/spmv-pull.wgsl.d.ts.map +1 -1
  189. package/dist/src/wgsl/spmv-pull.wgsl.js +110 -36
  190. package/dist/src/wgsl/spmv-pull.wgsl.js.map +1 -1
  191. package/dist/tsconfig.build.tsbuildinfo +1 -1
  192. package/dist/webgpu-graph-algorithms.js +3815 -1003
  193. package/dist/webgpu-graph-algorithms.js.map +1 -1
  194. package/package.json +5 -4
  195. package/src/algorithms/components.ts +12 -16
  196. package/src/algorithms/degree.ts +58 -43
  197. package/src/algorithms/pagerank.ts +20 -18
  198. package/src/algorithms/power-iteration.ts +19 -18
  199. package/src/constants.ts +38 -8
  200. package/src/errors.ts +3 -1
  201. package/src/index.ts +14 -4
  202. package/src/kernel/dispatch.ts +18 -7
  203. package/src/kernel/kernel.ts +59 -5
  204. package/src/kernel/prelude.ts +9 -0
  205. package/src/kernel/profiler.ts +28 -4
  206. package/src/kernels.ts +356 -18
  207. package/src/layouts/calibrate.ts +187 -0
  208. package/src/layouts/force-simulation.ts +91 -23
  209. package/src/layouts/forceatlas2.ts +331 -106
  210. package/src/layouts/fruchterman-reingold.ts +255 -74
  211. package/src/layouts/model-common.ts +98 -3
  212. package/src/layouts/repulsion-grid.ts +451 -0
  213. package/src/layouts/spring-electrical.ts +257 -78
  214. package/src/memory/residency.ts +126 -20
  215. package/src/primitives/core-shape.ts +91 -4
  216. package/src/primitives/grid-pyramid.ts +221 -0
  217. package/src/primitives/grid.ts +349 -0
  218. package/src/primitives/histogram.ts +273 -0
  219. package/src/primitives/radix-sort.ts +246 -0
  220. package/src/primitives/scan.ts +197 -0
  221. package/src/primitives/segmented-reduce.ts +214 -56
  222. package/src/primitives/spmv.ts +125 -65
  223. package/src/primitives/verify.ts +249 -0
  224. package/src/types/context.ts +56 -0
  225. package/src/types/layout.ts +22 -0
  226. package/src/wgsl/counting-scatter.wgsl.ts +16 -0
  227. package/src/wgsl/fa2-attraction.wgsl.ts +98 -20
  228. package/src/wgsl/fa2-stats-finalize.wgsl.ts +22 -1
  229. package/src/wgsl/grid-cell-key.wgsl.ts +29 -0
  230. package/src/wgsl/grid-centroid-hub.wgsl.ts +28 -0
  231. package/src/wgsl/grid-centroid.wgsl.ts +28 -0
  232. package/src/wgsl/grid-downsample.wgsl.ts +27 -0
  233. package/src/wgsl/grid-far-field.wgsl.ts +97 -0
  234. package/src/wgsl/grid-near-field.wgsl.ts +128 -0
  235. package/src/wgsl/histogram.wgsl.ts +14 -0
  236. package/src/wgsl/indirect-finalize.wgsl.ts +25 -0
  237. package/src/wgsl/radix-hist.wgsl.ts +30 -0
  238. package/src/wgsl/radix-scatter.wgsl.ts +39 -0
  239. package/src/wgsl/scan-add.wgsl.ts +13 -0
  240. package/src/wgsl/scan-block.wgsl.ts +29 -0
  241. package/src/wgsl/segmented-reduce.wgsl.ts +84 -15
  242. package/src/wgsl/spmv-pull.wgsl.ts +110 -36
  243. package/dist/chunks/context-BR7fx3vR.js.map +0 -1
@@ -1,6 +1,7 @@
1
1
  /**
2
- * The spring-electrical preset on the exact repulsion tier (spec 7.20 "the preset"; contract 3.13): ngraph.forcelayout's
3
- * physics under ngraph's option names and defaults -- Coulomb repulsion `-g m_i m_j / d^2` (K3, LAW 2), Hooke springs
2
+ * The spring-electrical preset on the exact or the grid repulsion tier (spec 7.20 "the preset", 7.8; contract 3.13):
3
+ * ngraph.forcelayout's physics under ngraph's option names and defaults -- Coulomb repulsion `-g m_i m_j / d^2` (K3,
4
+ * LAW 2; G6 / G7 with LAW 2 on the grid tier, P4-T13), Hooke springs
4
5
  * `k_s (d - L)` (K2, LAW 2), drag and the semi-implicit Euler step with the unit speed clamp over a per-node velocity
5
6
  * (K5, APPLY 2), the kinetic energy folded into the trace (K1, STATS_MODE 2; PD-4) -- as the ForceModel that
6
7
  * ForceSimulation drives over the four FA2 kernels K1 K2 K3 K5 per iteration and toScene per batch. No K4: there is no
@@ -10,21 +11,34 @@
10
11
  * `Fa2Params.coulomb` while FA2's centre gravity is 0 (PD-12). Settlement is the shared rule of spec 7.17
11
12
  * (DEP-P5-A); `reheat()` leaves the velocities alone (ngraph has no reheat).
12
13
  *
13
- * Model decisions this file shares with forceatlas2.ts: the K1-K5 dispatches of one batch share ONE compute pass and
14
- * toScene runs in a second pass that ends it; the fill kernel takes its FillParams from a model-owned 256-byte uniform
15
- * buffer; `repulsion: "grid"` is E_UNSUPPORTED at load() (the simulation's tier rule).
14
+ * Model decisions this file shares with forceatlas2.ts: on the exact tier the K1-K5 dispatches of one batch share ONE
15
+ * compute pass and toScene runs in a second pass that ends it; the fill kernel takes its FillParams from a model-owned
16
+ * 256-byte uniform buffer. The grid tier (P4-T13, PD-22) is FA2's: `RepulsionGrid` with `LAW` 2 when `tierFor(tuning,
17
+ * n)` says so (PD-18), the grid buffers from `buffers()`, K1's grid block under `gridMax > 0` (PD-14) over the model's
18
+ * own `hubCounters`, the three passes `se-k1` / `se-attraction` / `se-grid` before `se-to-scene` (PD-16), and the
19
+ * union stage list (PD-17; K4 is never recorded).
16
20
  */
17
21
  import { MAX_ITERATIONS_PER_STEP, SE_DEFAULTS, SE_SCALE_REFERENCE_NODES, TRACE_RECORD_BYTES, UNIFORM_SLOT_BYTES, } from "../constants.js";
18
22
  import { BufferUsage } from "../device/webgpu-constants.js";
19
23
  import { WebGpuGraphError } from "../errors.js";
20
24
  import { plan1d } from "../kernel/dispatch.js";
21
- import { FA2_PARAMS, FA2_STATE, FA2_TRACE, FILL_PARAMS, graphBindings, kernelSpec } from "../kernels.js";
22
- import { ForceSimulation, } from "./force-simulation.js";
23
- import { resolveLayoutTuning } from "./forceatlas2.js";
24
- import { describeValue, FILL_PARAMS_BUFFER, FORCE_BYTES_PER_NODE, invalid, isPositiveInteger, pickCenter, pickDim, pickNumber, pickSeed, scalar, seedWord, subset, vector, } from "./model-common.js";
25
+ import { FA2_PARAMS, FA2_STATE, FA2_TRACE, FILL_PARAMS, kernelSpec } from "../kernels.js";
26
+ import { arcCountOf } from "../primitives/core-shape.js";
27
+ import { gridSpecFor } from "../primitives/grid.js";
28
+ import { ForceSimulation, tierFor, } from "./force-simulation.js";
29
+ import { resolveLayoutTuning, writeGridFrame } from "./forceatlas2.js";
30
+ import { bindAttraction, describeValue, FILL_PARAMS_BUFFER, FORCE_BYTES_PER_NODE, invalid, isPositiveInteger, pickCenter, pickDim, pickNumber, pickSeed, recordAttraction, scalar, seedWord, subset, vector, } from "./model-common.js";
31
+ import { RepulsionGrid } from "./repulsion-grid.js";
25
32
  // ============================================================ constants
26
- /** The stage names of one iteration in dispatch order plus the per-batch toScene (no K4: spec 7.20). */
27
- const SE_STAGES = ["K1", "K2", "K3", "K5", "toScene"];
33
+ /** The stage names of both tiers in dispatch order plus the per-batch toScene (spec 7.20; P4 PD-17: the union list; the exact tier records K1 K2 K3 K5, the grid tier K1 K2 G1..G7 K5, K4 never). */
34
+ const SE_STAGES = ["K1", "K2", "K3", "G1", "G2", "G3", "G4", "G5", "G6", "G7", "K4", "K5", "toScene"];
35
+ /** The SE_STAGES index of the first grid stage, of K4, of K5 and of toScene. */
36
+ const STAGE_G1 = 3;
37
+ const STAGE_K4 = 10;
38
+ const STAGE_K5 = 11;
39
+ const STAGE_TO_SCENE = 12;
40
+ /** The name of the model-owned hub-counter buffer K1 binds on every tier (P4 PD-14). */
41
+ const HUB_COUNTERS_BUFFER = "hubCounters";
28
42
  /** The one-workgroup dispatch of K1. */
29
43
  const ONE_WORKGROUP = { x: 1, y: 1, z: 1, items: 1, stride: null };
30
44
  /** The model's constant override set (PD-1, PD-20): the spring / coulomb laws, ngraph's Euler step, the kinetic-energy statistic, SWING_MODE 1 so the FA2 text never touches the oldForce slot. */
@@ -39,6 +53,13 @@ const SE_OVERRIDES = Object.freeze({
39
53
  APPLY: 2,
40
54
  STATS_MODE: 2,
41
55
  });
56
+ /** The grid stage's override set (G6 / G7 / K4; P4-T13, PD-22): K3's constant three and the coulomb law. */
57
+ const SE_GRID_OVERRIDES = Object.freeze({
58
+ SWING_MODE: 1,
59
+ STRONG_GRAVITY: false,
60
+ GRAVITY_CENTER: 0,
61
+ LAW: 2,
62
+ });
42
63
  /** Every override K1 accepts, with its default. */
43
64
  const K1_DEFAULTS = { STATS_MODE: 0 };
44
65
  /** Every override K2 accepts, with its default (plus the two standard graph overrides). */
@@ -141,7 +162,7 @@ function massOf(s) {
141
162
  }
142
163
  return out;
143
164
  }
144
- /** The spring-electrical model (spec 7.20: K1 K2 K3 K5 per iteration; toScene once per batch). Stages: ["K1", "K2", "K3", "K5", "toScene"]. */
165
+ /** The spring-electrical model (spec 7.20: K1 K2 K3 K5 per iteration on the exact tier, K1 K2 G1..G7 K5 on the grid tier; toScene once per batch). Stages: the union list of PD-17. */
145
166
  export class SpringElectricalModel {
146
167
  /**
147
168
  * Creates the model for one simulation.
@@ -163,6 +184,8 @@ export class SpringElectricalModel {
163
184
  this.resources = null;
164
185
  /** The kernels and bind groups of the last bind(), or null before it (and for n === 0). */
165
186
  this.bound = null;
187
+ /** The grid of the load inputs() last resolved (null on the exact tier): onLoad() writes its frame, specs() lists its kernels. */
188
+ this.nextGrid = null;
166
189
  /** The K1-K5 compute pass of the batch being recorded, keyed by CommandBatch.id; null between batches. */
167
190
  this.openPass = null;
168
191
  this.tuning = tuning;
@@ -170,15 +193,17 @@ export class SpringElectricalModel {
170
193
  }
171
194
  /**
172
195
  * force 12n (zeroed), velocity 12n (zeroed: every load() starts at rest, `allocate()` / `clearKept()` honour
173
- * `zero`) and the 256-byte FillParams uniform buffer. n = 0 reports one node's worth of bytes so no zero-length
174
- * buffer is ever created.
196
+ * `zero`), the 256-byte FillParams uniform buffer, the 16-byte `hubCounters` K1 binds on every tier (P4 PD-14),
197
+ * and the grid buffers of `RepulsionGrid.buffers` exactly when `tierFor(tuning, n)` is the grid tier (PD-18).
198
+ * n = 0 reports one node's worth of bytes so no zero-length buffer is ever created.
175
199
  * @param n - the node count
176
- * @param _dim - the layout dimension (the arrays are stride 3 in both)
177
- * @returns the three model-owned buffer specs
200
+ * @param dim - the layout dimension (the arrays are stride 3 in both; the grid's geometry differs)
201
+ * @returns the model-owned buffer specs
178
202
  */
179
- buffers(n, _dim) {
203
+ buffers(n, dim) {
180
204
  const bytes = Math.max(1, n) * FORCE_BYTES_PER_NODE;
181
205
  const usage = BufferUsage.STORAGE | BufferUsage.COPY_SRC | BufferUsage.COPY_DST;
206
+ const grid = tierFor(this.tuning, n) === "grid" ? RepulsionGrid.buffers(n, gridSpecFor(n, dim, this.tuning)) : [];
182
207
  return [
183
208
  { name: "force", byteLength: bytes, usage, zero: true },
184
209
  { name: VELOCITY_BUFFER, byteLength: bytes, usage, zero: true },
@@ -188,17 +213,23 @@ export class SpringElectricalModel {
188
213
  usage: BufferUsage.UNIFORM | BufferUsage.COPY_DST,
189
214
  zero: false,
190
215
  },
216
+ { name: HUB_COUNTERS_BUFFER, byteLength: 16, usage, zero: true },
217
+ ...grid,
191
218
  ];
192
219
  }
193
220
  /**
194
221
  * { mass: 1 + degree / 3, weights: none } (PD-11): the preset has no mass or weight option, and K2 compiles
195
- * HAS_WEIGHTS = false. No `fixed` (setFixed is the live API). The tier rule is the simulation's (load() throws
196
- * E_UNSUPPORTED for the grid tier before calling this).
222
+ * HAS_WEIGHTS = false. No `fixed` (setFixed is the live API). Also remembers the grid of this load
223
+ * (`tierFor(tuning, n)`, spec 7.8) for onLoad() and specs(): the simulation calls inputs() first, then onLoad()
224
+ * before bind().
197
225
  * @param s - the snapshot being loaded
198
- * @param _options - the simulation's current option record (unused: nothing in it affects the inputs)
226
+ * @param options - the simulation's current option record (its dimension picks the grid's geometry)
199
227
  * @returns the per-load inputs
200
228
  */
201
- inputs(s, _options) {
229
+ inputs(s, options) {
230
+ const { dim } = resolveSpringElectricalOptions(options, this.current);
231
+ const n = s.nodeCount;
232
+ this.nextGrid = tierFor(this.tuning, n) === "grid" ? gridSpecFor(n, dim, this.tuning) : null;
202
233
  return { mass: massOf(s), weights: { data: null, source: "none", column: null } };
203
234
  }
204
235
  /**
@@ -211,12 +242,15 @@ export class SpringElectricalModel {
211
242
  }
212
243
  /**
213
244
  * The six module specs of an override set in dispatch order -- K1, K2, K3, K5, toScene, fill -- each with only the
214
- * override names its entry declares (K2 also USE_PERM / HAS_WEIGHTS), for warm() and the compile matrix.
245
+ * override names its entry declares (K2 also USE_PERM / HAS_WEIGHTS), for warm() and the compile matrix,
246
+ * followed by the grid tier's specs (`RepulsionGrid.specs` under SE_GRID_OVERRIDES) when the load inputs() last
247
+ * resolved is a grid load (the pipeline key carries no geometry).
215
248
  * @param overrides - the merged override set (the model's plus USE_PERM / HAS_WEIGHTS)
216
249
  * @param _subgroups - accepted for the ForceModel interface and unused (the composer picks the twin from caps)
217
250
  * @returns the specs
218
251
  */
219
252
  specs(overrides, _subgroups) {
253
+ const grid = this.nextGrid === null ? [] : RepulsionGrid.specs(SE_GRID_OVERRIDES, this.nextGrid);
220
254
  return [
221
255
  kernelSpec("fa2-stats-finalize", subset(overrides, K1_DEFAULTS)),
222
256
  kernelSpec("fa2-attraction", subset(overrides, K2_DEFAULTS)),
@@ -224,44 +258,56 @@ export class SpringElectricalModel {
224
258
  kernelSpec("fa2-integrate", subset(overrides, K5_DEFAULTS)),
225
259
  kernelSpec("fa2-to-scene"),
226
260
  kernelSpec("fill"),
261
+ ...grid,
227
262
  ];
228
263
  }
229
264
  /**
230
- * Compiles (through the cache) and binds every kernel against the buffers of this load(): K1, K2 (or the fill of
231
- * force when arcCount === 0), K3 and K5 with the velocity in their `oldForce` slot (PD-2), toScene; writes the
232
- * FillParams { count: 3n, value: 0, mode: 0 } into the model's uniform buffer. With n === 0 nothing is bound.
265
+ * Compiles (through the cache) and binds every kernel against the buffers of this load(): K1, K2 over the degree
266
+ * tiers through bindAttraction (or the fill of force when arcCount === 0), K3 on the exact tier or G1-G7 through
267
+ * RepulsionGrid on the grid tier (PD-18), K5, with the velocity in the `oldForce` slot of K3 / G7 / K5 (PD-2),
268
+ * toScene; writes the FillParams { count: 3n, value: 0, mode: 0 } into the model's uniform buffer. With n === 0
269
+ * nothing is bound. The K2 TIER 1 / 2 pipelines compile on the first load whose degrees need them (P4 PD-7).
233
270
  * @param resources - the graph, the shared and model buffers, the ring and the cache
234
271
  * @param overrides - the merged override set
235
272
  */
236
273
  async bind(resources, overrides) {
237
274
  this.dropBound();
238
275
  this.resources = resources;
239
- const { n, pipelines, caps, core, perm, ring, device } = resources;
276
+ const { n, pipelines, caps, core, ring, device } = resources;
240
277
  if (n === 0) {
241
278
  return;
242
279
  }
243
- const [k1, k2, k3, k5, toScene, fill] = await Promise.all([
280
+ const pos = resources.buffer("positions");
281
+ const force = resources.buffer("force");
282
+ const params = ring.binding(FA2_PARAMS);
283
+ const hasArcs = core.colIdx !== null;
284
+ const [k1, k5, toScene, fill] = await Promise.all([
244
285
  pipelines.kernel(kernelSpec("fa2-stats-finalize", subset(overrides, K1_DEFAULTS))),
245
- pipelines.kernel(kernelSpec("fa2-attraction", subset(overrides, K2_DEFAULTS))),
246
- pipelines.kernel(kernelSpec("fa2-repulsion-exact", subset(overrides, K3_DEFAULTS))),
247
286
  pipelines.kernel(kernelSpec("fa2-integrate", subset(overrides, K5_DEFAULTS))),
248
287
  pipelines.kernel(kernelSpec("fa2-to-scene")),
249
288
  pipelines.kernel(kernelSpec("fill")),
250
289
  ]);
290
+ const k3 = resources.tier === "grid"
291
+ ? null
292
+ : await pipelines.kernel(kernelSpec("fa2-repulsion-exact", subset(overrides, K3_DEFAULTS)));
293
+ const attraction = hasArcs
294
+ ? await bindAttraction(resources, subset(overrides, K2_DEFAULTS), { pos, force, params })
295
+ : null;
296
+ const grid = resources.tier === "grid"
297
+ ? await RepulsionGrid.create(resources, k1.workgroupSize, SE_GRID_OVERRIDES, gridSpecFor(n, resources.dim, this.tuning))
298
+ : null;
251
299
  if (this.resources !== resources) {
252
300
  // a newer bind() superseded this one while the pipelines compiled; its own bind groups stand
301
+ grid?.dispose();
253
302
  return;
254
303
  }
255
- const pos = resources.buffer("positions");
256
304
  const scene = resources.buffer("scenePositions");
257
305
  const fixed = resources.buffer("fixed");
258
306
  const partials = resources.buffer("partials");
259
307
  const state = resources.buffer("state");
260
308
  const trace = resources.buffer("trace");
261
- const force = resources.buffer("force");
262
309
  const velocity = resources.buffer(VELOCITY_BUFFER);
263
310
  const fillParamsBuffer = resources.buffer(FILL_PARAMS_BUFFER);
264
- const params = ring.binding(FA2_PARAMS);
265
311
  const fillParams = {
266
312
  buffer: fillParamsBuffer.buffer,
267
313
  offset: fillParamsBuffer.offset,
@@ -271,20 +317,47 @@ export class SpringElectricalModel {
271
317
  const fillBytes = new ArrayBuffer(FILL_PARAMS.byteLength);
272
318
  FILL_PARAMS.write(new DataView(fillBytes), { count: 3 * n, value: 0, mode: 0 });
273
319
  device.queue.writeBuffer(fillParamsBuffer.buffer, fillParamsBuffer.offset, fillBytes);
274
- const hasArcs = core.colIdx !== null;
320
+ const hubCounters = resources.buffer(HUB_COUNTERS_BUFFER);
321
+ grid?.bind({
322
+ pos,
323
+ state,
324
+ trace,
325
+ force,
326
+ oldForce: velocity,
327
+ fixedMask: fixed,
328
+ partials,
329
+ params,
330
+ cellKey: resources.buffer("cellKey"),
331
+ cellVal: resources.buffer("cellVal"),
332
+ sortedKey: resources.buffer("sortedKey"),
333
+ sortedIdx: resources.buffer("sortedIdx"),
334
+ cellHist: resources.buffer("cellHist"),
335
+ cellStart: resources.buffer("cellStart"),
336
+ hubList: resources.buffer("hubList"),
337
+ hubCounters,
338
+ hubArgs: resources.buffer("hubArgs"),
339
+ pyramid: resources.buffer("pyramid"),
340
+ });
275
341
  const wg = k1.workgroupSize;
276
342
  this.bound = {
277
343
  n,
278
344
  plan: plan1d(n, wg, caps),
279
345
  fillPlan: plan1d(3 * n, wg, caps),
280
346
  k1,
281
- k1Bound: k1.bind({ partials, S: state, T: trace, P: params }),
282
- k2,
283
- k2Bound: hasArcs
284
- ? k2.bind({ ...graphBindings(core, perm, resources.weights), pos, force, P: params })
285
- : null,
347
+ // PD-14: on the exact tier K1's cellHist slot takes a dummy (partials, both read-only) and the block is
348
+ // dead under gridMax 0; hubCounters is the model's 16-byte buffer on every tier
349
+ k1Bound: k1.bind({
350
+ partials,
351
+ S: state,
352
+ T: trace,
353
+ cellHist: grid === null ? partials : resources.buffer("cellHist"),
354
+ hubCounters,
355
+ P: params,
356
+ }),
357
+ attraction,
286
358
  k3,
287
- k3Bound: k3.bind({ pos, S: state, force, oldForce: velocity, fixedMask: fixed, partials, P: params }),
359
+ k3Bound: k3?.bind({ pos, S: state, force, oldForce: velocity, fixedMask: fixed, partials, P: params }) ?? null,
360
+ grid,
288
361
  k5,
289
362
  k5Bound: k5.bind({ force, oldForce: velocity, fixedMask: fixed, S: state, pos, partials, P: params }),
290
363
  toScene,
@@ -301,14 +374,19 @@ export class SpringElectricalModel {
301
374
  * @returns the uniform values
302
375
  */
303
376
  paramsFor(iteration, options) {
304
- const { n } = this.requireResources();
377
+ const { n, core, tiers, tier, dim } = this.requireResources();
305
378
  const resolved = resolveSpringElectricalOptions(options, this.current);
306
379
  const { nearMax, extentFactor } = this.tuning;
380
+ const grid = tier === "grid" ? gridSpecFor(n, dim, this.tuning) : null;
381
+ // P4 PD-7: TIER 2 reads [0, hiEnd), TIER 1 [hiEnd, midEnd), TIER 0 [tierStart, tierEnd) = [midEnd, n)
382
+ const so = tiers?.segmentOffsets;
383
+ const hiEnd = so?.[1] ?? 0;
384
+ const midEnd = so?.[2] ?? 0;
307
385
  return {
308
386
  n,
309
387
  dim: resolved.dim,
310
388
  flags: 0,
311
- tierStart: 0,
389
+ tierStart: midEnd,
312
390
  tierEnd: n,
313
391
  iterationIndex: iteration,
314
392
  seed: seedWord(resolved.seed),
@@ -320,9 +398,13 @@ export class SpringElectricalModel {
320
398
  center: [resolved.center[0], resolved.center[1], resolved.center[2], 0],
321
399
  settleThreshold: resolved.settleThreshold,
322
400
  extentFactor,
323
- gridMax: 0,
324
- levels: 0,
325
- pad: [0, 0, 0, 0],
401
+ gridMax: grid?.g ?? 0,
402
+ levels: grid?.levels ?? 0,
403
+ arcBase: 0,
404
+ arcEnd: arcCountOf(core),
405
+ accumulate: 0,
406
+ hiEnd,
407
+ midEnd,
326
408
  frK: 0,
327
409
  temperature: 0,
328
410
  springLength: resolved.springLength,
@@ -333,23 +415,20 @@ export class SpringElectricalModel {
333
415
  };
334
416
  }
335
417
  /**
336
- * Records one iteration into the batch: K1, K2 (or the fill of force when arcCount === 0), K3, K5 in the batch's
337
- * ONE K1-K5 compute pass, then toScene in a second pass that ends it, stopping after stage `upTo` when given.
338
- * With n === 0 nothing is recorded; a call before bind() completed is E_NOT_LOADED.
418
+ * Records one iteration into the batch, stopping after stage `upTo` when given (PD-17: `upTo` names a position
419
+ * in the union list and the recording stops after the last stage recorded at or before it, so "K3" on the grid
420
+ * tier stops after K2 and "G5" on the exact tier after K3). The exact tier: K1, K2 (or the fill of force when
421
+ * arcCount === 0), K3, K5 in the batch's ONE compute pass, then toScene in a second pass that ends it. The grid
422
+ * tier (PD-16): the passes `se-k1` (K1), `se-attraction` (K2's tiers) and `se-grid` (G1-G7, K5) per iteration,
423
+ * then `se-to-scene`. With n === 0 nothing is recorded; a call before bind() completed is E_NOT_LOADED.
339
424
  * @param batch - the batch being recorded
340
425
  * @param slot - the UniformRing slot holding this iteration's Fa2Params
341
- * @param tier - "exact" (the grid tier is E_UNSUPPORTED; the simulation never passes "grid")
426
+ * @param tier - the tier the simulation resolved at load() (the same rule bind() applied, PD-18)
342
427
  * @param upTo - a stage name to stop after; undefined records every stage including toScene
343
428
  */
344
429
  recordIteration(batch, slot, tier, upTo) {
345
- if (tier === "grid") {
346
- throw new WebGpuGraphError("E_UNSUPPORTED", "the grid repulsion tier lands in P4", {
347
- feature: "repulsion.grid",
348
- hint: 'pass repulsion: "exact"',
349
- });
350
- }
351
430
  const resources = this.requireResources();
352
- const stop = upTo === undefined ? SE_STAGES.length - 1 : this.stageIndex(upTo);
431
+ const stop = upTo === undefined ? STAGE_TO_SCENE : this.stageIndex(upTo);
353
432
  const { bound } = this;
354
433
  if (bound === null) {
355
434
  if (resources.n === 0) {
@@ -358,41 +437,107 @@ export class SpringElectricalModel {
358
437
  throw new WebGpuGraphError("E_NOT_LOADED", "the spring-electrical model is not bound (bind() has not completed)", { state: "loaded" });
359
438
  }
360
439
  const offset = resources.ring.offsetOf(slot);
440
+ if (tier === "grid") {
441
+ this.recordGridIteration(batch, bound, offset, stop);
442
+ return;
443
+ }
444
+ const { k3, k3Bound } = bound;
445
+ if (k3 === null || k3Bound === null) {
446
+ throw new WebGpuGraphError("E_NOT_LOADED", "the spring-electrical model was bound on the grid tier", {
447
+ state: "loaded",
448
+ });
449
+ }
361
450
  const pass = this.openPass !== null && this.openPass.id === batch.id ? this.openPass.pass : batch.pass("se");
362
451
  this.openPass = { id: batch.id, pass };
363
452
  bound.k1.dispatch(pass, bound.k1Bound, ONE_WORKGROUP, [offset]);
364
453
  if (stop < 1) {
365
454
  return;
366
455
  }
367
- if (bound.k2Bound !== null) {
368
- bound.k2.dispatch(pass, bound.k2Bound, bound.plan, [offset]);
456
+ this.recordK2(pass, bound, offset);
457
+ if (stop < 2) {
458
+ return;
369
459
  }
370
- else if (bound.fillForceBound !== null) {
371
- bound.fill.dispatch(pass, bound.fillForceBound, bound.fillPlan, [0]);
460
+ k3.dispatch(pass, k3Bound, bound.plan, [offset]);
461
+ if (stop < STAGE_K5) {
462
+ return;
372
463
  }
373
- if (stop < 2) {
464
+ bound.k5.dispatch(pass, bound.k5Bound, bound.plan, [offset]);
465
+ if (stop < STAGE_TO_SCENE) {
374
466
  return;
375
467
  }
376
- bound.k3.dispatch(pass, bound.k3Bound, bound.plan, [offset]);
377
- if (stop < 3) {
468
+ this.recordToScene(batch, bound, offset);
469
+ }
470
+ /**
471
+ * The grid tier's iteration (PD-16): three compute passes before toScene; no K4.
472
+ * @param batch - the batch being recorded
473
+ * @param bound - the bound model
474
+ * @param offset - the Fa2Params dynamic offset of the iteration
475
+ * @param stop - the SE_STAGES index to stop after
476
+ */
477
+ recordGridIteration(batch, bound, offset, stop) {
478
+ const { grid } = bound;
479
+ if (grid === null) {
480
+ throw new WebGpuGraphError("E_NOT_LOADED", "the spring-electrical model was bound on the exact tier", {
481
+ state: "loaded",
482
+ });
483
+ }
484
+ this.openPass = null;
485
+ bound.k1.dispatch(batch.pass("se-k1"), bound.k1Bound, ONE_WORKGROUP, [offset]);
486
+ if (stop < 1) {
487
+ return;
488
+ }
489
+ this.recordK2(batch.pass("se-attraction"), bound, offset);
490
+ if (stop < STAGE_G1) {
491
+ return;
492
+ }
493
+ const pass = batch.pass("se-grid");
494
+ const gridStop = stop < STAGE_K4 ? SE_STAGES[stop] : undefined;
495
+ grid.recordRepulsion(pass, bound.n, offset, gridStop);
496
+ if (stop < STAGE_K5) {
378
497
  return;
379
498
  }
380
499
  bound.k5.dispatch(pass, bound.k5Bound, bound.plan, [offset]);
381
- if (stop < 4) {
500
+ if (stop < STAGE_TO_SCENE) {
382
501
  return;
383
502
  }
384
- // the second pass ends the K1-K5 pass; the batch is complete after toScene, so nothing reuses it
503
+ this.recordToScene(batch, bound, offset);
504
+ }
505
+ /**
506
+ * K2's tier dispatches, or the fill of force when the graph has no arcs (spec 7.5).
507
+ * @param pass - the open compute pass
508
+ * @param bound - the bound model
509
+ * @param offset - the Fa2Params dynamic offset
510
+ */
511
+ recordK2(pass, bound, offset) {
512
+ if (bound.attraction !== null) {
513
+ recordAttraction(pass, bound.attraction, offset);
514
+ }
515
+ else if (bound.fillForceBound !== null) {
516
+ bound.fill.dispatch(pass, bound.fillForceBound, bound.fillPlan, [0]);
517
+ }
518
+ }
519
+ /**
520
+ * The toScene pass that ends the iteration's pass; the batch is complete after it, so nothing reuses the pass.
521
+ * @param batch - the batch
522
+ * @param bound - the bound model
523
+ * @param offset - the Fa2Params dynamic offset
524
+ */
525
+ recordToScene(batch, bound, offset) {
385
526
  this.openPass = null;
386
527
  const scenePass = batch.pass("se-to-scene");
387
528
  bound.toScene.dispatch(scenePass, bound.toSceneBound, bound.plan, [offset]);
388
529
  }
389
530
  /**
390
- * kineticEnergy = 0 and temperature = 0 in the header (the velocities start at 0 through the buffer's `zero`).
531
+ * kineticEnergy = 0 and temperature = 0 in the header (the velocities start at 0 through the buffer's `zero`);
532
+ * on a grid load the frame of the first build (K1 folds nothing on the first iteration).
391
533
  * @param state - the state writer of the simulation
392
534
  */
393
535
  onLoad(state) {
394
536
  state.set("kineticEnergy", 0);
395
537
  state.set("temperature", 0);
538
+ if (this.nextGrid !== null) {
539
+ writeGridFrame(state, this.nextGrid, this.tuning.extentFactor);
540
+ }
396
541
  }
397
542
  /**
398
543
  * Nothing: the velocities carry on (ngraph has no reheat; a drag lands in the next batch through the override
@@ -411,9 +556,10 @@ export class SpringElectricalModel {
411
556
  this.current = resolveSpringElectricalOptions(patch, this.current);
412
557
  }
413
558
  /**
414
- * Decodes the state header and the k trace records of a completed batch into SpringElectricalStats: the exact
415
- * tier with null grid fields; msPerIteration null (the simulation owns the clock); `kineticEnergy` is the last
416
- * folded value (one iteration behind the last integrate, PD-4).
559
+ * Decodes the state header and the k trace records of a completed batch into SpringElectricalStats:
560
+ * `repulsionTier` is the bound tier, the grid fields are the header's on the grid tier and null on the exact
561
+ * tier; msPerIteration null (the simulation owns the clock); `kineticEnergy` is the last folded value (one
562
+ * iteration behind the last integrate, PD-4).
417
563
  * @param state - a DataView over the 256-byte state header
418
564
  * @param trace - a DataView over the k Fa2Trace records of the batch
419
565
  * @returns the stats
@@ -431,15 +577,16 @@ export class SpringElectricalModel {
431
577
  settledCount: scalar(record, "settledCount"),
432
578
  });
433
579
  }
580
+ const grid = this.resources?.tier === "grid";
434
581
  return {
435
582
  iteration: scalar(header, "iteration"),
436
583
  meanDisplacement: scalar(header, "meanDisplacement"),
437
584
  rmsRadius: scalar(header, "rmsRadius"),
438
585
  layoutRadius: scalar(header, "radius"),
439
586
  centroid: [centroid[0], centroid[1], centroid[2]],
440
- repulsionTier: "exact",
441
- maxCellOccupancy: null,
442
- outsideGrid: null,
587
+ repulsionTier: grid ? "grid" : "exact",
588
+ maxCellOccupancy: grid ? scalar(header, "maxCellOccupancy") : null,
589
+ outsideGrid: grid ? scalar(header, "outsideGrid") : null,
443
590
  msPerIteration: null,
444
591
  kineticEnergy: scalar(header, "kineticEnergy"),
445
592
  trace: records,
@@ -468,16 +615,25 @@ export class SpringElectricalModel {
468
615
  }
469
616
  throw invalid("upTo", upTo, SE_STAGES.join(" | "));
470
617
  }
471
- /** Drops the bind groups of the previous bind() (the buffers changed) and forgets the pass of a batch recorded before the rebind. */
618
+ /** Releases the grid stage's lease and the bind groups (the simulation calls it from dispose() once every in-flight batch has settled). */
619
+ dispose() {
620
+ this.dropBound();
621
+ }
622
+ /** Drops the bind groups of the previous bind() (the buffers changed), releases the grid stage's lease and forgets the pass of a batch recorded before the rebind. */
472
623
  dropBound() {
473
624
  this.openPass = null;
474
625
  const { bound } = this;
475
626
  if (bound === null) {
476
627
  return;
477
628
  }
478
- for (const kernel of [bound.k1, bound.k2, bound.k3, bound.k5, bound.toScene, bound.fill]) {
629
+ for (const kernel of [bound.k1, bound.k5, bound.toScene, bound.fill]) {
630
+ kernel.invalidate();
631
+ }
632
+ bound.k3?.invalidate();
633
+ for (const [kernel] of bound.attraction?.kernels ?? []) {
479
634
  kernel.invalidate();
480
635
  }
636
+ bound.grid?.dispose();
481
637
  this.bound = null;
482
638
  }
483
639
  }
@@ -493,7 +649,8 @@ function resolvePatch(patch, current) {
493
649
  }
494
650
  /**
495
651
  * Spec 3.3 createSpringElectrical, verbatim: a GpuLayoutSimulation running ngraph's spring-electrical model on the
496
- * exact repulsion tier with ngraph's defaults (spec 7.20) and the GPU-only tuning of GpuLayoutTuning.
652
+ * exact or the grid repulsion tier (spec 7.8) with ngraph's defaults (spec 7.20) and the GPU-only tuning of
653
+ * GpuLayoutTuning.
497
654
  * @param ctx - the context (E_DISPOSED / E_DEVICE_LOST through assertReady)
498
655
  * @param options - the spring-electrical options and the GPU-only tuning knobs in one record
499
656
  * @returns the simulation in state "created"; load() next
@@ -1 +1 @@
1
- {"version":3,"file":"spring-electrical.js","sourceRoot":"","sources":["../../../src/layouts/spring-electrical.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,EACH,uBAAuB,EACvB,WAAW,EACX,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,GACrB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAqB,MAA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