graphwise 1.9.1 → 1.11.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 (155) hide show
  1. package/dist/async/index.cjs +98 -1
  2. package/dist/async/index.cjs.map +1 -0
  3. package/dist/async/index.d.ts +1 -0
  4. package/dist/async/index.d.ts.map +1 -1
  5. package/dist/async/index.js +96 -2
  6. package/dist/async/index.js.map +1 -0
  7. package/dist/async/ops.d.ts +2 -0
  8. package/dist/async/ops.d.ts.map +1 -1
  9. package/dist/async/protocol.d.ts +14 -0
  10. package/dist/async/protocol.d.ts.map +1 -1
  11. package/dist/async/runner-batched.d.ts +21 -0
  12. package/dist/async/runner-batched.d.ts.map +1 -0
  13. package/dist/async/runner-batched.unit.test.d.ts +2 -0
  14. package/dist/async/runner-batched.unit.test.d.ts.map +1 -0
  15. package/dist/async/runners.d.ts.map +1 -1
  16. package/dist/expansion/base-core.d.ts.map +1 -1
  17. package/dist/expansion/fuse.d.ts +24 -1
  18. package/dist/expansion/fuse.d.ts.map +1 -1
  19. package/dist/expansion/index.cjs +9 -1
  20. package/dist/expansion/index.js +2 -2
  21. package/dist/expansion/lace.d.ts +23 -2
  22. package/dist/expansion/lace.d.ts.map +1 -1
  23. package/dist/expansion/priority-helpers.d.ts +20 -1
  24. package/dist/expansion/priority-helpers.d.ts.map +1 -1
  25. package/dist/expansion/sift.d.ts +24 -1
  26. package/dist/expansion/sift.d.ts.map +1 -1
  27. package/dist/expansion/types.d.ts +30 -0
  28. package/dist/expansion/types.d.ts.map +1 -1
  29. package/dist/{expansion-DaTroIyv.cjs → expansion--UuRowv-.cjs} +267 -4
  30. package/dist/expansion--UuRowv-.cjs.map +1 -0
  31. package/dist/{expansion-ClDhlMK8.js → expansion-CZLNK6Pr.js} +220 -5
  32. package/dist/expansion-CZLNK6Pr.js.map +1 -0
  33. package/dist/gpu/csr-graph.d.ts +68 -0
  34. package/dist/gpu/csr-graph.d.ts.map +1 -0
  35. package/dist/gpu/csr-graph.unit.test.d.ts +2 -0
  36. package/dist/gpu/csr-graph.unit.test.d.ts.map +1 -0
  37. package/dist/gpu/index.cjs +220 -15
  38. package/dist/gpu/index.cjs.map +1 -0
  39. package/dist/gpu/index.d.ts +1 -0
  40. package/dist/gpu/index.d.ts.map +1 -1
  41. package/dist/gpu/index.js +204 -2
  42. package/dist/gpu/index.js.map +1 -0
  43. package/dist/gpu/kernels/adamic-adar/kernel.d.ts +39 -0
  44. package/dist/gpu/kernels/adamic-adar/kernel.d.ts.map +1 -0
  45. package/dist/gpu/kernels/intersection/kernel.d.ts +50 -0
  46. package/dist/gpu/kernels/intersection/kernel.d.ts.map +1 -0
  47. package/dist/gpu/kernels/intersection/logic.d.ts +87 -0
  48. package/dist/gpu/kernels/intersection/logic.d.ts.map +1 -0
  49. package/dist/gpu/kernels/intersection/logic.unit.test.d.ts +2 -0
  50. package/dist/gpu/kernels/intersection/logic.unit.test.d.ts.map +1 -0
  51. package/dist/gpu/kernels/kmeans/index.d.ts +6 -0
  52. package/dist/gpu/kernels/kmeans/index.d.ts.map +1 -0
  53. package/dist/gpu/kernels/kmeans/kernel.d.ts +34 -0
  54. package/dist/gpu/kernels/kmeans/kernel.d.ts.map +1 -0
  55. package/dist/gpu/kernels/kmeans/logic.d.ts +111 -0
  56. package/dist/gpu/kernels/kmeans/logic.d.ts.map +1 -0
  57. package/dist/gpu/kernels/kmeans/logic.unit.test.d.ts +5 -0
  58. package/dist/gpu/kernels/kmeans/logic.unit.test.d.ts.map +1 -0
  59. package/dist/gpu/operations.d.ts +52 -0
  60. package/dist/gpu/operations.d.ts.map +1 -1
  61. package/dist/index/index.cjs +42 -19
  62. package/dist/index/index.js +11 -9
  63. package/dist/{jaccard-Bys9_dGW.cjs → jaccard-Bdw4B0i4.cjs} +1 -1
  64. package/dist/{jaccard-Bys9_dGW.cjs.map → jaccard-Bdw4B0i4.cjs.map} +1 -1
  65. package/dist/{jaccard-3rCdilwm.js → jaccard-BwC_NuQu.js} +1 -1
  66. package/dist/{jaccard-3rCdilwm.js.map → jaccard-BwC_NuQu.js.map} +1 -1
  67. package/dist/kernel-2oH4Cn32.cjs +1001 -0
  68. package/dist/kernel-2oH4Cn32.cjs.map +1 -0
  69. package/dist/kernel-6deK9fh1.js +724 -0
  70. package/dist/kernel-6deK9fh1.js.map +1 -0
  71. package/dist/kernel-CXeGBH3s.cjs +467 -0
  72. package/dist/kernel-CXeGBH3s.cjs.map +1 -0
  73. package/dist/kernel-CigCjrts.js +467 -0
  74. package/dist/kernel-CigCjrts.js.map +1 -0
  75. package/dist/kernel-CvnRsF7E.js +1001 -0
  76. package/dist/kernel-CvnRsF7E.js.map +1 -0
  77. package/dist/kernel-DukrXtVb.cjs +724 -0
  78. package/dist/kernel-DukrXtVb.cjs.map +1 -0
  79. package/dist/{kmeans-B8x9D1kt.cjs → kmeans-CZ7tJFYw.cjs} +1 -1
  80. package/dist/{kmeans-B8x9D1kt.cjs.map → kmeans-CZ7tJFYw.cjs.map} +1 -1
  81. package/dist/{kmeans-DKkL9rAN.js → kmeans-DLrlrp6i.js} +1 -1
  82. package/dist/{kmeans-DKkL9rAN.js.map → kmeans-DLrlrp6i.js.map} +1 -1
  83. package/dist/logic-Dbyfb_-7.cjs +289 -0
  84. package/dist/logic-Dbyfb_-7.cjs.map +1 -0
  85. package/dist/logic-DyBzRg1A.js +242 -0
  86. package/dist/logic-DyBzRg1A.js.map +1 -0
  87. package/dist/operations-D-RB67WP.cjs +2269 -0
  88. package/dist/operations-D-RB67WP.cjs.map +1 -0
  89. package/dist/operations-D9otVlIH.js +2198 -0
  90. package/dist/operations-D9otVlIH.js.map +1 -0
  91. package/dist/{ops-upIi6JIi.js → ops-D5xZr4fV.js} +60 -2
  92. package/dist/ops-D5xZr4fV.js.map +1 -0
  93. package/dist/{ops-djAsQQSh.cjs → ops-paa1Nvlf.cjs} +71 -1
  94. package/dist/ops-paa1Nvlf.cjs.map +1 -0
  95. package/dist/ranking/baselines/communicability.d.ts +12 -0
  96. package/dist/ranking/baselines/communicability.d.ts.map +1 -1
  97. package/dist/ranking/baselines/katz.d.ts +12 -0
  98. package/dist/ranking/baselines/katz.d.ts.map +1 -1
  99. package/dist/ranking/baselines/pagerank.d.ts +15 -0
  100. package/dist/ranking/baselines/pagerank.d.ts.map +1 -1
  101. package/dist/ranking/baselines/types.d.ts +3 -0
  102. package/dist/ranking/baselines/types.d.ts.map +1 -1
  103. package/dist/ranking/index.cjs +5 -2
  104. package/dist/ranking/index.js +3 -3
  105. package/dist/ranking/mi/index.cjs +1 -1
  106. package/dist/ranking/mi/index.js +1 -1
  107. package/dist/ranking/parse-gpu.d.ts +31 -0
  108. package/dist/ranking/parse-gpu.d.ts.map +1 -0
  109. package/dist/ranking/parse-gpu.unit.test.d.ts +5 -0
  110. package/dist/ranking/parse-gpu.unit.test.d.ts.map +1 -0
  111. package/dist/ranking/parse.d.ts.map +1 -1
  112. package/dist/{ranking-3ez5m67U.js → ranking-DOKDBcIR.js} +237 -11
  113. package/dist/ranking-DOKDBcIR.js.map +1 -0
  114. package/dist/{ranking-DVvajgUZ.cjs → ranking-pe5UaxKg.cjs} +254 -10
  115. package/dist/ranking-pe5UaxKg.cjs.map +1 -0
  116. package/dist/schemas/graph.d.ts +1 -1
  117. package/dist/seeds/crest.d.ts +48 -0
  118. package/dist/seeds/crest.d.ts.map +1 -0
  119. package/dist/seeds/crest.unit.test.d.ts +2 -0
  120. package/dist/seeds/crest.unit.test.d.ts.map +1 -0
  121. package/dist/seeds/crisp.d.ts +57 -0
  122. package/dist/seeds/crisp.d.ts.map +1 -0
  123. package/dist/seeds/crisp.unit.test.d.ts +2 -0
  124. package/dist/seeds/crisp.unit.test.d.ts.map +1 -0
  125. package/dist/seeds/grasp-gpu.d.ts +40 -0
  126. package/dist/seeds/grasp-gpu.d.ts.map +1 -0
  127. package/dist/seeds/index.cjs +715 -5
  128. package/dist/seeds/index.cjs.map +1 -1
  129. package/dist/seeds/index.d.ts +4 -0
  130. package/dist/seeds/index.d.ts.map +1 -1
  131. package/dist/seeds/index.js +712 -6
  132. package/dist/seeds/index.js.map +1 -1
  133. package/dist/seeds/spine.d.ts +50 -0
  134. package/dist/seeds/spine.d.ts.map +1 -0
  135. package/dist/seeds/spine.unit.test.d.ts +2 -0
  136. package/dist/seeds/spine.unit.test.d.ts.map +1 -0
  137. package/dist/seeds/stride.d.ts +55 -0
  138. package/dist/seeds/stride.d.ts.map +1 -0
  139. package/dist/seeds/stride.unit.test.d.ts +2 -0
  140. package/dist/seeds/stride.unit.test.d.ts.map +1 -0
  141. package/dist/{gpu-CHiCN0wa.js → typegpu-Dq5FfUB8.cjs} +16 -2041
  142. package/dist/typegpu-Dq5FfUB8.cjs.map +1 -0
  143. package/dist/{gpu-Y6owRVMi.cjs → typegpu-DwnJf28i.js} +2 -2127
  144. package/dist/typegpu-DwnJf28i.js.map +1 -0
  145. package/dist/utils/index.cjs +1 -1
  146. package/dist/utils/index.js +1 -1
  147. package/package.json +1 -1
  148. package/dist/expansion-ClDhlMK8.js.map +0 -1
  149. package/dist/expansion-DaTroIyv.cjs.map +0 -1
  150. package/dist/gpu-CHiCN0wa.js.map +0 -1
  151. package/dist/gpu-Y6owRVMi.cjs.map +0 -1
  152. package/dist/ops-djAsQQSh.cjs.map +0 -1
  153. package/dist/ops-upIi6JIi.js.map +0 -1
  154. package/dist/ranking-3ez5m67U.js.map +0 -1
  155. package/dist/ranking-DVvajgUZ.cjs.map +0 -1
@@ -0,0 +1,724 @@
1
+ import { n as data_exports, t as src_default } from "./typegpu-DwnJf28i.js";
2
+ //#region src/gpu/kernels/intersection/kernel.ts
3
+ /**
4
+ * TypeGPU compute kernel for batch neighbourhood intersection.
5
+ *
6
+ * Computes intersection size and neighbourhood sizes for multiple node pairs.
7
+ * One thread per pair: iterates the smaller neighbourhood and binary-searches the other.
8
+ *
9
+ * @module gpu/kernels/intersection/kernel
10
+ */
11
+ /**
12
+ * Bind group layout for Intersection kernel.
13
+ */
14
+ var IntersectionLayout = (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(src_default.bindGroupLayout({
15
+ rowOffsets: { storage: data_exports.arrayOf(data_exports.u32) },
16
+ colIndices: { storage: data_exports.arrayOf(data_exports.u32) },
17
+ pairsU: { storage: data_exports.arrayOf(data_exports.u32) },
18
+ pairsV: { storage: data_exports.arrayOf(data_exports.u32) },
19
+ intersections: {
20
+ storage: data_exports.arrayOf(data_exports.u32),
21
+ access: "mutable"
22
+ },
23
+ sizeUs: {
24
+ storage: data_exports.arrayOf(data_exports.u32),
25
+ access: "mutable"
26
+ },
27
+ sizeVs: {
28
+ storage: data_exports.arrayOf(data_exports.u32),
29
+ access: "mutable"
30
+ },
31
+ pairCount: { uniform: data_exports.u32 }
32
+ }), "IntersectionLayout");
33
+ /**
34
+ * Intersection compute pipeline: one thread per pair.
35
+ *
36
+ * For each pair (u, v):
37
+ * - Count intersection by iterating smaller neighbourhood
38
+ * - Binary search in larger neighbourhood
39
+ * - Write intersection, sizeU, sizeV to output buffers
40
+ */
41
+ var intersectionPipeline = (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((pairIdx) => {
42
+ "use gpu";
43
+ const u = IntersectionLayout.$.pairsU[pairIdx] ?? 0;
44
+ const v = IntersectionLayout.$.pairsV[pairIdx] ?? 0;
45
+ const uStart = IntersectionLayout.$.rowOffsets[u] ?? 0;
46
+ const uEnd = IntersectionLayout.$.rowOffsets[__tsover_add(u, 1)] ?? 0;
47
+ const vStart = IntersectionLayout.$.rowOffsets[v] ?? 0;
48
+ const vEnd = IntersectionLayout.$.rowOffsets[__tsover_add(v, 1)] ?? 0;
49
+ const degU = __tsover_sub(uEnd, uStart);
50
+ const degV = __tsover_sub(vEnd, vStart);
51
+ IntersectionLayout.$.sizeUs[pairIdx] = degU;
52
+ IntersectionLayout.$.sizeVs[pairIdx] = degV;
53
+ if (degU === 0 || degV === 0) {
54
+ IntersectionLayout.$.intersections[pairIdx] = 0;
55
+ return;
56
+ }
57
+ let intersection = 0;
58
+ if (degU <= degV) for (let i = uStart; i < uEnd; i = __tsover_add(i, 1)) {
59
+ const neighbour = IntersectionLayout.$.colIndices[i] ?? 0;
60
+ let lo = vStart;
61
+ let hi = vEnd;
62
+ while (lo < hi) {
63
+ const mid = __tsover_add(lo, __tsover_div(__tsover_sub(hi, lo), 2));
64
+ const midVal = IntersectionLayout.$.colIndices[mid] ?? 0;
65
+ if (midVal === neighbour) {
66
+ intersection = __tsover_add(intersection, 1);
67
+ lo = hi;
68
+ } else if (midVal < neighbour) lo = __tsover_add(mid, 1);
69
+ else hi = mid;
70
+ }
71
+ }
72
+ else for (let i = vStart; i < vEnd; i = __tsover_add(i, 1)) {
73
+ const neighbour = IntersectionLayout.$.colIndices[i] ?? 0;
74
+ let lo = uStart;
75
+ let hi = uEnd;
76
+ while (lo < hi) {
77
+ const mid = __tsover_add(lo, __tsover_div(__tsover_sub(hi, lo), 2));
78
+ const midVal = IntersectionLayout.$.colIndices[mid] ?? 0;
79
+ if (midVal === neighbour) {
80
+ intersection = __tsover_add(intersection, 1);
81
+ lo = hi;
82
+ } else if (midVal < neighbour) lo = __tsover_add(mid, 1);
83
+ else hi = mid;
84
+ }
85
+ }
86
+ IntersectionLayout.$.intersections[pairIdx] = intersection;
87
+ }), {
88
+ v: 1,
89
+ name: "intersectionPipeline",
90
+ ast: {
91
+ "params": [{
92
+ "type": "i",
93
+ "name": "pairIdx"
94
+ }],
95
+ "body": [0, [
96
+ [
97
+ 13,
98
+ "u",
99
+ [
100
+ 3,
101
+ [
102
+ 8,
103
+ [
104
+ 7,
105
+ [
106
+ 7,
107
+ "IntersectionLayout",
108
+ "$"
109
+ ],
110
+ "pairsU"
111
+ ],
112
+ "pairIdx"
113
+ ],
114
+ "??",
115
+ [5, "0"]
116
+ ]
117
+ ],
118
+ [
119
+ 13,
120
+ "v",
121
+ [
122
+ 3,
123
+ [
124
+ 8,
125
+ [
126
+ 7,
127
+ [
128
+ 7,
129
+ "IntersectionLayout",
130
+ "$"
131
+ ],
132
+ "pairsV"
133
+ ],
134
+ "pairIdx"
135
+ ],
136
+ "??",
137
+ [5, "0"]
138
+ ]
139
+ ],
140
+ [
141
+ 13,
142
+ "uStart",
143
+ [
144
+ 3,
145
+ [
146
+ 8,
147
+ [
148
+ 7,
149
+ [
150
+ 7,
151
+ "IntersectionLayout",
152
+ "$"
153
+ ],
154
+ "rowOffsets"
155
+ ],
156
+ "u"
157
+ ],
158
+ "??",
159
+ [5, "0"]
160
+ ]
161
+ ],
162
+ [
163
+ 13,
164
+ "uEnd",
165
+ [
166
+ 3,
167
+ [
168
+ 8,
169
+ [
170
+ 7,
171
+ [
172
+ 7,
173
+ "IntersectionLayout",
174
+ "$"
175
+ ],
176
+ "rowOffsets"
177
+ ],
178
+ [
179
+ 1,
180
+ "u",
181
+ "+",
182
+ [5, "1"]
183
+ ]
184
+ ],
185
+ "??",
186
+ [5, "0"]
187
+ ]
188
+ ],
189
+ [
190
+ 13,
191
+ "vStart",
192
+ [
193
+ 3,
194
+ [
195
+ 8,
196
+ [
197
+ 7,
198
+ [
199
+ 7,
200
+ "IntersectionLayout",
201
+ "$"
202
+ ],
203
+ "rowOffsets"
204
+ ],
205
+ "v"
206
+ ],
207
+ "??",
208
+ [5, "0"]
209
+ ]
210
+ ],
211
+ [
212
+ 13,
213
+ "vEnd",
214
+ [
215
+ 3,
216
+ [
217
+ 8,
218
+ [
219
+ 7,
220
+ [
221
+ 7,
222
+ "IntersectionLayout",
223
+ "$"
224
+ ],
225
+ "rowOffsets"
226
+ ],
227
+ [
228
+ 1,
229
+ "v",
230
+ "+",
231
+ [5, "1"]
232
+ ]
233
+ ],
234
+ "??",
235
+ [5, "0"]
236
+ ]
237
+ ],
238
+ [
239
+ 13,
240
+ "degU",
241
+ [
242
+ 1,
243
+ "uEnd",
244
+ "-",
245
+ "uStart"
246
+ ]
247
+ ],
248
+ [
249
+ 13,
250
+ "degV",
251
+ [
252
+ 1,
253
+ "vEnd",
254
+ "-",
255
+ "vStart"
256
+ ]
257
+ ],
258
+ [
259
+ 2,
260
+ [
261
+ 8,
262
+ [
263
+ 7,
264
+ [
265
+ 7,
266
+ "IntersectionLayout",
267
+ "$"
268
+ ],
269
+ "sizeUs"
270
+ ],
271
+ "pairIdx"
272
+ ],
273
+ "=",
274
+ "degU"
275
+ ],
276
+ [
277
+ 2,
278
+ [
279
+ 8,
280
+ [
281
+ 7,
282
+ [
283
+ 7,
284
+ "IntersectionLayout",
285
+ "$"
286
+ ],
287
+ "sizeVs"
288
+ ],
289
+ "pairIdx"
290
+ ],
291
+ "=",
292
+ "degV"
293
+ ],
294
+ [
295
+ 11,
296
+ [
297
+ 3,
298
+ [
299
+ 1,
300
+ "degU",
301
+ "===",
302
+ [5, "0"]
303
+ ],
304
+ "||",
305
+ [
306
+ 1,
307
+ "degV",
308
+ "===",
309
+ [5, "0"]
310
+ ]
311
+ ],
312
+ [0, [[
313
+ 2,
314
+ [
315
+ 8,
316
+ [
317
+ 7,
318
+ [
319
+ 7,
320
+ "IntersectionLayout",
321
+ "$"
322
+ ],
323
+ "intersections"
324
+ ],
325
+ "pairIdx"
326
+ ],
327
+ "=",
328
+ [5, "0"]
329
+ ], [10]]]
330
+ ],
331
+ [
332
+ 12,
333
+ "intersection",
334
+ [5, "0"]
335
+ ],
336
+ [
337
+ 11,
338
+ [
339
+ 1,
340
+ "degU",
341
+ "<=",
342
+ "degV"
343
+ ],
344
+ [0, [[
345
+ 14,
346
+ [
347
+ 12,
348
+ "i",
349
+ "uStart"
350
+ ],
351
+ [
352
+ 1,
353
+ "i",
354
+ "<",
355
+ "uEnd"
356
+ ],
357
+ [
358
+ 2,
359
+ "i",
360
+ "=",
361
+ [
362
+ 1,
363
+ "i",
364
+ "+",
365
+ [5, "1"]
366
+ ]
367
+ ],
368
+ [0, [
369
+ [
370
+ 13,
371
+ "neighbour",
372
+ [
373
+ 3,
374
+ [
375
+ 8,
376
+ [
377
+ 7,
378
+ [
379
+ 7,
380
+ "IntersectionLayout",
381
+ "$"
382
+ ],
383
+ "colIndices"
384
+ ],
385
+ "i"
386
+ ],
387
+ "??",
388
+ [5, "0"]
389
+ ]
390
+ ],
391
+ [
392
+ 12,
393
+ "lo",
394
+ "vStart"
395
+ ],
396
+ [
397
+ 12,
398
+ "hi",
399
+ "vEnd"
400
+ ],
401
+ [
402
+ 15,
403
+ [
404
+ 1,
405
+ "lo",
406
+ "<",
407
+ "hi"
408
+ ],
409
+ [0, [
410
+ [
411
+ 13,
412
+ "mid",
413
+ [
414
+ 1,
415
+ "lo",
416
+ "+",
417
+ [
418
+ 1,
419
+ [
420
+ 1,
421
+ "hi",
422
+ "-",
423
+ "lo"
424
+ ],
425
+ "/",
426
+ [5, "2"]
427
+ ]
428
+ ]
429
+ ],
430
+ [
431
+ 13,
432
+ "midVal",
433
+ [
434
+ 3,
435
+ [
436
+ 8,
437
+ [
438
+ 7,
439
+ [
440
+ 7,
441
+ "IntersectionLayout",
442
+ "$"
443
+ ],
444
+ "colIndices"
445
+ ],
446
+ "mid"
447
+ ],
448
+ "??",
449
+ [5, "0"]
450
+ ]
451
+ ],
452
+ [
453
+ 11,
454
+ [
455
+ 1,
456
+ "midVal",
457
+ "===",
458
+ "neighbour"
459
+ ],
460
+ [0, [[
461
+ 2,
462
+ "intersection",
463
+ "=",
464
+ [
465
+ 1,
466
+ "intersection",
467
+ "+",
468
+ [5, "1"]
469
+ ]
470
+ ], [
471
+ 2,
472
+ "lo",
473
+ "=",
474
+ "hi"
475
+ ]]],
476
+ [
477
+ 11,
478
+ [
479
+ 1,
480
+ "midVal",
481
+ "<",
482
+ "neighbour"
483
+ ],
484
+ [0, [[
485
+ 2,
486
+ "lo",
487
+ "=",
488
+ [
489
+ 1,
490
+ "mid",
491
+ "+",
492
+ [5, "1"]
493
+ ]
494
+ ]]],
495
+ [0, [[
496
+ 2,
497
+ "hi",
498
+ "=",
499
+ "mid"
500
+ ]]]
501
+ ]
502
+ ]
503
+ ]]
504
+ ]
505
+ ]]
506
+ ]]],
507
+ [0, [[
508
+ 14,
509
+ [
510
+ 12,
511
+ "i",
512
+ "vStart"
513
+ ],
514
+ [
515
+ 1,
516
+ "i",
517
+ "<",
518
+ "vEnd"
519
+ ],
520
+ [
521
+ 2,
522
+ "i",
523
+ "=",
524
+ [
525
+ 1,
526
+ "i",
527
+ "+",
528
+ [5, "1"]
529
+ ]
530
+ ],
531
+ [0, [
532
+ [
533
+ 13,
534
+ "neighbour",
535
+ [
536
+ 3,
537
+ [
538
+ 8,
539
+ [
540
+ 7,
541
+ [
542
+ 7,
543
+ "IntersectionLayout",
544
+ "$"
545
+ ],
546
+ "colIndices"
547
+ ],
548
+ "i"
549
+ ],
550
+ "??",
551
+ [5, "0"]
552
+ ]
553
+ ],
554
+ [
555
+ 12,
556
+ "lo",
557
+ "uStart"
558
+ ],
559
+ [
560
+ 12,
561
+ "hi",
562
+ "uEnd"
563
+ ],
564
+ [
565
+ 15,
566
+ [
567
+ 1,
568
+ "lo",
569
+ "<",
570
+ "hi"
571
+ ],
572
+ [0, [
573
+ [
574
+ 13,
575
+ "mid",
576
+ [
577
+ 1,
578
+ "lo",
579
+ "+",
580
+ [
581
+ 1,
582
+ [
583
+ 1,
584
+ "hi",
585
+ "-",
586
+ "lo"
587
+ ],
588
+ "/",
589
+ [5, "2"]
590
+ ]
591
+ ]
592
+ ],
593
+ [
594
+ 13,
595
+ "midVal",
596
+ [
597
+ 3,
598
+ [
599
+ 8,
600
+ [
601
+ 7,
602
+ [
603
+ 7,
604
+ "IntersectionLayout",
605
+ "$"
606
+ ],
607
+ "colIndices"
608
+ ],
609
+ "mid"
610
+ ],
611
+ "??",
612
+ [5, "0"]
613
+ ]
614
+ ],
615
+ [
616
+ 11,
617
+ [
618
+ 1,
619
+ "midVal",
620
+ "===",
621
+ "neighbour"
622
+ ],
623
+ [0, [[
624
+ 2,
625
+ "intersection",
626
+ "=",
627
+ [
628
+ 1,
629
+ "intersection",
630
+ "+",
631
+ [5, "1"]
632
+ ]
633
+ ], [
634
+ 2,
635
+ "lo",
636
+ "=",
637
+ "hi"
638
+ ]]],
639
+ [
640
+ 11,
641
+ [
642
+ 1,
643
+ "midVal",
644
+ "<",
645
+ "neighbour"
646
+ ],
647
+ [0, [[
648
+ 2,
649
+ "lo",
650
+ "=",
651
+ [
652
+ 1,
653
+ "mid",
654
+ "+",
655
+ [5, "1"]
656
+ ]
657
+ ]]],
658
+ [0, [[
659
+ 2,
660
+ "hi",
661
+ "=",
662
+ "mid"
663
+ ]]]
664
+ ]
665
+ ]
666
+ ]]
667
+ ]
668
+ ]]
669
+ ]]]
670
+ ],
671
+ [
672
+ 2,
673
+ [
674
+ 8,
675
+ [
676
+ 7,
677
+ [
678
+ 7,
679
+ "IntersectionLayout",
680
+ "$"
681
+ ],
682
+ "intersections"
683
+ ],
684
+ "pairIdx"
685
+ ],
686
+ "=",
687
+ "intersection"
688
+ ]
689
+ ]],
690
+ "externalNames": ["IntersectionLayout"]
691
+ },
692
+ externals: () => ({ IntersectionLayout })
693
+ }) && $.f)({});
694
+ /**
695
+ * Dispatch batch intersection on GPU.
696
+ *
697
+ * @param root - TypeGPU root instance
698
+ * @param csrBuffers - CSR matrix as typed buffers
699
+ * @param pairsU - First node of each pair (u32 array)
700
+ * @param pairsV - Second node of each pair (u32 array)
701
+ * @param intersections - Output intersections (u32 array, mutable)
702
+ * @param sizeUs - Output sizeU per pair (u32 array, mutable)
703
+ * @param sizeVs - Output sizeV per pair (u32 array, mutable)
704
+ * @param pairCount - Number of pairs to compute
705
+ */
706
+ function dispatchIntersection(root, csrBuffers, pairsU, pairsV, intersections, sizeUs, sizeVs, pairCount) {
707
+ const pipeline = (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(root.createGuardedComputePipeline(intersectionPipeline), "pipeline");
708
+ const pairCountBuffer = (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(root.createBuffer(data_exports.u32, pairCount).$usage("uniform"), "pairCountBuffer");
709
+ const bindGroup = root.createBindGroup(IntersectionLayout, {
710
+ rowOffsets: csrBuffers.rowOffsets,
711
+ colIndices: csrBuffers.colIndices,
712
+ pairsU,
713
+ pairsV,
714
+ intersections,
715
+ sizeUs,
716
+ sizeVs,
717
+ pairCount: pairCountBuffer
718
+ });
719
+ pipeline.with(bindGroup).dispatchThreads(pairCount);
720
+ }
721
+ //#endregion
722
+ export { dispatchIntersection };
723
+
724
+ //# sourceMappingURL=kernel-6deK9fh1.js.map