@graphty/webgpu-graph-algorithms 0.6.14 → 0.6.16

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 (197) hide show
  1. package/README.md +52 -52
  2. package/dist/browser.js +1 -1
  3. package/dist/chunks/{context-Bi6AhScG.js → context-VIvatQOo.js} +69 -34
  4. package/dist/chunks/context-VIvatQOo.js.map +1 -0
  5. package/dist/node.js +1 -1
  6. package/dist/src/accelerator.d.ts +5 -3
  7. package/dist/src/accelerator.d.ts.map +1 -1
  8. package/dist/src/accelerator.js +101 -5
  9. package/dist/src/accelerator.js.map +1 -1
  10. package/dist/src/algorithms/all-pairs.d.ts +41 -0
  11. package/dist/src/algorithms/all-pairs.d.ts.map +1 -0
  12. package/dist/src/algorithms/all-pairs.js +181 -0
  13. package/dist/src/algorithms/all-pairs.js.map +1 -0
  14. package/dist/src/algorithms/betweenness.d.ts +70 -0
  15. package/dist/src/algorithms/betweenness.d.ts.map +1 -0
  16. package/dist/src/algorithms/betweenness.js +538 -0
  17. package/dist/src/algorithms/betweenness.js.map +1 -0
  18. package/dist/src/algorithms/closeness.d.ts +15 -5
  19. package/dist/src/algorithms/closeness.d.ts.map +1 -1
  20. package/dist/src/algorithms/closeness.js +112 -26
  21. package/dist/src/algorithms/closeness.js.map +1 -1
  22. package/dist/src/algorithms/components.d.ts +9 -1
  23. package/dist/src/algorithms/components.d.ts.map +1 -1
  24. package/dist/src/algorithms/components.js +2 -2
  25. package/dist/src/algorithms/components.js.map +1 -1
  26. package/dist/src/algorithms/label-propagation.d.ts +31 -0
  27. package/dist/src/algorithms/label-propagation.d.ts.map +1 -0
  28. package/dist/src/algorithms/label-propagation.js +254 -0
  29. package/dist/src/algorithms/label-propagation.js.map +1 -0
  30. package/dist/src/algorithms/simple-symmetric.d.ts +88 -0
  31. package/dist/src/algorithms/simple-symmetric.d.ts.map +1 -0
  32. package/dist/src/algorithms/simple-symmetric.js +347 -0
  33. package/dist/src/algorithms/simple-symmetric.js.map +1 -0
  34. package/dist/src/algorithms/triangles.d.ts +34 -0
  35. package/dist/src/algorithms/triangles.d.ts.map +1 -0
  36. package/dist/src/algorithms/triangles.js +203 -0
  37. package/dist/src/algorithms/triangles.js.map +1 -0
  38. package/dist/src/constants.d.ts +53 -0
  39. package/dist/src/constants.d.ts.map +1 -1
  40. package/dist/src/constants.js +53 -0
  41. package/dist/src/constants.js.map +1 -1
  42. package/dist/src/index.d.ts +12 -3
  43. package/dist/src/index.d.ts.map +1 -1
  44. package/dist/src/index.js +8 -1
  45. package/dist/src/index.js.map +1 -1
  46. package/dist/src/kernel/prelude.d.ts.map +1 -1
  47. package/dist/src/kernel/prelude.js +4 -1
  48. package/dist/src/kernel/prelude.js.map +1 -1
  49. package/dist/src/kernels.d.ts +24 -6
  50. package/dist/src/kernels.d.ts.map +1 -1
  51. package/dist/src/kernels.js +373 -7
  52. package/dist/src/kernels.js.map +1 -1
  53. package/dist/src/memory/residency.js +15 -4
  54. package/dist/src/memory/residency.js.map +1 -1
  55. package/dist/src/primitives/coo-to-csr.d.ts +73 -0
  56. package/dist/src/primitives/coo-to-csr.d.ts.map +1 -0
  57. package/dist/src/primitives/coo-to-csr.js +183 -0
  58. package/dist/src/primitives/coo-to-csr.js.map +1 -0
  59. package/dist/src/primitives/frontier.d.ts +2 -0
  60. package/dist/src/primitives/frontier.d.ts.map +1 -1
  61. package/dist/src/primitives/frontier.js +2 -0
  62. package/dist/src/primitives/frontier.js.map +1 -1
  63. package/dist/src/primitives/group-by-key.d.ts +82 -0
  64. package/dist/src/primitives/group-by-key.d.ts.map +1 -0
  65. package/dist/src/primitives/group-by-key.js +147 -0
  66. package/dist/src/primitives/group-by-key.js.map +1 -0
  67. package/dist/src/types/accelerator.d.ts +19 -7
  68. package/dist/src/types/accelerator.d.ts.map +1 -1
  69. package/dist/src/types/algorithms.d.ts +4 -0
  70. package/dist/src/types/algorithms.d.ts.map +1 -1
  71. package/dist/src/types/all-pairs.d.ts +35 -0
  72. package/dist/src/types/all-pairs.d.ts.map +1 -0
  73. package/dist/src/types/all-pairs.js +8 -0
  74. package/dist/src/types/all-pairs.js.map +1 -0
  75. package/dist/src/types/betweenness.d.ts +35 -0
  76. package/dist/src/types/betweenness.d.ts.map +1 -0
  77. package/dist/src/types/betweenness.js +7 -0
  78. package/dist/src/types/betweenness.js.map +1 -0
  79. package/dist/src/types/community.d.ts +18 -0
  80. package/dist/src/types/community.d.ts.map +1 -0
  81. package/dist/src/types/community.js +5 -0
  82. package/dist/src/types/community.js.map +1 -0
  83. package/dist/src/types/structure.d.ts +27 -0
  84. package/dist/src/types/structure.d.ts.map +1 -0
  85. package/dist/src/types/structure.js +8 -0
  86. package/dist/src/types/structure.js.map +1 -0
  87. package/dist/src/wgsl/apsp-fw.wgsl.d.ts +25 -0
  88. package/dist/src/wgsl/apsp-fw.wgsl.d.ts.map +1 -0
  89. package/dist/src/wgsl/apsp-fw.wgsl.js +113 -0
  90. package/dist/src/wgsl/apsp-fw.wgsl.js.map +1 -0
  91. package/dist/src/wgsl/apsp-init.wgsl.d.ts +12 -0
  92. package/dist/src/wgsl/apsp-init.wgsl.d.ts.map +1 -0
  93. package/dist/src/wgsl/apsp-init.wgsl.js +26 -0
  94. package/dist/src/wgsl/apsp-init.wgsl.js.map +1 -0
  95. package/dist/src/wgsl/bc-backward.wgsl.d.ts +15 -0
  96. package/dist/src/wgsl/bc-backward.wgsl.d.ts.map +1 -0
  97. package/dist/src/wgsl/bc-backward.wgsl.js +34 -0
  98. package/dist/src/wgsl/bc-backward.wgsl.js.map +1 -0
  99. package/dist/src/wgsl/bc-edge-gather.wgsl.d.ts +12 -0
  100. package/dist/src/wgsl/bc-edge-gather.wgsl.d.ts.map +1 -0
  101. package/dist/src/wgsl/bc-edge-gather.wgsl.js +36 -0
  102. package/dist/src/wgsl/bc-edge-gather.wgsl.js.map +1 -0
  103. package/dist/src/wgsl/bc-finalize.wgsl.d.ts +21 -0
  104. package/dist/src/wgsl/bc-finalize.wgsl.d.ts.map +1 -0
  105. package/dist/src/wgsl/bc-finalize.wgsl.js +47 -0
  106. package/dist/src/wgsl/bc-finalize.wgsl.js.map +1 -0
  107. package/dist/src/wgsl/bc-forward-edge.wgsl.d.ts +15 -0
  108. package/dist/src/wgsl/bc-forward-edge.wgsl.d.ts.map +1 -0
  109. package/dist/src/wgsl/bc-forward-edge.wgsl.js +76 -0
  110. package/dist/src/wgsl/bc-forward-edge.wgsl.js.map +1 -0
  111. package/dist/src/wgsl/bc-forward.wgsl.d.ts +23 -0
  112. package/dist/src/wgsl/bc-forward.wgsl.d.ts.map +1 -0
  113. package/dist/src/wgsl/bc-forward.wgsl.js +106 -0
  114. package/dist/src/wgsl/bc-forward.wgsl.js.map +1 -0
  115. package/dist/src/wgsl/bc-gather.wgsl.d.ts +9 -0
  116. package/dist/src/wgsl/bc-gather.wgsl.d.ts.map +1 -0
  117. package/dist/src/wgsl/bc-gather.wgsl.js +20 -0
  118. package/dist/src/wgsl/bc-gather.wgsl.js.map +1 -0
  119. package/dist/src/wgsl/closeness-reduce.wgsl.d.ts +4 -1
  120. package/dist/src/wgsl/closeness-reduce.wgsl.d.ts.map +1 -1
  121. package/dist/src/wgsl/closeness-reduce.wgsl.js +8 -4
  122. package/dist/src/wgsl/closeness-reduce.wgsl.js.map +1 -1
  123. package/dist/src/wgsl/closeness-sweep.wgsl.d.ts +4 -2
  124. package/dist/src/wgsl/closeness-sweep.wgsl.d.ts.map +1 -1
  125. package/dist/src/wgsl/closeness-sweep.wgsl.js +12 -2
  126. package/dist/src/wgsl/closeness-sweep.wgsl.js.map +1 -1
  127. package/dist/src/wgsl/coo-emit.wgsl.d.ts +10 -0
  128. package/dist/src/wgsl/coo-emit.wgsl.d.ts.map +1 -0
  129. package/dist/src/wgsl/coo-emit.wgsl.js +33 -0
  130. package/dist/src/wgsl/coo-emit.wgsl.js.map +1 -0
  131. package/dist/src/wgsl/coo-scatter.wgsl.d.ts +15 -0
  132. package/dist/src/wgsl/coo-scatter.wgsl.d.ts.map +1 -0
  133. package/dist/src/wgsl/coo-scatter.wgsl.js +32 -0
  134. package/dist/src/wgsl/coo-scatter.wgsl.js.map +1 -0
  135. package/dist/src/wgsl/group-by-key-row.wgsl.d.ts +26 -0
  136. package/dist/src/wgsl/group-by-key-row.wgsl.d.ts.map +1 -0
  137. package/dist/src/wgsl/group-by-key-row.wgsl.js +146 -0
  138. package/dist/src/wgsl/group-by-key-row.wgsl.js.map +1 -0
  139. package/dist/src/wgsl/lpa-step.wgsl.d.ts +10 -0
  140. package/dist/src/wgsl/lpa-step.wgsl.d.ts.map +1 -0
  141. package/dist/src/wgsl/lpa-step.wgsl.js +35 -0
  142. package/dist/src/wgsl/lpa-step.wgsl.js.map +1 -0
  143. package/dist/src/wgsl/orient-flags.wgsl.d.ts +9 -0
  144. package/dist/src/wgsl/orient-flags.wgsl.d.ts.map +1 -0
  145. package/dist/src/wgsl/orient-flags.wgsl.js +21 -0
  146. package/dist/src/wgsl/orient-flags.wgsl.js.map +1 -0
  147. package/dist/src/wgsl/run-flags.wgsl.d.ts +8 -0
  148. package/dist/src/wgsl/run-flags.wgsl.d.ts.map +1 -0
  149. package/dist/src/wgsl/run-flags.wgsl.js +18 -0
  150. package/dist/src/wgsl/run-flags.wgsl.js.map +1 -0
  151. package/dist/src/wgsl/tri-intersect.wgsl.d.ts +11 -0
  152. package/dist/src/wgsl/tri-intersect.wgsl.d.ts.map +1 -0
  153. package/dist/src/wgsl/tri-intersect.wgsl.js +64 -0
  154. package/dist/src/wgsl/tri-intersect.wgsl.js.map +1 -0
  155. package/dist/webgpu-graph-algorithms.js +2828 -321
  156. package/dist/webgpu-graph-algorithms.js.map +1 -1
  157. package/package.json +5 -5
  158. package/src/accelerator.ts +130 -7
  159. package/src/algorithms/all-pairs.ts +228 -0
  160. package/src/algorithms/betweenness.ts +739 -0
  161. package/src/algorithms/closeness.ts +124 -32
  162. package/src/algorithms/components.ts +2 -2
  163. package/src/algorithms/label-propagation.ts +280 -0
  164. package/src/algorithms/simple-symmetric.ts +409 -0
  165. package/src/algorithms/triangles.ts +240 -0
  166. package/src/constants.ts +53 -0
  167. package/src/index.ts +20 -1
  168. package/src/kernel/prelude.ts +6 -0
  169. package/src/kernels.ts +411 -10
  170. package/src/memory/residency.ts +15 -4
  171. package/src/primitives/coo-to-csr.ts +251 -0
  172. package/src/primitives/frontier.ts +4 -0
  173. package/src/primitives/group-by-key.ts +209 -0
  174. package/src/types/accelerator.ts +26 -6
  175. package/src/types/algorithms.ts +5 -0
  176. package/src/types/all-pairs.ts +37 -0
  177. package/src/types/betweenness.ts +38 -0
  178. package/src/types/community.ts +18 -0
  179. package/src/types/structure.ts +28 -0
  180. package/src/wgsl/apsp-fw.wgsl.ts +112 -0
  181. package/src/wgsl/apsp-init.wgsl.ts +25 -0
  182. package/src/wgsl/bc-backward.wgsl.ts +33 -0
  183. package/src/wgsl/bc-edge-gather.wgsl.ts +35 -0
  184. package/src/wgsl/bc-finalize.wgsl.ts +46 -0
  185. package/src/wgsl/bc-forward-edge.wgsl.ts +75 -0
  186. package/src/wgsl/bc-forward.wgsl.ts +105 -0
  187. package/src/wgsl/bc-gather.wgsl.ts +19 -0
  188. package/src/wgsl/closeness-reduce.wgsl.ts +8 -4
  189. package/src/wgsl/closeness-sweep.wgsl.ts +12 -2
  190. package/src/wgsl/coo-emit.wgsl.ts +32 -0
  191. package/src/wgsl/coo-scatter.wgsl.ts +31 -0
  192. package/src/wgsl/group-by-key-row.wgsl.ts +145 -0
  193. package/src/wgsl/lpa-step.wgsl.ts +34 -0
  194. package/src/wgsl/orient-flags.wgsl.ts +20 -0
  195. package/src/wgsl/run-flags.wgsl.ts +17 -0
  196. package/src/wgsl/tri-intersect.wgsl.ts +63 -0
  197. package/dist/chunks/context-Bi6AhScG.js.map +0 -1
@@ -12,13 +12,26 @@
12
12
  * dedupe-claim and dedupe-filter; P8-T4 adds frontier-finalize with the FrontierCounters and FrontierParams blocks;
13
13
  * P8-T5 adds advance-expand; P8-T6 adds bfs-contract and sssp-pred; P8-T7 adds bfs-fused; P8-T8 adds bfs-bottom-up,
14
14
  * bfs-bitset-build and bfs-unvisited-flags; P8-T9 adds sssp-relax; P8-T10 adds bf-relax with the BfParams and BfFlags
15
- * blocks; P8-T11 adds closeness-sweep and closeness-reduce. This file is the only importer of src/wgsl/** (spec 3.2;
15
+ * blocks; P8-T11 adds closeness-sweep and closeness-reduce; P9 (betweenness) adds bc-finalize, bc-forward,
16
+ * bc-backward, bc-gather, bc-edge-gather and bc-forward-edge with the BcParams block; all-pairs shortest paths
17
+ * (design 8.7) adds apsp-init and apsp-fw with the ApspParams block. P11 (the structure and community phase, plan
18
+ * design/webgpu/plans/2026-09-23-webgpu-p11-structure-and-community.md) adds the graph build on the device (coo-emit,
19
+ * run-flags, coo-scatter), the per-row group-by-key (group-by-key-row), label propagation's step (lpa-step) and
20
+ * triangle counting (orient-flags, tri-intersect). This file is the only importer of src/wgsl/** (spec 3.2;
16
21
  * test/layers.test.ts).
17
22
  */
18
23
  import { STATE_HEADER_BYTES } from "./constants.js";
19
24
  import { WebGpuGraphError } from "./errors.js";
20
25
  import { UniformBlock } from "./kernel/struct-block.js";
21
26
  import { advanceExpandWgsl } from "./wgsl/advance-expand.wgsl.js";
27
+ import { apspFwWgsl } from "./wgsl/apsp-fw.wgsl.js";
28
+ import { apspInitWgsl } from "./wgsl/apsp-init.wgsl.js";
29
+ import { bcBackwardWgsl } from "./wgsl/bc-backward.wgsl.js";
30
+ import { bcEdgeGatherWgsl } from "./wgsl/bc-edge-gather.wgsl.js";
31
+ import { bcFinalizeWgsl } from "./wgsl/bc-finalize.wgsl.js";
32
+ import { bcForwardWgsl } from "./wgsl/bc-forward.wgsl.js";
33
+ import { bcForwardEdgeWgsl } from "./wgsl/bc-forward-edge.wgsl.js";
34
+ import { bcGatherWgsl } from "./wgsl/bc-gather.wgsl.js";
22
35
  import { bfRelaxWgsl } from "./wgsl/bf-relax.wgsl.js";
23
36
  import { bfsBitsetBuildWgsl } from "./wgsl/bfs-bitset-build.wgsl.js";
24
37
  import { bfsBottomUpWgsl } from "./wgsl/bfs-bottom-up.wgsl.js";
@@ -29,6 +42,8 @@ import { bfsUnvisitedFlagsWgsl } from "./wgsl/bfs-unvisited-flags.wgsl.js";
29
42
  import { closenessReduceWgsl } from "./wgsl/closeness-reduce.wgsl.js";
30
43
  import { closenessSweepWgsl } from "./wgsl/closeness-sweep.wgsl.js";
31
44
  import { compactScatterWgsl } from "./wgsl/compact-scatter.wgsl.js";
45
+ import { cooEmitWgsl } from "./wgsl/coo-emit.wgsl.js";
46
+ import { cooScatterWgsl } from "./wgsl/coo-scatter.wgsl.js";
32
47
  import { countingScatterWgsl } from "./wgsl/counting-scatter.wgsl.js";
33
48
  import { dedupeClaimWgsl } from "./wgsl/dedupe-claim.wgsl.js";
34
49
  import { dedupeFilterWgsl } from "./wgsl/dedupe-filter.wgsl.js";
@@ -47,19 +62,24 @@ import { gridCentroidHubWgsl } from "./wgsl/grid-centroid-hub.wgsl.js";
47
62
  import { gridDownsampleWgsl } from "./wgsl/grid-downsample.wgsl.js";
48
63
  import { gridFarFieldWgsl } from "./wgsl/grid-far-field.wgsl.js";
49
64
  import { gridNearFieldWgsl } from "./wgsl/grid-near-field.wgsl.js";
65
+ import { groupByKeyRowWgsl } from "./wgsl/group-by-key-row.wgsl.js";
50
66
  import { histogramWgsl } from "./wgsl/histogram.wgsl.js";
51
67
  import { indirectFinalizeWgsl } from "./wgsl/indirect-finalize.wgsl.js";
68
+ import { lpaStepWgsl } from "./wgsl/lpa-step.wgsl.js";
69
+ import { orientFlagsWgsl } from "./wgsl/orient-flags.wgsl.js";
52
70
  import { prFinalizeWgsl } from "./wgsl/pr-finalize.wgsl.js";
53
71
  import { prScaleWgsl } from "./wgsl/pr-scale.wgsl.js";
54
72
  import { radixHistWgsl } from "./wgsl/radix-hist.wgsl.js";
55
73
  import { radixScatterWgsl } from "./wgsl/radix-scatter.wgsl.js";
56
74
  import { reduceWgsl } from "./wgsl/reduce.wgsl.js";
75
+ import { runFlagsWgsl } from "./wgsl/run-flags.wgsl.js";
57
76
  import { scanAddWgsl } from "./wgsl/scan-add.wgsl.js";
58
77
  import { scanBlockWgsl } from "./wgsl/scan-block.wgsl.js";
59
78
  import { segmentedReduceWgsl } from "./wgsl/segmented-reduce.wgsl.js";
60
79
  import { spmvPullWgsl } from "./wgsl/spmv-pull.wgsl.js";
61
80
  import { ssspPredWgsl } from "./wgsl/sssp-pred.wgsl.js";
62
81
  import { ssspRelaxWgsl } from "./wgsl/sssp-relax.wgsl.js";
82
+ import { triIntersectWgsl } from "./wgsl/tri-intersect.wgsl.js";
63
83
  import { wccCompressWgsl } from "./wgsl/wcc-compress.wgsl.js";
64
84
  import { wccLinkEdgesWgsl } from "./wgsl/wcc-link-edges.wgsl.js";
65
85
  import { wccLinkSampleWgsl } from "./wgsl/wcc-link-sample.wgsl.js";
@@ -288,7 +308,9 @@ export const COMPACT_PARAMS = UniformBlock.define("CompactParams", [
288
308
  * one; every level kernel is a direct dispatch that reads it first -- G8-F5), `nextDegreeSum` @100 (issue #391: the
289
309
  * out-degree sum of the vertices the level claimed, accumulated by `bfs-next-degree` at the end of every level and
290
310
  * read, subtracted and zeroed by the next boundary -- Beamer's m_f measured on the frontier the boundary decides
291
- * for, not on the one it has just expanded). The words nothing writes before P8-T8 / P8-T9 are declared now because
311
+ * for, not on the one it has just expanded); `stackTop` @104 (betweenness: the append cursor of the claim log, which
312
+ * `bc-finalize` also writes into `ends` at every level boundary) and `sigmaOverflow` @108 (betweenness: 1 once a u32
313
+ * path count wrapped) are APPENDED so every earlier word keeps its byte offset. The words nothing writes before P8-T8 / P8-T9 are declared now because
292
314
  * the byte layout is what the single result copy decodes.
293
315
  */
294
316
  export const FRONTIER_COUNTERS = UniformBlock.define("FrontierCounters", [
@@ -318,6 +340,8 @@ export const FRONTIER_COUNTERS = UniformBlock.define("FrontierCounters", [
318
340
  ["deltaBits", "u32"],
319
341
  ["path", "u32"],
320
342
  ["nextDegreeSum", "u32"],
343
+ ["stackTop", "u32"],
344
+ ["sigmaOverflow", "u32"],
321
345
  ], { layout: "storage" });
322
346
  /**
323
347
  * `FrontierParams` (uniform, 80 B; P8-T4): the params block every P8 kernel except the three compact / dedupe
@@ -327,7 +351,8 @@ export const FRONTIER_COUNTERS = UniformBlock.define("FrontierCounters", [
327
351
  * `arcEnd` @44 (the bound arc window), `predKind` @48 (0 arc, 1 node), `bitsBase` @52, `source` @56, `stride` @60
328
352
  * (a grid-stride plan's stride), `firstOfSubmit` @64 (the boundary's index inside its submit, clamped to 1: both
329
353
  * the unvisited-count and the unvisited-degree-sum subtraction run at >= 1, issue #391), `iteration` @68 (an
330
- * `sssp-pred` hop pass, P8-T9), `pad1` @72, `pad2` @76. The `slotBase` field that once addressed the selector's indirect slots went with
354
+ * `sssp-pred` hop pass, P8-T9), `perNode` @72 (`closeness-sweep`: 1 also folds every claim into the per-node
355
+ * distance sums of a sampled run), `pad2` @76. The `slotBase` field that once addressed the selector's indirect slots went with
331
356
  * the slots (2026-09-25); `pad2` keeps the block an explicit 80 bytes, the way every block here is padded.
332
357
  */
333
358
  export const FRONTIER_PARAMS = UniformBlock.define("FrontierParams", [
@@ -349,9 +374,20 @@ export const FRONTIER_PARAMS = UniformBlock.define("FrontierParams", [
349
374
  ["stride", "u32"],
350
375
  ["firstOfSubmit", "u32"],
351
376
  ["iteration", "u32"],
352
- ["pad1", "u32"],
377
+ ["perNode", "u32"],
353
378
  ["pad2", "u32"],
354
379
  ]);
380
+ /** `BcParams` (uniform, 32 B; betweenness): `n` @0, `k` @4 (the batch's sources), `start` @8 (the first log index of a backward level), `count` @12 (a backward level's entries, or the edge count of `bc-forward-edge`), `stride` @16 (a grid-stride plan's stride), `role` @20 (`bc-finalize`: 0 the level boundary, 1 the seed), `pad0` @24, `pad1` @28. */
381
+ export const BC_PARAMS = UniformBlock.define("BcParams", [
382
+ ["n", "u32"],
383
+ ["k", "u32"],
384
+ ["start", "u32"],
385
+ ["count", "u32"],
386
+ ["stride", "u32"],
387
+ ["role", "u32"],
388
+ ["pad0", "u32"],
389
+ ["pad1", "u32"],
390
+ ]);
355
391
  /** `BfParams` (uniform, 16 B; P8-T10): `edgeCount` @0 (the logical edges of the `edgeList` view), `stride` @4 (the grid-stride plan's stride), `maxRetries` @8 (PD-12's compare-exchange bound), `cutoffBits` @12 (the f32 bit pattern of the CPU port's `cutoff`, `+Inf` when absent). */
356
392
  export const BF_PARAMS = UniformBlock.define("BfParams", [
357
393
  ["edgeCount", "u32"],
@@ -366,6 +402,34 @@ export const BF_FLAGS = UniformBlock.define("BfFlags", [
366
402
  ["pad0", "u32"],
367
403
  ["pad1", "u32"],
368
404
  ], { layout: "storage" });
405
+ /** `ApspParams` (uniform, 16 B; design 8.7): `n` @0 (the node count, the matrix side), `round` @4 (the pivot block index of the blocked Floyd-Warshall round), `blocks` @8 (`ceil(n / APSP_TILE)`), `infBits` @12 (`F32_INF_BITS`: a kernel reads `+Infinity` from a uniform because Tint refuses it as a constant expression). */
406
+ export const APSP_PARAMS = UniformBlock.define("ApspParams", [
407
+ ["n", "u32"],
408
+ ["round", "u32"],
409
+ ["blocks", "u32"],
410
+ ["infBits", "u32"],
411
+ ]);
412
+ /** `CooParams` (uniform, 16 B; P11): `count` @0 (the arcs or positions of the dispatch), `pad0` @4, `pad1` @8, `pad2` @12. The one params block of `coo-emit`, `run-flags`, `coo-scatter`, `orient-flags` and `tri-intersect`. */
413
+ export const COO_PARAMS = UniformBlock.define("CooParams", [
414
+ ["count", "u32"],
415
+ ["pad0", "u32"],
416
+ ["pad1", "u32"],
417
+ ["pad2", "u32"],
418
+ ]);
419
+ /** `GroupParams` (uniform, 16 B; P11): `rowsBase` @0 (the word of `rows` where the dispatch's row list starts), `basesBase` @4 (the word where the workgroup tier's region offsets start), `count` @8 (the rows of the dispatch), `pad0` @12. */
420
+ export const GROUP_PARAMS = UniformBlock.define("GroupParams", [
421
+ ["rowsBase", "u32"],
422
+ ["basesBase", "u32"],
423
+ ["count", "u32"],
424
+ ["pad0", "u32"],
425
+ ]);
426
+ /** `LpaParams` (uniform, 16 B; P11): `n` @0, `direction` @4 (0: a pass that moves labels down only, 1: up only), `counterIndex` @8 (the word of `counters` that receives the pass's move count), `pad0` @12. */
427
+ export const LPA_PARAMS = UniformBlock.define("LpaParams", [
428
+ ["n", "u32"],
429
+ ["direction", "u32"],
430
+ ["counterIndex", "u32"],
431
+ ["pad0", "u32"],
432
+ ]);
369
433
  // ---- the entries (contract 3.10.1; group 0 = graph, 1 = state, 2 = params, 3 = cold)
370
434
  /**
371
435
  * One binding declaration of contract 3.9, so the tables below read like the rows of 3.10.1.
@@ -1129,7 +1193,7 @@ const CLOSENESS_SWEEP = {
1129
1193
  snippetSlots: [],
1130
1194
  phase: "P8",
1131
1195
  };
1132
- /** `closeness-reduce` (design 8.4, 9.7; P8-T11, PD-13): the one-lane bookkeeping of the sweep -- role 0 the level boundary (`done` from the previous level's compacted count, `newCount` folded into `reached` and the 64-bit `sum` at `level + 1` with the 16-bit split product and the carry, `level` advanced), role 1 the seed of a batch (the sources' bits into `visited` and the level-0 frontier region, their flags, `counters[0] = k`, `level = U32_MAX`); 3 storage bindings (`counters` and `perSource` as `array<atomic<u32>>`, `bits` plain: one lane writes the seed). */
1196
+ /** `closeness-reduce` (design 8.4, 9.7; P8-T11, PD-13): the one-lane bookkeeping of the sweep -- role 0 the level boundary (`done` from the previous level's compacted count, `newCount` folded into `reached` and the 64-bit `sum` at `level + 1` with the 16-bit split product and the carry, `level` advanced), role 1 the seed of a batch (the sources' bits into `visited` and the level-0 frontier region, their flags, `counters[0] = k`, `level = U32_MAX`), role 2 the same seed from a sampled run's source list; 3 storage bindings (`counters` and `perSource` as `array<atomic<u32>>`, `bits` plain: one lane writes the seed). */
1133
1197
  const CLOSENESS_REDUCE = {
1134
1198
  id: "closeness-reduce",
1135
1199
  body: closenessReduceWgsl,
@@ -1146,6 +1210,291 @@ const CLOSENESS_REDUCE = {
1146
1210
  snippetSlots: [],
1147
1211
  phase: "P8",
1148
1212
  };
1213
+ /** `bc-finalize` (design 8.4, 5.4): the one-lane bookkeeping of a betweenness batch -- role 1 seeds it (depth 0 and one path for the k seed entries of the claim log, `stackTop = k`, `level = U32_MAX`), role 0 is the level boundary (`ends[level + 1] = stackTop`, `frontierCount`, `done` on an empty level); 5 storage bindings (the counters block as `array<atomic<u32>>`, `ends`, `S` read-only, `depthK` and `sigmaK` plain: one lane writes the seed). The design's finalize row has 2; `ends` is the third (the level boundary), and the seed's `S`, `depthK` and `sigmaK` make it five. */
1214
+ const BC_FINALIZE = {
1215
+ id: "bc-finalize",
1216
+ body: bcFinalizeWgsl,
1217
+ entryPoint: "bc_finalize",
1218
+ bindings: [
1219
+ decl(1, 0, "counters", "storage", "array<atomic<u32>>"),
1220
+ decl(1, 1, "ends", "storage", "array<u32>"),
1221
+ decl(1, 2, "S", "storage-ro", "array<u32>"),
1222
+ decl(1, 3, "depthK", "storage", "array<u32>"),
1223
+ decl(1, 4, "sigmaK", "storage", "array<u32>"),
1224
+ decl(2, 0, "P", "uniform", "BcParams"),
1225
+ ],
1226
+ overrideDecls: [],
1227
+ uniforms: [BC_PARAMS],
1228
+ needs: [],
1229
+ snippetSlots: [],
1230
+ phase: "P9",
1231
+ };
1232
+ /** `bc-forward` (design 8.4, 8.10 "BC forward (tagged)", 16.1): one level of the tagged multi-source BFS -- the block-mapped strip over the level's range of the claim log with the claim, the path count and the overflow report inline, the winners appended to the log; 7 storage bindings (`rowPtr`, `colIdx`, `S` read-write -- the level being read and the appends are ranges of ONE binding --, `ends` read-only, the counters block, `depthK` and `sigmaK` as `array<atomic<u32>>`); the inlined Hillis-Steele scan, so `needs: []`. */
1233
+ const BC_FORWARD = {
1234
+ id: "bc-forward",
1235
+ body: bcForwardWgsl,
1236
+ entryPoint: "bc_forward",
1237
+ bindings: [
1238
+ decl(1, 0, "rowPtr", "storage-ro", "array<u32>"),
1239
+ decl(1, 1, "colIdx", "storage-ro", "array<u32>"),
1240
+ decl(1, 2, "S", "storage", "array<u32>"),
1241
+ decl(1, 3, "ends", "storage-ro", "array<u32>"),
1242
+ decl(1, 4, "counters", "storage", "array<atomic<u32>>"),
1243
+ decl(1, 5, "depthK", "storage", "array<atomic<u32>>"),
1244
+ decl(1, 6, "sigmaK", "storage", "array<atomic<u32>>"),
1245
+ decl(2, 0, "P", "uniform", "BcParams"),
1246
+ ],
1247
+ overrideDecls: [],
1248
+ uniforms: [BC_PARAMS],
1249
+ needs: [],
1250
+ snippetSlots: [],
1251
+ phase: "P9",
1252
+ };
1253
+ /** `bc-backward` (design 8.4, 8.10 "BC backward (successor pull)"): one level of the dependency accumulation, one invocation per log entry of a host-planned range, each pulling over its successors and writing its delta once; 6 storage bindings (`rowPtr`, `colIdx`, `S`, `depthK`, `sigmaK` read-only, `deltaK`). */
1254
+ const BC_BACKWARD = {
1255
+ id: "bc-backward",
1256
+ body: bcBackwardWgsl,
1257
+ entryPoint: "bc_backward",
1258
+ bindings: [
1259
+ decl(1, 0, "rowPtr", "storage-ro", "array<u32>"),
1260
+ decl(1, 1, "colIdx", "storage-ro", "array<u32>"),
1261
+ decl(1, 2, "S", "storage-ro", "array<u32>"),
1262
+ decl(1, 3, "depthK", "storage-ro", "array<u32>"),
1263
+ decl(1, 4, "sigmaK", "storage-ro", "array<u32>"),
1264
+ decl(1, 5, "deltaK", "storage", "array<f32>"),
1265
+ decl(2, 0, "P", "uniform", "BcParams"),
1266
+ ],
1267
+ overrideDecls: [],
1268
+ uniforms: [BC_PARAMS],
1269
+ needs: [],
1270
+ snippetSlots: [],
1271
+ phase: "P9",
1272
+ };
1273
+ /** `bc-gather` (design 8.4, 8.10 "BC gather"): `bc[w] += sum over s of delta[s][w]`, one invocation per vertex, no atomic; 2 storage bindings (`deltaK` read-only, `bc`). */
1274
+ const BC_GATHER = {
1275
+ id: "bc-gather",
1276
+ body: bcGatherWgsl,
1277
+ entryPoint: "bc_gather",
1278
+ bindings: [
1279
+ decl(1, 0, "deltaK", "storage-ro", "array<f32>"),
1280
+ decl(1, 1, "bc", "storage", "array<f32>"),
1281
+ decl(2, 0, "P", "uniform", "BcParams"),
1282
+ ],
1283
+ overrideDecls: [],
1284
+ uniforms: [BC_PARAMS],
1285
+ needs: [],
1286
+ snippetSlots: [],
1287
+ phase: "P9",
1288
+ };
1289
+ /** `bc-edge-gather` (design 8.4 "edge BC accumulates per arc from the same n x k deltas"): the per-arc twin of `bc-gather`, one invocation per arc (its row found by an upper-bound search over `rowPtr`) adding the arc's term over the batch's sources; 6 storage bindings (`rowPtr`, `colIdx`, `depthK`, `sigmaK`, `deltaK` read-only, `arcScores`). */
1290
+ const BC_EDGE_GATHER = {
1291
+ id: "bc-edge-gather",
1292
+ body: bcEdgeGatherWgsl,
1293
+ entryPoint: "bc_edge_gather",
1294
+ bindings: [
1295
+ decl(1, 0, "rowPtr", "storage-ro", "array<u32>"),
1296
+ decl(1, 1, "colIdx", "storage-ro", "array<u32>"),
1297
+ decl(1, 2, "depthK", "storage-ro", "array<u32>"),
1298
+ decl(1, 3, "sigmaK", "storage-ro", "array<u32>"),
1299
+ decl(1, 4, "deltaK", "storage-ro", "array<f32>"),
1300
+ decl(1, 5, "arcScores", "storage", "array<f32>"),
1301
+ decl(2, 0, "P", "uniform", "BcParams"),
1302
+ ],
1303
+ overrideDecls: [],
1304
+ uniforms: [BC_PARAMS],
1305
+ needs: [],
1306
+ snippetSlots: [],
1307
+ phase: "P9",
1308
+ };
1309
+ /** `bc-forward-edge` (design 8.4 "the edge-parallel form", 8.8 row 7): one forward level edge-parallel over the `edgeList` view for every source of the batch, with `bc-forward`'s claim, count and overflow report, appending to the same claim log; `UNDIRECTED` relaxes both directions of every edge; 7 storage bindings (`edgeSrc`, `edgeDst`, `S` read-write, `ends` read-only, the counters block, `depthK` and `sigmaK` as `array<atomic<u32>>`). */
1310
+ const BC_FORWARD_EDGE = {
1311
+ id: "bc-forward-edge",
1312
+ body: bcForwardEdgeWgsl,
1313
+ entryPoint: "bc_forward_edge",
1314
+ bindings: [
1315
+ decl(1, 0, "edgeSrc", "storage-ro", "array<u32>"),
1316
+ decl(1, 1, "edgeDst", "storage-ro", "array<u32>"),
1317
+ decl(1, 2, "S", "storage", "array<u32>"),
1318
+ decl(1, 3, "ends", "storage-ro", "array<u32>"),
1319
+ decl(1, 4, "counters", "storage", "array<atomic<u32>>"),
1320
+ decl(1, 5, "depthK", "storage", "array<atomic<u32>>"),
1321
+ decl(1, 6, "sigmaK", "storage", "array<atomic<u32>>"),
1322
+ decl(2, 0, "P", "uniform", "BcParams"),
1323
+ ],
1324
+ overrideDecls: [{ name: "UNDIRECTED", type: "bool", default: false }],
1325
+ uniforms: [BC_PARAMS],
1326
+ needs: [],
1327
+ snippetSlots: [],
1328
+ phase: "P9",
1329
+ };
1330
+ /** `apsp-init` (design 8.7): one lane per row writes that row's arcs into the `+Infinity`-filled `n x n` matrix, the cheapest of parallel arcs, then the diagonal zero; 5 storage bindings (the four graph slots -- `perm` bound to its dummy, the rows are never permuted -- and `dist`). */
1331
+ const APSP_INIT = {
1332
+ id: "apsp-init",
1333
+ body: apspInitWgsl,
1334
+ entryPoint: "apsp_init",
1335
+ bindings: GRAPH_SLOTS.concat(decl(1, 0, "dist", "storage", "array<f32>"), decl(2, 0, "P", "uniform", "ApspParams")),
1336
+ overrideDecls: [],
1337
+ uniforms: [APSP_PARAMS],
1338
+ needs: [],
1339
+ snippetSlots: [],
1340
+ phase: "P9",
1341
+ };
1342
+ /** `apsp-fw` (design 8.7): one phase of one blocked Floyd-Warshall round over 32 x 32 tiles in workgroup memory -- `PHASE` 0 the pivot block, 1 the pivot row and column, 2 every other block; 1 storage binding (`dist`, read-write). */
1343
+ const APSP_FW = {
1344
+ id: "apsp-fw",
1345
+ body: apspFwWgsl,
1346
+ entryPoint: "apsp_fw",
1347
+ bindings: [decl(1, 0, "dist", "storage", "array<f32>"), decl(2, 0, "P", "uniform", "ApspParams")],
1348
+ overrideDecls: [{ name: "PHASE", type: "u32", default: 0 }],
1349
+ uniforms: [APSP_PARAMS],
1350
+ needs: [],
1351
+ snippetSlots: [],
1352
+ phase: "P9",
1353
+ };
1354
+ /** `coo-emit` (design 6 row 10; P11): position i takes arc i, or `order[i]` under INDEXED, and writes its source, target and weight -- arc 2e is edge e as declared, 2e + 1 its reverse; a self-loop's two arcs become `INVALID_INDEX`; 7 storage bindings. */
1355
+ const COO_EMIT = {
1356
+ id: "coo-emit",
1357
+ body: cooEmitWgsl,
1358
+ entryPoint: "coo_emit",
1359
+ bindings: [
1360
+ decl(1, 0, "edgeSrc", "storage-ro", "array<u32>"),
1361
+ decl(1, 1, "edgeDst", "storage-ro", "array<u32>"),
1362
+ decl(1, 2, "edgeWeight", "storage-ro", "array<f32>"),
1363
+ decl(1, 3, "order", "storage-ro", "array<u32>"),
1364
+ decl(1, 4, "outSrc", "storage", "array<u32>"),
1365
+ decl(1, 5, "outDst", "storage", "array<u32>"),
1366
+ decl(1, 6, "outWeight", "storage", "array<f32>"),
1367
+ decl(2, 0, "P", "uniform", "CooParams"),
1368
+ ],
1369
+ overrideDecls: [
1370
+ { name: "INDEXED", type: "bool", default: false },
1371
+ { name: "WEIGHTED", type: "bool", default: false },
1372
+ ],
1373
+ uniforms: [COO_PARAMS],
1374
+ needs: [],
1375
+ snippetSlots: [],
1376
+ phase: "P11",
1377
+ };
1378
+ /** `run-flags` (design 6 row 10; P11): 1 where an arc opens a run of equal (keysA, keysB) pairs and is not dropped; 3 storage bindings. */
1379
+ const RUN_FLAGS = {
1380
+ id: "run-flags",
1381
+ body: runFlagsWgsl,
1382
+ entryPoint: "run_flags",
1383
+ bindings: [
1384
+ decl(1, 0, "keysA", "storage-ro", "array<u32>"),
1385
+ decl(1, 1, "keysB", "storage-ro", "array<u32>"),
1386
+ decl(1, 2, "flags", "storage", "array<u32>"),
1387
+ decl(2, 0, "P", "uniform", "CooParams"),
1388
+ ],
1389
+ overrideDecls: [],
1390
+ uniforms: [COO_PARAMS],
1391
+ needs: [],
1392
+ snippetSlots: [],
1393
+ phase: "P11",
1394
+ };
1395
+ /** `coo-scatter` (design 6 row 10; P11): the scatter of `cooToCsr` -- the cursor mode, or under SORTED_INPUT the order-preserving mode whose precondition flag is `cursors[0]`; 7 storage bindings. */
1396
+ const COO_SCATTER = {
1397
+ id: "coo-scatter",
1398
+ body: cooScatterWgsl,
1399
+ entryPoint: "coo_scatter",
1400
+ bindings: [
1401
+ decl(1, 0, "src", "storage-ro", "array<u32>"),
1402
+ decl(1, 1, "dst", "storage-ro", "array<u32>"),
1403
+ decl(1, 2, "weight", "storage-ro", "array<f32>"),
1404
+ decl(1, 3, "rowPtr", "storage-ro", "array<u32>"),
1405
+ decl(1, 4, "cursors", "storage", "array<atomic<u32>>"),
1406
+ decl(1, 5, "colIdx", "storage", "array<u32>"),
1407
+ decl(1, 6, "outWeight", "storage", "array<f32>"),
1408
+ decl(2, 0, "P", "uniform", "CooParams"),
1409
+ ],
1410
+ overrideDecls: [
1411
+ { name: "SORTED_INPUT", type: "bool", default: false },
1412
+ { name: "WEIGHTED", type: "bool", default: false },
1413
+ ],
1414
+ uniforms: [COO_PARAMS],
1415
+ needs: [],
1416
+ snippetSlots: [],
1417
+ phase: "P11",
1418
+ };
1419
+ /** `orient-flags` (design 8.5; P11): 1 where arc (u, v) points up the (degree, id) order, one arc per undirected edge; 4 storage bindings. */
1420
+ const ORIENT_FLAGS = {
1421
+ id: "orient-flags",
1422
+ body: orientFlagsWgsl,
1423
+ entryPoint: "orient_flags",
1424
+ bindings: [
1425
+ decl(1, 0, "rowPtr", "storage-ro", "array<u32>"),
1426
+ decl(1, 1, "colIdx", "storage-ro", "array<u32>"),
1427
+ decl(1, 2, "src", "storage-ro", "array<u32>"),
1428
+ decl(1, 3, "flags", "storage", "array<u32>"),
1429
+ decl(2, 0, "P", "uniform", "CooParams"),
1430
+ ],
1431
+ overrideDecls: [],
1432
+ uniforms: [COO_PARAMS],
1433
+ needs: [],
1434
+ snippetSlots: [],
1435
+ phase: "P11",
1436
+ };
1437
+ /** `tri-intersect` (design 8.5, 8.10 "Triangle intersection"; P11): one oriented arc per invocation, merge or binary-search intersection (SEARCH 0 chooses, 1 merge, 2 search), u32 atomic per-node counts; 4 storage bindings. */
1438
+ const TRI_INTERSECT = {
1439
+ id: "tri-intersect",
1440
+ body: triIntersectWgsl,
1441
+ entryPoint: "tri_intersect",
1442
+ bindings: [
1443
+ decl(1, 0, "rowPtr", "storage-ro", "array<u32>"),
1444
+ decl(1, 1, "colIdx", "storage-ro", "array<u32>"),
1445
+ decl(1, 2, "src", "storage-ro", "array<u32>"),
1446
+ decl(1, 3, "counts", "storage", "array<atomic<u32>>"),
1447
+ decl(2, 0, "P", "uniform", "CooParams"),
1448
+ ],
1449
+ overrideDecls: [{ name: "SEARCH", type: "u32", default: 0 }],
1450
+ uniforms: [COO_PARAMS],
1451
+ needs: [],
1452
+ snippetSlots: [],
1453
+ phase: "P11",
1454
+ };
1455
+ /** `group-by-key-row` (design 8.6; P11): per listed row, the target key with the largest summed weight (lowest key on a tie), TIER 0 a thread per row, else a workgroup per row over a global hash region; 8 storage bindings. */
1456
+ const GROUP_BY_KEY_ROW = {
1457
+ id: "group-by-key-row",
1458
+ body: groupByKeyRowWgsl,
1459
+ entryPoint: "group_by_key_row",
1460
+ bindings: [
1461
+ decl(1, 0, "rowPtr", "storage-ro", "array<u32>"),
1462
+ decl(1, 1, "colIdx", "storage-ro", "array<u32>"),
1463
+ decl(1, 2, "weights", "storage-ro", "array<f32>"),
1464
+ decl(1, 3, "keyIn", "storage-ro", "array<u32>"),
1465
+ decl(1, 4, "rows", "storage-ro", "array<u32>"),
1466
+ decl(1, 5, "hashRegion", "storage", "array<atomic<u32>>"),
1467
+ decl(1, 6, "bestKey", "storage", "array<u32>"),
1468
+ decl(1, 7, "bestScore", "storage", "array<f32>"),
1469
+ decl(2, 0, "P", "uniform", "GroupParams"),
1470
+ ],
1471
+ overrideDecls: [
1472
+ { name: "TIER", type: "u32", default: 0 },
1473
+ { name: "WEIGHTED", type: "bool", default: false },
1474
+ ],
1475
+ uniforms: [GROUP_PARAMS],
1476
+ needs: [],
1477
+ snippetSlots: [],
1478
+ phase: "P11",
1479
+ };
1480
+ /** `lpa-step` (design 8.6, 8.10 "Label propagation"; P11): a vertex adopts its best neighbour label when the move goes the pass's direction; one atomic per workgroup adds the moves to `counters[P.counterIndex]`; 4 storage bindings. */
1481
+ const LPA_STEP = {
1482
+ id: "lpa-step",
1483
+ body: lpaStepWgsl,
1484
+ entryPoint: "lpa_step",
1485
+ bindings: [
1486
+ decl(1, 0, "labelsIn", "storage-ro", "array<u32>"),
1487
+ decl(1, 1, "bestKey", "storage-ro", "array<u32>"),
1488
+ decl(1, 2, "labelsOut", "storage", "array<u32>"),
1489
+ decl(1, 3, "counters", "storage", "array<atomic<u32>>"),
1490
+ decl(2, 0, "P", "uniform", "LpaParams"),
1491
+ ],
1492
+ overrideDecls: [],
1493
+ uniforms: [LPA_PARAMS],
1494
+ needs: [],
1495
+ snippetSlots: [],
1496
+ phase: "P11",
1497
+ };
1149
1498
  /**
1150
1499
  * The entries by id, in dispatch order. PLAN DECISION: `KernelId` is declared in full (contract 3.10) while the
1151
1500
  * entries landed phase by phase, so the table is built as a Partial record and exported below through the
@@ -1155,8 +1504,10 @@ const CLOSENESS_REDUCE = {
1155
1504
  * and `"fa2-to-scene"`; M8b-T3 landed the seven P7 entries and P4 its thirteen; P8-T3 landed the three compact /
1156
1505
  * dedupe entries, P8-T4 `"frontier-finalize"`, P8-T5 `"advance-expand"`, P8-T6 `"bfs-contract"` and `"sssp-pred"` and
1157
1506
  * P8-T7 `"bfs-fused"`, P8-T8 `"bfs-bottom-up"`, `"bfs-bitset-build"` and `"bfs-unvisited-flags"`, P8-T9
1158
- * `"sssp-relax"`, P8-T10 `"bf-relax"` and P8-T11 `"closeness-sweep"` and `"closeness-reduce"`, so every member of
1159
- * `KernelId` is present and the assertion is exact.
1507
+ * `"sssp-relax"`, P8-T10 `"bf-relax"` and P8-T11 `"closeness-sweep"` and `"closeness-reduce"`, betweenness the
1508
+ * six `"bc-*"` entries, all-pairs shortest paths `"apsp-init"` and `"apsp-fw"`, and P11 its seven (the graph
1509
+ * build, the group-by-key, label propagation's step and triangle counting), so every member of `KernelId`
1510
+ * is present and the assertion is exact.
1160
1511
  */
1161
1512
  const REGISTRY = Object.freeze({
1162
1513
  degree: DEGREE,
@@ -1205,6 +1556,21 @@ const REGISTRY = Object.freeze({
1205
1556
  "bf-relax": BF_RELAX,
1206
1557
  "closeness-sweep": CLOSENESS_SWEEP,
1207
1558
  "closeness-reduce": CLOSENESS_REDUCE,
1559
+ "bc-finalize": BC_FINALIZE,
1560
+ "bc-forward": BC_FORWARD,
1561
+ "bc-backward": BC_BACKWARD,
1562
+ "bc-gather": BC_GATHER,
1563
+ "bc-edge-gather": BC_EDGE_GATHER,
1564
+ "bc-forward-edge": BC_FORWARD_EDGE,
1565
+ "apsp-init": APSP_INIT,
1566
+ "apsp-fw": APSP_FW,
1567
+ "coo-emit": COO_EMIT,
1568
+ "run-flags": RUN_FLAGS,
1569
+ "coo-scatter": COO_SCATTER,
1570
+ "orient-flags": ORIENT_FLAGS,
1571
+ "tri-intersect": TRI_INTERSECT,
1572
+ "group-by-key-row": GROUP_BY_KEY_ROW,
1573
+ "lpa-step": LPA_STEP,
1208
1574
  });
1209
1575
  /** THE registry (spec 3.5): every entry, keyed by id. */
1210
1576
  export const KERNELS = REGISTRY;