@graphty/webgpu-graph-algorithms 0.5.1 → 0.6.1

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 +459 -58
  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 +9 -8
  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 +1 @@
1
- {"version":3,"file":"prelude.d.ts","sourceRoot":"","sources":["../../../src/kernel/prelude.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAkBH;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAUpD;AAED,iHAAiH;AACjH,eAAO,MAAM,YAAY,EAAE,MA2CzB,CAAC;AAEH,8GAA8G;AAC9G,eAAO,MAAM,aAAa,EAAE,MAAwC,CAAC;AAErE,+DAA+D;AAC/D,eAAO,MAAM,6BAA6B,EAAE,MAoCsE,CAAC;AAEnH,mFAAmF;AACnF,eAAO,MAAM,4BAA4B,EAAE,MA2EuE,CAAC;AAEnH,0FAA0F;AAC1F,eAAO,MAAM,mBAAmB,+DAAgE,CAAC;AAEjG;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAchD,CAAC"}
1
+ {"version":3,"file":"prelude.d.ts","sourceRoot":"","sources":["../../../src/kernel/prelude.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAsBH;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAUpD;AAED,iHAAiH;AACjH,eAAO,MAAM,YAAY,EAAE,MAgDzB,CAAC;AAEH,8GAA8G;AAC9G,eAAO,MAAM,aAAa,EAAE,MAAwC,CAAC;AAErE,+DAA+D;AAC/D,eAAO,MAAM,6BAA6B,EAAE,MAoCsE,CAAC;AAEnH,mFAAmF;AACnF,eAAO,MAAM,4BAA4B,EAAE,MA2EuE,CAAC;AAEnH,0FAA0F;AAC1F,eAAO,MAAM,mBAAmB,+DAAgE,CAAC;AAEjG;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAchD,CAAC"}
@@ -9,7 +9,7 @@
9
9
  * covers this file's template, so no u32 sentinel or workgroup-size literal is ever typed here.
10
10
  */
11
11
  import { INVALID_INDEX } from "@graphty/graph-format";
12
- import { FA2_COINCIDENT_SQ, FA2_DISTANCE_FLOOR, FA2_DISTANCE_FLOOR_SQ, FA2_FLAG_ADAPTIVE, FA2_FLAG_FIRST, FR_COOLING_PATIENCE, FR_COOLING_STEP, MAX_WORKGROUPS_PER_DIM, U32_MAX, WORKGROUP_SIZE, } from "../constants.js";
12
+ import { FA2_COINCIDENT_SQ, FA2_DISTANCE_FLOOR, FA2_DISTANCE_FLOOR_SQ, FA2_FLAG_ADAPTIVE, FA2_FLAG_FIRST, FR_COOLING_PATIENCE, FR_COOLING_STEP, GRID_BBOX_MARGIN, GRID_EXTENT_FLOOR, GRID_HUB_CELL, MAX_WORKGROUPS_PER_DIM, RADIX_BINS, U32_MAX, WORKGROUP_SIZE, } from "../constants.js";
13
13
  import { WebGpuGraphError } from "../errors.js";
14
14
  /**
15
15
  * Formats a finite number as a WGSL f32 literal that always carries a decimal point or an exponent (`0.01`,
@@ -40,6 +40,11 @@ const FA2_FLAG_FIRST: u32 = ${FA2_FLAG_FIRST}u;
40
40
  const FA2_FLAG_ADAPTIVE: u32 = ${FA2_FLAG_ADAPTIVE}u;
41
41
  const FR_COOLING_STEP: f32 = ${wgslF32Literal(FR_COOLING_STEP)};
42
42
  const FR_COOLING_PATIENCE: u32 = ${FR_COOLING_PATIENCE}u;
43
+ const GRID_HUB_CELL: u32 = ${GRID_HUB_CELL}u;
44
+ const GRID_EXTENT_FLOOR: f32 = ${wgslF32Literal(GRID_EXTENT_FLOOR)};
45
+ const GRID_BBOX_MARGIN: f32 = ${wgslF32Literal(GRID_BBOX_MARGIN)};
46
+ const RADIX_BINS: u32 = ${RADIX_BINS}u;
47
+ const RADIX_DIGIT_MASK: u32 = ${RADIX_BINS - 1}u;
43
48
  const F32_MAX: f32 = 0x1.fffffep+127;
44
49
  override WG: u32 = ${WORKGROUP_SIZE}u;
45
50
  override USE_PERM: bool = false;
@@ -1 +1 @@
1
- {"version":3,"file":"prelude.js","sourceRoot":"","sources":["../../../src/kernel/prelude.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EACH,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,sBAAsB,EACtB,OAAO,EACP,cAAc,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,KAAa;IACxC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,gBAAgB,CAAC,oBAAoB,EAAE,mBAAmB,KAAK,yBAAyB,EAAE;YAChG,QAAQ,EAAE,OAAO;YACjB,KAAK;YACL,QAAQ,EAAE,iBAAiB;SAC9B,CAAC,CAAC;IACP,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3B,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC;AAClD,CAAC;AAED,iHAAiH;AACjH,MAAM,CAAC,MAAM,YAAY,GAAW,UAAU,CAAC;6BAClB,aAAa;uBACnB,OAAO;sCACQ,sBAAsB;8BAC9B,cAAc,CAAC,kBAAkB,CAAC;iCAC/B,cAAc,CAAC,qBAAqB,CAAC;iCACrC,cAAc,CAAC,iBAAiB,CAAC;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kHA2EmD,CAAC;AAEnH,0FAA0F;AAC1F,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,eAAe,EAAE,eAAe,EAAE,gBAAgB,CAAU,CAAC;AAEjG;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAsB,MAAM,CAAC,MAAM,CAC/D;;;;;;;;;;6CAUyC;KACpC,IAAI,EAAE;KACN,KAAK,CAAC,KAAK,CAAC,CACpB,CAAC"}
@@ -4,8 +4,10 @@
4
4
  * every CommandBatch pass; `resolveInto(batch)` records the resolve plus a copy into the batch's
5
5
  * staging slot and `timings(bytes, request)` decodes `{ label, ns }` per pass from the batch's
6
6
  * readback bytes. Chromium quantises timestamps to 100 us (`quantised: true`); Dawn-node reports
7
- * 1,024 ns ticks (spec 2.6). The profiler never throws: a full query set drops timings and a device
8
- * without the feature disables it. Slot pairs are handed out in order and the cursor restarts at 0
7
+ * 1,024 ns ticks (spec 2.6). The profiler never throws: a full query set drops the timings of the
8
+ * passes past the budget and marks the batch's request `partial(request)` so a caller summing the
9
+ * rows into a duration falls back to wall time; a device without the feature disables it. Slot
10
+ * pairs are handed out in order and the cursor restarts at 0
9
11
  * after every resolve: queue order guarantees the resolve of batch A reads its slots before batch B
10
12
  * overwrites them, and one resolve buffer suffices for the same reason.
11
13
  */
@@ -25,8 +27,10 @@ export declare class Profiler {
25
27
  private readonly querySet;
26
28
  private readonly resolveBuffer;
27
29
  private readonly labels;
30
+ private readonly partialRequests;
28
31
  private pending;
29
32
  private cursor;
33
+ private refused;
30
34
  private destroyed;
31
35
  /**
32
36
  * Creates the query set and the resolve buffer when usable; `slots` defaults to PROFILER_QUERY_SLOTS = 256
@@ -39,7 +43,8 @@ export declare class Profiler {
39
43
  */
40
44
  constructor(device: GPUDevice, enabled: boolean, quantised: boolean, slots?: number);
41
45
  /**
42
- * The timestampWrites descriptor for a new pass, or undefined when disabled / out of slots.
46
+ * The timestampWrites descriptor for a new pass, or undefined when disabled / out of slots. A pass refused for
47
+ * want of slots is counted, and the next `resolveInto()` marks its request partial.
43
48
  * @param label - the pass name reported by `timings()`
44
49
  * @returns the descriptor a CommandBatch puts on beginComputePass, or undefined
45
50
  */
@@ -51,6 +56,13 @@ export declare class Profiler {
51
56
  * @returns the readback request `timings()` decodes, or null
52
57
  */
53
58
  resolveInto(batch: CommandBatch): ReadbackRequest | null;
59
+ /**
60
+ * Whether a pass of the batch was refused a slot pair, so `timings()` covers only its first slots / 2 passes
61
+ * and their sum is not the batch's duration.
62
+ * @param request - the request `resolveInto()` returned
63
+ * @returns true when at least one pass of that batch went untimed
64
+ */
65
+ partial(request: ReadbackRequest): boolean;
54
66
  /**
55
67
  * Decodes the timings of a batch from its readback bytes.
56
68
  * @param bytes - the resolved readback of the batch
@@ -1 +1 @@
1
- {"version":3,"file":"profiler.d.ts","sourceRoot":"","sources":["../../../src/kernel/profiler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEhE,gCAAgC;AAChC,MAAM,WAAW,UAAU;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACvB;AAQD,yEAAyE;AACzE,qBAAa,QAAQ;IACjB,gEAAgE;IAChE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,gFAAgF;IAChF,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAC9C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAmB;IACjD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqD;IAC5E,OAAO,CAAC,OAAO,CAAqB;IAC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ACnB,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,SAAS,CAAS;IAE1B;;;;;;;;OAQG;gBACS,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM;IAmBnF;;;;;OAKG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,6BAA6B,GAAG,SAAS;IAcnE;;;;;OAKG;IACH,WAAW,CAAC,KAAK,EAAE,YAAY,GAAG,eAAe,GAAG,IAAI;IAoBxD;;;;;OAKG;IACH,OAAO,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO;IAI1C;;;;;OAKG;IACH,OAAO,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe,GAAG,SAAS,UAAU,EAAE;IAmB5E,iEAAiE;IACjE,OAAO,IAAI,IAAI;CAelB"}
@@ -4,8 +4,10 @@
4
4
  * every CommandBatch pass; `resolveInto(batch)` records the resolve plus a copy into the batch's
5
5
  * staging slot and `timings(bytes, request)` decodes `{ label, ns }` per pass from the batch's
6
6
  * readback bytes. Chromium quantises timestamps to 100 us (`quantised: true`); Dawn-node reports
7
- * 1,024 ns ticks (spec 2.6). The profiler never throws: a full query set drops timings and a device
8
- * without the feature disables it. Slot pairs are handed out in order and the cursor restarts at 0
7
+ * 1,024 ns ticks (spec 2.6). The profiler never throws: a full query set drops the timings of the
8
+ * passes past the budget and marks the batch's request `partial(request)` so a caller summing the
9
+ * rows into a duration falls back to wall time; a device without the feature disables it. Slot
10
+ * pairs are handed out in order and the cursor restarts at 0
9
11
  * after every resolve: queue order guarantees the resolve of batch A reads its slots before batch B
10
12
  * overwrites them, and one resolve buffer suffices for the same reason.
11
13
  */
@@ -24,8 +26,10 @@ export class Profiler {
24
26
  */
25
27
  constructor(device, enabled, quantised, slots) {
26
28
  this.labels = new WeakMap();
29
+ this.partialRequests = new WeakSet();
27
30
  this.pending = [];
28
31
  this.cursor = 0;
32
+ this.refused = 0;
29
33
  this.destroyed = false;
30
34
  const count = slots ?? PROFILER_QUERY_SLOTS;
31
35
  this.quantised = quantised;
@@ -46,12 +50,17 @@ export class Profiler {
46
50
  }
47
51
  }
48
52
  /**
49
- * The timestampWrites descriptor for a new pass, or undefined when disabled / out of slots.
53
+ * The timestampWrites descriptor for a new pass, or undefined when disabled / out of slots. A pass refused for
54
+ * want of slots is counted, and the next `resolveInto()` marks its request partial.
50
55
  * @param label - the pass name reported by `timings()`
51
56
  * @returns the descriptor a CommandBatch puts on beginComputePass, or undefined
52
57
  */
53
58
  beginPass(label) {
54
- if (this.querySet === null || this.destroyed || this.cursor + 2 > this.slots) {
59
+ if (this.querySet === null || this.destroyed) {
60
+ return undefined;
61
+ }
62
+ if (this.cursor + 2 > this.slots) {
63
+ this.refused++;
55
64
  return undefined;
56
65
  }
57
66
  const begin = this.cursor;
@@ -73,10 +82,23 @@ export class Profiler {
73
82
  batch.resolveQuerySet(this.querySet, 0, count, this.resolveBuffer);
74
83
  const request = batch.readback(this.resolveBuffer, 0, count * 8);
75
84
  this.labels.set(request, this.pending.map((pass) => pass.label));
85
+ if (this.refused > 0) {
86
+ this.partialRequests.add(request);
87
+ }
76
88
  this.pending = [];
77
89
  this.cursor = 0;
90
+ this.refused = 0;
78
91
  return request;
79
92
  }
93
+ /**
94
+ * Whether a pass of the batch was refused a slot pair, so `timings()` covers only its first slots / 2 passes
95
+ * and their sum is not the batch's duration.
96
+ * @param request - the request `resolveInto()` returned
97
+ * @returns true when at least one pass of that batch went untimed
98
+ */
99
+ partial(request) {
100
+ return this.partialRequests.has(request);
101
+ }
80
102
  /**
81
103
  * Decodes the timings of a batch from its readback bytes.
82
104
  * @param bytes - the resolved readback of the batch
@@ -109,6 +131,7 @@ export class Profiler {
109
131
  this.destroyed = true;
110
132
  this.pending = [];
111
133
  this.cursor = 0;
134
+ this.refused = 0;
112
135
  if (this.querySet !== null) {
113
136
  this.querySet.destroy();
114
137
  }
@@ -1 +1 @@
1
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;YACrC,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,EAAE,CAAC;YACnC,IAAI,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC;gBAC7B,MAAM;YACV,CAAC;YACD,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;YAC1C,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;YAC5C,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC;QAC5D,CAAC;QACD,OAAO,GAAG,CAAC;IACf,CAAC;IAED,iEAAiE;IACjE,OAAO;QACH,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACjB,OAAO;QACX,CAAC;QACD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;QACjB,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;YACzB,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QAC5B,CAAC;QACD,IAAI,IAAI,CAAC,aAAa,KAAK,IAAI,EAAE,CAAC;YAC9B,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC;QACjC,CAAC;IACL,CAAC;CACJ"}
@@ -7,15 +7,15 @@
7
7
  * and fa2-speed-finalize (K4) together with every generated block of contract 3.10.2; P2-T2 lands
8
8
  * segmented-reduce; P3-T2 adds fa2-stats-finalize (K1), fa2-attraction (K2), fa2-integrate (K5) and
9
9
  * fa2-to-scene; M8b-T3 adds the seven P7 entries: spmv-pull, pr-scale, pr-finalize, wcc-link-sample,
10
- * wcc-link-edges, wcc-compress and wcc-sample. This file is the only importer of src/wgsl/** (spec 3.2;
11
- * test/layers.test.ts).
10
+ * wcc-link-edges, wcc-compress and wcc-sample. P4-T1 adds indirect-finalize; the other P4 entries follow, one task
11
+ * each (the P4 plan, PD-1). This file is the only importer of src/wgsl/** (spec 3.2; test/layers.test.ts).
12
12
  */
13
13
  import { UniformBlock } from "./kernel/struct-block.js";
14
14
  import { type BindingDecl, type OverrideDecl, type WgslModuleSpec } from "./kernel/wgsl.js";
15
15
  import { type CoreBinding } from "./memory/residency.js";
16
16
  import { type Binding } from "./types/memory.js";
17
17
  /** Every module id of P1-P3 and P7 (later ids are appended, never renamed). */
18
- export type KernelId = "degree" | "reduce" | "fill" | "segmented-reduce" | "fa2-stats-finalize" | "fa2-attraction" | "fa2-repulsion-exact" | "fa2-speed-finalize" | "fa2-integrate" | "fa2-to-scene" | "spmv-pull" | "pr-scale" | "pr-finalize" | "wcc-link-sample" | "wcc-link-edges" | "wcc-compress" | "wcc-sample";
18
+ export type KernelId = "degree" | "reduce" | "fill" | "segmented-reduce" | "fa2-stats-finalize" | "fa2-attraction" | "fa2-repulsion-exact" | "fa2-speed-finalize" | "fa2-integrate" | "fa2-to-scene" | "spmv-pull" | "pr-scale" | "pr-finalize" | "wcc-link-sample" | "wcc-link-edges" | "wcc-compress" | "wcc-sample" | "indirect-finalize" | "scan-block" | "scan-add" | "histogram" | "counting-scatter" | "radix-hist" | "radix-scatter" | "grid-cell-key" | "grid-centroid" | "grid-centroid-hub" | "grid-downsample" | "grid-far-field" | "grid-near-field";
19
19
  /** One registry entry: everything of a WgslModuleSpec except the per-variant overrides and snippets. */
20
20
  export interface KernelEntry {
21
21
  readonly id: KernelId;
@@ -29,7 +29,7 @@ export interface KernelEntry {
29
29
  /** The snippet marker names the body carries (segmented-reduce: ["VALUE"]). */
30
30
  readonly snippetSlots: readonly string[];
31
31
  /** The phase the entry landed in (documentation and the compile-matrix filter). */
32
- readonly phase: "P1" | "P2" | "P3" | "P7";
32
+ readonly phase: "P1" | "P2" | "P3" | "P4" | "P7";
33
33
  }
34
34
  /** `RangeParams` (uniform, 32 B): rows `[start, end)` @0 / @4 of the dispatch, the bound arc window `[arcBase, arcEnd)` @8 / @12 (0 and arcCount when not windowed), `accumulate` @16 (1 combines into `out[i]` instead of overwriting: the P4 windowed loop), `n` @20 (the node count that bounds neighbour indices), `pad0` @24, `pad1` @28. */
35
35
  export declare const RANGE_PARAMS: UniformBlock;
@@ -37,15 +37,15 @@ export declare const RANGE_PARAMS: UniformBlock;
37
37
  export declare const REDUCE_PARAMS: UniformBlock;
38
38
  /** `FillParams` (uniform, 16 B): `count` @0 words, `value` @4, `mode` @8 (0 = the constant `value`, 1 = iota `i + value`), `pad0` @12. */
39
39
  export declare const FILL_PARAMS: UniformBlock;
40
- /** `Fa2Params` (uniform, 128 B; spec 7.3): the per-iteration ForceAtlas2 parameters -- `n` @0, `dim` @4, `flags` @8 (bit 0 = FA2_FLAG_FIRST), `tierStart` @12, `tierEnd` @16, `iterationIndex` @20, `seed` @24, `nearMax` @28, `scalingRatio` @32, `gravity` @36, `jitterTolerance` @40, `scale` @44, `center` @48 (xyz, w 0), `settleThreshold` @64, `extentFactor` @68, `gridMax` @72, `levels` @76, `pad` @80 (reserved for the P4 GridSpec); the P5 model fields (PD-3): `frK` @96 (the FR optimal distance), `temperature` @100 (the FR temperature of this iteration), `springLength` @104, `springCoefficient` @108, `coulomb` @112 (ngraph's `gravity`, negative repels), `dragCoefficient` @116, `timeStep` @120, `pad1` @124; 128 B. */
40
+ /** `Fa2Params` (uniform, 128 B; spec 7.3): the per-iteration ForceAtlas2 parameters -- `n` @0, `dim` @4, `flags` @8 (bit 0 = FA2_FLAG_FIRST), `tierStart` @12, `tierEnd` @16, `iterationIndex` @20, `seed` @24, `nearMax` @28, `scalingRatio` @32, `gravity` @36, `jitterTolerance` @40, `scale` @44, `center` @48 (xyz, w 0), `settleThreshold` @64, `extentFactor` @68, `gridMax` @72, `levels` @76, `arcBase` @80 / `arcEnd` @84 (the bound arc window of K2, 0 and arcCount in the layout), `accumulate` @88 (1 combines into `force`: the windowed pattern), `hiEnd` @92 / `midEnd` @124 (the degreeOrder tier boundaries, PD-7; both 0 without a permutation); the P5 model fields (PD-3): `frK` @96 (the FR optimal distance), `temperature` @100 (the FR temperature of this iteration), `springLength` @104, `springCoefficient` @108, `coulomb` @112 (ngraph's `gravity`, negative repels), `dragCoefficient` @116, `timeStep` @120; 128 B. */
41
41
  export declare const FA2_PARAMS: UniformBlock;
42
- /** `Fa2State` (storage, padded to STATE_HEADER_BYTES = 256; spec 7.3): the device-resident controller state the finalize kernels write and the host reads back for stats -- `speed` @0, `speedEfficiency` @4, `swing` @8, `traction` @12, `centroid` @16, `rmsRadius` @32, `radius` @36, `meanDisplacement` @40, `iteration` @44, `min` @48, `max` @64, `gridMin` @80 (P4), `eps` @96 (P4), `settledCount` @100, `outsideGrid` @104 (P4), `maxCellOccupancy` @108 (P4), `temperature` @112 (FR, written by K1 under STATS_MODE 1), `kineticEnergy` @116 (the preset, K1 under STATS_MODE 2), `reserved0` @120 (vec2f), `reserved1` .. `reserved8` @128 .. @240. */
42
+ /** `Fa2State` (storage, padded to STATE_HEADER_BYTES = 256; spec 7.3): the device-resident controller state the finalize kernels write and the host reads back for stats -- `speed` @0, `speedEfficiency` @4, `swing` @8, `traction` @12, `centroid` @16, `rmsRadius` @32, `radius` @36, `meanDisplacement` @40, `iteration` @44, `min` @48, `max` @64, `gridMin` @80 (P4), `eps` @96 (P4), `settledCount` @100, `outsideGrid` @104 (P4), `maxCellOccupancy` @108 (P4), `temperature` @112 (FR, written by K1 under STATS_MODE 1), `kineticEnergy` @116 (the preset, K1 under STATS_MODE 2), `frEnergy` @120 / `frProgress` @124 (the FR adaptive cooling), `invCellSize` @128 (P4, PD-10: `1 / cellSize`, written by K1 beside `cellSize` in `gridMin.w`; G1 multiplies by it so every key is bitwise reproducible), `reserved0` @132 (f32), `reserved1` @136 (vec2f), `reserved2` .. `reserved8` @144 .. @240. */
43
43
  export declare const FA2_STATE: UniformBlock;
44
44
  /** `Fa2Trace` (storage record, 32 B; spec 7.3): one per-iteration trace record -- `swing` @0, `traction` @4, `speed` @8, `speedEfficiency` @12 (written by K4), `meanDisplacement` @16, `settledCount` @20, `iteration` @24 (written by K1), `modelScalar` @28 (K1: the temperature under STATS_MODE 1, the kinetic energy under 2, 0 under 0); the trace region is `array<Fa2Trace>` at byte offset STATE_HEADER_BYTES of the state buffer. */
45
45
  export declare const FA2_TRACE: UniformBlock;
46
46
  /** `Fa2Partial` (storage record, 64 B; spec 7.3): one per-workgroup partial -- `sum` @0 (xyz = sum of positions, w = sum of |p - centroid|^2), `min` @16, `max` @32 (w = max of |p - centroid|^2, the exact layoutRadius source), written by K5; `swingTraction` @48 (written by K3's epilogue); `dispFree` @56 (x = sum |dp| over free rows, y = the free count as an f32 <= 256, written by K5). */
47
47
  export declare const FA2_PARTIAL: UniformBlock;
48
- /** `SpmvParams` (uniform, 32 B; spec 8.2): `n` @0 rows of the pull, the bound arc window `[arcBase, arcEnd)` @4 / @8 (0 and arcCount when not windowed), the grid-stride step `stride` @12, `alpha` @16, `beta` @20 (the `1 - alpha` term), `uniformP` @24 (the uniform personalization mass `1 / n`, 0 for a pure SpMV), `pad0` @28. */
48
+ /** `SpmvParams` (uniform, 32 B; spec 8.2): `n` @0 rows of the pull, the bound arc window `[arcBase, arcEnd)` @4 / @8 (0 and arcCount when not windowed), the grid-stride step `stride` @12, `alpha` @16, `beta` @20 (the `1 - alpha` term), `uniformP` @24 (the uniform personalization mass `1 / n`, 0 for a pure SpMV), `start` @28 (the first row of the dispatch; TIER 0 strides from it, the tiers index from it). */
49
49
  export declare const SPMV_PARAMS: UniformBlock;
50
50
  /** `PrParams` (uniform, 32 B; spec 8.2): `n` @0, `groups` @4 (the per-workgroup partial count the finalize folds), `iteration` @8 (1-based), `trackConvergence` @12 (1 records firstConverged), `convergeThreshold` @16 (`tolerance * n`, the design's `delta < tol * n`), `pad0` @20, `pad1` @24, `pad2` @28. */
51
51
  export declare const PR_PARAMS: UniformBlock;
@@ -59,6 +59,16 @@ export declare const PR_PARAMS: UniformBlock;
59
59
  export declare const PR_PARTIAL: UniformBlock;
60
60
  /** `WccParams` (uniform, 32 B; spec 8.3): `n` @0, `items` @4 (rows for a sample round, edges for an edge round, 1024 for the sampler), `stride` @8, `r` @12 (the neighbour index of the sampled round, and the sampler's seed), `flagIndex` @16 (the changed word inside `comp`, PD-4), `giant` @20 (`U32_MAX` before the sample), `maxSteps` @24, `pad0` @28. */
61
61
  export declare const WCC_PARAMS: UniformBlock;
62
+ /** `IndirectParams` (uniform, 16 B; spec 5.4): `countIndex` @0 (the word of `counters` holding the count), `wg` @4 (the consumer's workgroup size), `slot` @8 (the 16-byte args slot to write), `pad0` @12. */
63
+ export declare const INDIRECT_PARAMS: UniformBlock;
64
+ /** `ScanParams` (uniform, 16 B; spec 6 row 2): `count` @0 (the u32 words of the level), `pad0` @4, `pad1` @8, `pad2` @12. */
65
+ export declare const SCAN_PARAMS: UniformBlock;
66
+ /** `GridLevelParams` (uniform, 32 B; spec 7.7 G5, P4-T9): `childBase` @0 and `parentBase` @4 (the first cell of the child / parent level inside the pyramid), `parentSide` @8, `parentCells` @12 (`parentSide^dim`), `depth` @16 (1 in 2D, 2 in 3D), `pad0` @20, `pad1` @24, `pad2` @28. */
67
+ export declare const GRID_LEVEL_PARAMS: UniformBlock;
68
+ /** `HistParams` (uniform, 16 B; spec 6 row 5): `count` @0 (the keys), `bins` @4 (a key >= bins is not counted), `pad0` @8, `pad1` @12. */
69
+ export declare const HIST_PARAMS: UniformBlock;
70
+ /** `RadixParams` (uniform, 16 B; spec 6 row 6): `count` @0 (the pairs), `shift` @4 (the pass's digit shift, 8 x pass), `groups` @8 (ceil(count / WG), the stride of the digit-major table), `pad0` @12. */
71
+ export declare const RADIX_PARAMS: UniformBlock;
62
72
  /** THE registry (spec 3.5): every entry, keyed by id. */
63
73
  export declare const KERNELS: Readonly<Record<KernelId, KernelEntry>>;
64
74
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"kernels.d.ts","sourceRoot":"","sources":["../../src/kernels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAmBjD,+EAA+E;AAC/E,MAAM,MAAM,QAAQ,GACd,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,kBAAkB,GAClB,oBAAoB,GACpB,gBAAgB,GAChB,qBAAqB,GACrB,oBAAoB,GACpB,eAAe,GACf,cAAc,GACd,WAAW,GACX,UAAU,GACV,aAAa,GACb,iBAAiB,GACjB,gBAAgB,GAChB,cAAc,GACd,YAAY,CAAC;AAEnB,wGAAwG;AACxG,MAAM,WAAW,WAAW;IACxB,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAC;IAC1C,QAAQ,CAAC,aAAa,EAAE,SAAS,YAAY,EAAE,CAAC;IAChD,QAAQ,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,CAAC;IAC3C,qFAAqF;IACrF,QAAQ,CAAC,KAAK,EAAE,SAAS,WAAW,EAAE,CAAC;IACvC,+EAA+E;IAC/E,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,mFAAmF;IACnF,QAAQ,CAAC,KAAK,EAAE,IAAI,GAAG,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