@luma.gl/graph 10.0.0-alpha.8 → 10.0.0-beta.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 (493) hide show
  1. package/LICENSE +4 -4
  2. package/THIRD-PARTY-NOTICES.md +19 -0
  3. package/dist/arrow/arrow-colors.cjs +99 -18
  4. package/dist/arrow/arrow-colors.d.ts +27 -10
  5. package/dist/arrow/arrow-colors.d.ts.map +1 -1
  6. package/dist/arrow/arrow-colors.js +107 -24
  7. package/dist/arrow/arrow-colors.js.map +1 -1
  8. package/dist/arrow/arrow-utils/arrow-paths.cjs +4 -3
  9. package/dist/arrow/arrow-utils/arrow-paths.d.ts.map +1 -1
  10. package/dist/arrow/arrow-utils/arrow-paths.js +5 -4
  11. package/dist/arrow/arrow-utils/arrow-paths.js.map +1 -1
  12. package/dist/arrow/cpu/arrow-coordinate-projection.cjs +30 -0
  13. package/dist/arrow/cpu/arrow-coordinate-projection.d.ts +5 -0
  14. package/dist/arrow/cpu/arrow-coordinate-projection.d.ts.map +1 -0
  15. package/dist/arrow/cpu/arrow-coordinate-projection.js +9 -0
  16. package/dist/arrow/cpu/arrow-coordinate-projection.js.map +1 -0
  17. package/dist/arrow/cpu/arrow-cpu-pipelines.cjs +31 -0
  18. package/dist/arrow/cpu/arrow-cpu-pipelines.d.ts +2 -0
  19. package/dist/arrow/cpu/arrow-cpu-pipelines.d.ts.map +1 -0
  20. package/dist/arrow/cpu/arrow-cpu-pipelines.js +5 -0
  21. package/dist/arrow/cpu/arrow-cpu-pipelines.js.map +1 -0
  22. package/dist/arrow/cpu/arrow-cpu-vector-adapters.cjs +99 -0
  23. package/dist/arrow/cpu/arrow-cpu-vector-adapters.d.ts +9 -0
  24. package/dist/arrow/cpu/arrow-cpu-vector-adapters.d.ts.map +1 -0
  25. package/dist/arrow/cpu/arrow-cpu-vector-adapters.js +100 -0
  26. package/dist/arrow/cpu/arrow-cpu-vector-adapters.js.map +1 -0
  27. package/dist/arrow/geoarrow/arrow-geoarrow-adapter.cjs +9 -371
  28. package/dist/arrow/geoarrow/arrow-geoarrow-adapter.d.ts +8 -28
  29. package/dist/arrow/geoarrow/arrow-geoarrow-adapter.d.ts.map +1 -1
  30. package/dist/arrow/geoarrow/arrow-geoarrow-adapter.js +4 -381
  31. package/dist/arrow/geoarrow/arrow-geoarrow-adapter.js.map +1 -1
  32. package/dist/arrow/geoarrow/arrow-geoarrow-conversion.cjs +11 -11
  33. package/dist/arrow/geoarrow/arrow-geoarrow-conversion.d.ts +2 -0
  34. package/dist/arrow/geoarrow/arrow-geoarrow-conversion.d.ts.map +1 -1
  35. package/dist/arrow/geoarrow/arrow-geoarrow-conversion.js +4 -4
  36. package/dist/arrow/geoarrow/arrow-geoarrow-conversion.js.map +1 -1
  37. package/dist/arrow/geoarrow/arrow-polygon-tessellation.cjs +2 -2
  38. package/dist/arrow/geoarrow/arrow-polygon-tessellation.js +1 -1
  39. package/dist/arrow/geoarrow/arrow-polygon-tessellation.js.map +1 -1
  40. package/dist/arrow/gpu/arrow-column-gpu-vector.cjs +27 -8
  41. package/dist/arrow/gpu/arrow-column-gpu-vector.d.ts +11 -1
  42. package/dist/arrow/gpu/arrow-column-gpu-vector.d.ts.map +1 -1
  43. package/dist/arrow/gpu/arrow-column-gpu-vector.js +33 -8
  44. package/dist/arrow/gpu/arrow-column-gpu-vector.js.map +1 -1
  45. package/dist/arrow/gpu/arrow-gpu-table-conversion.cjs +68 -3
  46. package/dist/arrow/gpu/arrow-gpu-table-conversion.d.ts +9 -2
  47. package/dist/arrow/gpu/arrow-gpu-table-conversion.d.ts.map +1 -1
  48. package/dist/arrow/gpu/arrow-gpu-table-conversion.js +76 -3
  49. package/dist/arrow/gpu/arrow-gpu-table-conversion.js.map +1 -1
  50. package/dist/arrow/gpu/arrow-gpu-vector-adapters.cjs +8 -6
  51. package/dist/arrow/gpu/arrow-gpu-vector-adapters.d.ts +1 -0
  52. package/dist/arrow/gpu/arrow-gpu-vector-adapters.d.ts.map +1 -1
  53. package/dist/arrow/gpu/arrow-gpu-vector-adapters.js +17 -7
  54. package/dist/arrow/gpu/arrow-gpu-vector-adapters.js.map +1 -1
  55. package/dist/arrow/gpu/arrow-gpu-vector-conversion.cjs +35 -5
  56. package/dist/arrow/gpu/arrow-gpu-vector-conversion.d.ts +6 -1
  57. package/dist/arrow/gpu/arrow-gpu-vector-conversion.d.ts.map +1 -1
  58. package/dist/arrow/gpu/arrow-gpu-vector-conversion.js +40 -5
  59. package/dist/arrow/gpu/arrow-gpu-vector-conversion.js.map +1 -1
  60. package/dist/arrow/index.cjs +19 -2
  61. package/dist/arrow/index.cjs.map +3 -3
  62. package/dist/arrow/index.d.ts +5 -2
  63. package/dist/arrow/index.d.ts.map +1 -1
  64. package/dist/arrow/index.js +4 -1
  65. package/dist/arrow/index.js.map +1 -1
  66. package/dist/arrow/internal.cjs.map +2 -2
  67. package/dist/dist.dev.js +3820 -1646
  68. package/dist/dist.min.js +450 -136
  69. package/dist/experimental/index.cjs.map +1 -1
  70. package/dist/experimental/simulation/index.cjs.map +1 -1
  71. package/dist/geospatial/gpu-point-spatial-query.cjs +2 -15
  72. package/dist/geospatial/gpu-point-spatial-query.d.ts.map +1 -1
  73. package/dist/geospatial/gpu-point-spatial-query.js +2 -15
  74. package/dist/geospatial/gpu-point-spatial-query.js.map +1 -1
  75. package/dist/geospatial/index.cjs.map +2 -2
  76. package/dist/gpu-a5/index.cjs.map +1 -1
  77. package/dist/gpu-core/compiled-gpu-graph.cjs +47 -0
  78. package/dist/gpu-core/compiled-gpu-graph.d.ts +5 -0
  79. package/dist/gpu-core/compiled-gpu-graph.d.ts.map +1 -1
  80. package/dist/gpu-core/compiled-gpu-graph.js +54 -1
  81. package/dist/gpu-core/compiled-gpu-graph.js.map +1 -1
  82. package/dist/gpu-core/gpu-command-graph-compiler.cjs +11 -2
  83. package/dist/gpu-core/gpu-command-graph-compiler.d.ts +2 -1
  84. package/dist/gpu-core/gpu-command-graph-compiler.d.ts.map +1 -1
  85. package/dist/gpu-core/gpu-command-graph-compiler.js +13 -2
  86. package/dist/gpu-core/gpu-command-graph-compiler.js.map +1 -1
  87. package/dist/gpu-core/gpu-command-graph-types.d.ts +16 -1
  88. package/dist/gpu-core/gpu-command-graph-types.d.ts.map +1 -1
  89. package/dist/gpu-core/gpu-command-graph-types.js.map +1 -1
  90. package/dist/gpu-core/gpu-command-graph.cjs +34 -11
  91. package/dist/gpu-core/gpu-command-graph.d.ts +17 -8
  92. package/dist/gpu-core/gpu-command-graph.d.ts.map +1 -1
  93. package/dist/gpu-core/gpu-command-graph.js +39 -11
  94. package/dist/gpu-core/gpu-command-graph.js.map +1 -1
  95. package/dist/gpu-core/gpu-cpu-execution.cjs +279 -0
  96. package/dist/gpu-core/gpu-cpu-execution.d.ts +22 -0
  97. package/dist/gpu-core/gpu-cpu-execution.d.ts.map +1 -0
  98. package/dist/gpu-core/gpu-cpu-execution.js +294 -0
  99. package/dist/gpu-core/gpu-cpu-execution.js.map +1 -0
  100. package/dist/gpu-core/gpu-cpu-operation.cjs +54 -0
  101. package/dist/gpu-core/gpu-cpu-operation.d.ts +40 -0
  102. package/dist/gpu-core/gpu-cpu-operation.d.ts.map +1 -0
  103. package/dist/gpu-core/gpu-cpu-operation.js +35 -0
  104. package/dist/gpu-core/gpu-cpu-operation.js.map +1 -0
  105. package/dist/gpu-core/gpu-dispatch-utils.cjs +7 -3
  106. package/dist/gpu-core/gpu-dispatch-utils.d.ts +2 -0
  107. package/dist/gpu-core/gpu-dispatch-utils.d.ts.map +1 -1
  108. package/dist/gpu-core/gpu-dispatch-utils.js +4 -1
  109. package/dist/gpu-core/gpu-dispatch-utils.js.map +1 -1
  110. package/dist/gpu-core/gpu-expression-operation.cjs +2 -2
  111. package/dist/gpu-core/gpu-expression-operation.d.ts +1 -1
  112. package/dist/gpu-core/gpu-expression-operation.d.ts.map +1 -1
  113. package/dist/gpu-core/gpu-expression-operation.js +1 -1
  114. package/dist/gpu-core/gpu-expression-operation.js.map +1 -1
  115. package/dist/gpu-core/gpu-expression-plan.cjs +5 -1
  116. package/dist/gpu-core/gpu-expression-plan.d.ts +3 -2
  117. package/dist/gpu-core/gpu-expression-plan.d.ts.map +1 -1
  118. package/dist/gpu-core/gpu-expression-plan.js +7 -1
  119. package/dist/gpu-core/gpu-expression-plan.js.map +1 -1
  120. package/dist/gpu-core/gpu-graph-compiler.cjs +48 -0
  121. package/dist/gpu-core/gpu-graph-compiler.d.ts +1 -0
  122. package/dist/gpu-core/gpu-graph-compiler.d.ts.map +1 -1
  123. package/dist/gpu-core/gpu-graph-compiler.js +50 -0
  124. package/dist/gpu-core/gpu-graph-compiler.js.map +1 -1
  125. package/dist/gpu-core/gpu-graph.d.ts +2 -2
  126. package/dist/gpu-core/gpu-graph.d.ts.map +1 -1
  127. package/dist/gpu-core/gpu-graph.js.map +1 -1
  128. package/dist/gpu-core/gpu-grid-aggregation.cjs +2 -5
  129. package/dist/gpu-core/gpu-grid-aggregation.d.ts.map +1 -1
  130. package/dist/gpu-core/gpu-grid-aggregation.js +2 -5
  131. package/dist/gpu-core/gpu-grid-aggregation.js.map +1 -1
  132. package/dist/gpu-core/gpu-grid-binning.cjs +2 -5
  133. package/dist/gpu-core/gpu-grid-binning.d.ts.map +1 -1
  134. package/dist/gpu-core/gpu-grid-binning.js +2 -5
  135. package/dist/gpu-core/gpu-grid-binning.js.map +1 -1
  136. package/dist/gpu-core/gpu-grid-coordinate.cjs +41 -0
  137. package/dist/gpu-core/gpu-grid-coordinate.d.ts +7 -0
  138. package/dist/gpu-core/gpu-grid-coordinate.d.ts.map +1 -0
  139. package/dist/gpu-core/gpu-grid-coordinate.js +24 -0
  140. package/dist/gpu-core/gpu-grid-coordinate.js.map +1 -0
  141. package/dist/gpu-core/gpu-grid-index-internals.cjs +2 -15
  142. package/dist/gpu-core/gpu-grid-index-internals.d.ts.map +1 -1
  143. package/dist/gpu-core/gpu-grid-index-internals.js +2 -15
  144. package/dist/gpu-core/gpu-grid-index-internals.js.map +1 -1
  145. package/dist/gpu-core/gpu-grid-index-query.cjs +2 -16
  146. package/dist/gpu-core/gpu-grid-index-query.d.ts.map +1 -1
  147. package/dist/gpu-core/gpu-grid-index-query.js +2 -16
  148. package/dist/gpu-core/gpu-grid-index-query.js.map +1 -1
  149. package/dist/gpu-core/gpu-group-aggregation.cjs +7 -15
  150. package/dist/gpu-core/gpu-group-aggregation.d.ts.map +1 -1
  151. package/dist/gpu-core/gpu-group-aggregation.js +7 -18
  152. package/dist/gpu-core/gpu-group-aggregation.js.map +1 -1
  153. package/dist/gpu-core/gpu-operation.d.ts +4 -4
  154. package/dist/gpu-core/gpu-operation.d.ts.map +1 -1
  155. package/dist/gpu-core/gpu-operation.js.map +1 -1
  156. package/dist/gpu-core/gpu-reduction.cjs +6 -14
  157. package/dist/gpu-core/gpu-reduction.d.ts.map +1 -1
  158. package/dist/gpu-core/gpu-reduction.js +6 -15
  159. package/dist/gpu-core/gpu-reduction.js.map +1 -1
  160. package/dist/gpu-core/gpu-render-operation.cjs +39 -0
  161. package/dist/gpu-core/gpu-render-operation.d.ts +21 -0
  162. package/dist/gpu-core/gpu-render-operation.d.ts.map +1 -0
  163. package/dist/gpu-core/gpu-render-operation.js +22 -0
  164. package/dist/gpu-core/gpu-render-operation.js.map +1 -0
  165. package/dist/gpu-core/gpu-scan.cjs +46 -32
  166. package/dist/gpu-core/gpu-scan.d.ts.map +1 -1
  167. package/dist/gpu-core/gpu-scan.js +56 -44
  168. package/dist/gpu-core/gpu-scan.js.map +1 -1
  169. package/dist/gpu-core/gpu-segmented-reduction.cjs +12 -9
  170. package/dist/gpu-core/gpu-segmented-reduction.d.ts +1 -1
  171. package/dist/gpu-core/gpu-segmented-reduction.d.ts.map +1 -1
  172. package/dist/gpu-core/gpu-segmented-reduction.js +12 -9
  173. package/dist/gpu-core/gpu-segmented-reduction.js.map +1 -1
  174. package/dist/gpu-core/gpu-segmented-scan.cjs +73 -16
  175. package/dist/gpu-core/gpu-segmented-scan.d.ts.map +1 -1
  176. package/dist/gpu-core/gpu-segmented-scan.js +73 -16
  177. package/dist/gpu-core/gpu-segmented-scan.js.map +1 -1
  178. package/dist/gpu-core/gpu-semantic-aggregation-operation.cjs +112 -0
  179. package/dist/gpu-core/gpu-semantic-aggregation-operation.d.ts +71 -0
  180. package/dist/gpu-core/gpu-semantic-aggregation-operation.d.ts.map +1 -0
  181. package/dist/gpu-core/gpu-semantic-aggregation-operation.js +92 -0
  182. package/dist/gpu-core/gpu-semantic-aggregation-operation.js.map +1 -0
  183. package/dist/gpu-core/gpu-shader-pass-kernel.cjs +267 -0
  184. package/dist/gpu-core/gpu-shader-pass-kernel.d.ts +29 -0
  185. package/dist/gpu-core/gpu-shader-pass-kernel.d.ts.map +1 -0
  186. package/dist/gpu-core/gpu-shader-pass-kernel.js +260 -0
  187. package/dist/gpu-core/gpu-shader-pass-kernel.js.map +1 -0
  188. package/dist/gpu-core/gpu-shader-pass-operation.cjs +85 -0
  189. package/dist/gpu-core/gpu-shader-pass-operation.d.ts +32 -0
  190. package/dist/gpu-core/gpu-shader-pass-operation.d.ts.map +1 -0
  191. package/dist/gpu-core/gpu-shader-pass-operation.js +74 -0
  192. package/dist/gpu-core/gpu-shader-pass-operation.js.map +1 -0
  193. package/dist/gpu-core/gpu-texture-plan.d.ts +3 -2
  194. package/dist/gpu-core/gpu-texture-plan.d.ts.map +1 -1
  195. package/dist/gpu-core/gpu-texture-plan.js.map +1 -1
  196. package/dist/gpu-core/index.cjs +32 -0
  197. package/dist/gpu-core/index.cjs.map +3 -3
  198. package/dist/gpu-core/index.d.ts +21 -1
  199. package/dist/gpu-core/index.d.ts.map +1 -1
  200. package/dist/gpu-core/index.js +10 -0
  201. package/dist/gpu-core/index.js.map +1 -1
  202. package/dist/gpu-data/color-conversion.cjs +105 -0
  203. package/dist/gpu-data/color-conversion.d.ts +30 -0
  204. package/dist/gpu-data/color-conversion.d.ts.map +1 -0
  205. package/dist/gpu-data/color-conversion.js +109 -0
  206. package/dist/gpu-data/color-conversion.js.map +1 -0
  207. package/dist/gpu-data/cpu-data.cjs +60 -0
  208. package/dist/gpu-data/cpu-data.d.ts +28 -0
  209. package/dist/gpu-data/cpu-data.d.ts.map +1 -0
  210. package/dist/gpu-data/cpu-data.js +41 -0
  211. package/dist/gpu-data/cpu-data.js.map +1 -0
  212. package/dist/gpu-data/cpu-gpu-vector-transfer.cjs +98 -0
  213. package/dist/gpu-data/cpu-gpu-vector-transfer.d.ts +9 -0
  214. package/dist/gpu-data/cpu-gpu-vector-transfer.d.ts.map +1 -0
  215. package/dist/gpu-data/cpu-gpu-vector-transfer.js +85 -0
  216. package/dist/gpu-data/cpu-gpu-vector-transfer.js.map +1 -0
  217. package/dist/gpu-data/cpu-vector.cjs +42 -0
  218. package/dist/gpu-data/cpu-vector.d.ts +17 -0
  219. package/dist/gpu-data/cpu-vector.d.ts.map +1 -0
  220. package/dist/gpu-data/cpu-vector.js +21 -0
  221. package/dist/gpu-data/cpu-vector.js.map +1 -0
  222. package/dist/gpu-data/gpu-data-buffer-props.cjs +41 -0
  223. package/dist/gpu-data/gpu-data-buffer-props.d.ts +5 -0
  224. package/dist/gpu-data/gpu-data-buffer-props.d.ts.map +1 -0
  225. package/dist/gpu-data/gpu-data-buffer-props.js +19 -0
  226. package/dist/gpu-data/gpu-data-buffer-props.js.map +1 -0
  227. package/dist/gpu-data/gpu-vector-wgsl-layout.cjs +50 -0
  228. package/dist/gpu-data/gpu-vector-wgsl-layout.d.ts +41 -0
  229. package/dist/gpu-data/gpu-vector-wgsl-layout.d.ts.map +1 -0
  230. package/dist/gpu-data/gpu-vector-wgsl-layout.js +45 -0
  231. package/dist/gpu-data/gpu-vector-wgsl-layout.js.map +1 -0
  232. package/dist/gpu-data/index.cjs +21 -2
  233. package/dist/gpu-data/index.cjs.map +3 -3
  234. package/dist/gpu-data/index.d.ts +6 -0
  235. package/dist/gpu-data/index.d.ts.map +1 -1
  236. package/dist/gpu-data/index.js +5 -0
  237. package/dist/gpu-data/index.js.map +1 -1
  238. package/dist/gpu-dataframe/gpu-data-frame-query.cjs +1 -16
  239. package/dist/gpu-dataframe/gpu-data-frame-query.d.ts.map +1 -1
  240. package/dist/gpu-dataframe/gpu-data-frame-query.js +1 -23
  241. package/dist/gpu-dataframe/gpu-data-frame-query.js.map +1 -1
  242. package/dist/gpu-dataframe/gpu-expression.cjs +91 -2
  243. package/dist/gpu-dataframe/gpu-expression.d.ts +37 -0
  244. package/dist/gpu-dataframe/gpu-expression.d.ts.map +1 -1
  245. package/dist/gpu-dataframe/gpu-expression.js +106 -0
  246. package/dist/gpu-dataframe/gpu-expression.js.map +1 -1
  247. package/dist/gpu-dataframe/index.cjs +12 -2
  248. package/dist/gpu-dataframe/index.cjs.map +3 -3
  249. package/dist/gpu-dataframe/index.d.ts +4 -0
  250. package/dist/gpu-dataframe/index.d.ts.map +1 -1
  251. package/dist/gpu-dataframe/index.js +2 -0
  252. package/dist/gpu-dataframe/index.js.map +1 -1
  253. package/dist/gpu-dataframe/portable-expression.cjs +103 -0
  254. package/dist/gpu-dataframe/portable-expression.d.ts +19 -0
  255. package/dist/gpu-dataframe/portable-expression.d.ts.map +1 -0
  256. package/dist/gpu-dataframe/portable-expression.js +98 -0
  257. package/dist/gpu-dataframe/portable-expression.js.map +1 -0
  258. package/dist/gpu-dggs/benchmarks.cjs.map +1 -1
  259. package/dist/gpu-dggs/index.cjs.map +1 -1
  260. package/dist/gpu-geometry/index.cjs.map +1 -1
  261. package/dist/gpu-graph/index.cjs +8 -0
  262. package/dist/gpu-graph/index.cjs.map +3 -3
  263. package/dist/gpu-graph/index.d.ts +4 -0
  264. package/dist/gpu-graph/index.d.ts.map +1 -1
  265. package/dist/gpu-graph/index.js +2 -0
  266. package/dist/gpu-graph/index.js.map +1 -1
  267. package/dist/gpu-graph-algorithms/benchmarks.cjs.map +2 -2
  268. package/dist/gpu-graph-algorithms/gpu-graph-spatial-force-layout-internals.cjs +2 -15
  269. package/dist/gpu-graph-algorithms/gpu-graph-spatial-force-layout-internals.d.ts.map +1 -1
  270. package/dist/gpu-graph-algorithms/gpu-graph-spatial-force-layout-internals.js +2 -15
  271. package/dist/gpu-graph-algorithms/gpu-graph-spatial-force-layout-internals.js.map +1 -1
  272. package/dist/gpu-graph-algorithms/index.cjs.map +2 -2
  273. package/dist/gpu-h3/index.cjs.map +1 -1
  274. package/dist/gpu-physics/gpu-rigid-body-world.cjs +162 -2
  275. package/dist/gpu-physics/gpu-rigid-body-world.d.ts +25 -0
  276. package/dist/gpu-physics/gpu-rigid-body-world.d.ts.map +1 -1
  277. package/dist/gpu-physics/gpu-rigid-body-world.js +181 -2
  278. package/dist/gpu-physics/gpu-rigid-body-world.js.map +1 -1
  279. package/dist/gpu-physics/index.cjs.map +2 -2
  280. package/dist/gpu-physics/index.d.ts +1 -0
  281. package/dist/gpu-physics/index.d.ts.map +1 -1
  282. package/dist/gpu-physics/rigid-body-parallel-shaders.cjs +24 -9
  283. package/dist/gpu-physics/rigid-body-parallel-shaders.d.ts +1 -1
  284. package/dist/gpu-physics/rigid-body-parallel-shaders.d.ts.map +1 -1
  285. package/dist/gpu-physics/rigid-body-parallel-shaders.js +28 -9
  286. package/dist/gpu-physics/rigid-body-parallel-shaders.js.map +1 -1
  287. package/dist/gpu-physics/rigid-body-shaders.cjs +2 -2
  288. package/dist/gpu-physics/rigid-body-shaders.d.ts +1 -1
  289. package/dist/gpu-physics/rigid-body-shaders.d.ts.map +1 -1
  290. package/dist/gpu-physics/rigid-body-shaders.js +2 -2
  291. package/dist/gpu-physics/rigid-body-shaders.js.map +1 -1
  292. package/dist/gpu-physics/rigid-body-vehicle.cjs +90 -0
  293. package/dist/gpu-physics/rigid-body-vehicle.d.ts +35 -0
  294. package/dist/gpu-physics/rigid-body-vehicle.d.ts.map +1 -0
  295. package/dist/gpu-physics/rigid-body-vehicle.js +66 -0
  296. package/dist/gpu-physics/rigid-body-vehicle.js.map +1 -0
  297. package/dist/gpu-pointcloud/index.cjs.map +1 -1
  298. package/dist/gpu-project/benchmarks.cjs.map +2 -2
  299. package/dist/gpu-project/coordinate-projection-graph.cjs +59 -0
  300. package/dist/gpu-project/coordinate-projection-graph.d.ts +23 -0
  301. package/dist/gpu-project/coordinate-projection-graph.d.ts.map +1 -0
  302. package/dist/gpu-project/coordinate-projection-graph.js +40 -0
  303. package/dist/gpu-project/coordinate-projection-graph.js.map +1 -0
  304. package/dist/gpu-project/cpu-geoarrow.cjs +112 -0
  305. package/dist/gpu-project/cpu-geoarrow.d.ts +10 -0
  306. package/dist/gpu-project/cpu-geoarrow.d.ts.map +1 -0
  307. package/dist/gpu-project/cpu-geoarrow.js +103 -0
  308. package/dist/gpu-project/cpu-geoarrow.js.map +1 -0
  309. package/dist/gpu-project/cpu-geometry-pipelines.cjs +134 -0
  310. package/dist/gpu-project/cpu-geometry-pipelines.d.ts +19 -0
  311. package/dist/gpu-project/cpu-geometry-pipelines.d.ts.map +1 -0
  312. package/dist/gpu-project/cpu-geometry-pipelines.js +114 -0
  313. package/dist/gpu-project/cpu-geometry-pipelines.js.map +1 -0
  314. package/dist/gpu-project/cpu-projection-operation.cjs +54 -0
  315. package/dist/gpu-project/cpu-projection-operation.d.ts +14 -0
  316. package/dist/gpu-project/cpu-projection-operation.d.ts.map +1 -0
  317. package/dist/gpu-project/cpu-projection-operation.js +37 -0
  318. package/dist/gpu-project/cpu-projection-operation.js.map +1 -0
  319. package/dist/gpu-project/crs.cjs.map +2 -2
  320. package/dist/gpu-project/geoarrow.cjs +36 -0
  321. package/dist/gpu-project/geoarrow.cjs.map +6 -0
  322. package/dist/gpu-project/geoarrow.d.ts +3 -0
  323. package/dist/gpu-project/geoarrow.d.ts.map +1 -0
  324. package/dist/gpu-project/geoarrow.js +7 -0
  325. package/dist/gpu-project/geoarrow.js.map +1 -0
  326. package/dist/gpu-project/graph.cjs +27 -0
  327. package/dist/gpu-project/graph.cjs.map +6 -0
  328. package/dist/gpu-project/graph.d.ts +2 -0
  329. package/dist/gpu-project/graph.d.ts.map +1 -0
  330. package/dist/gpu-project/graph.js +6 -0
  331. package/dist/gpu-project/graph.js.map +1 -0
  332. package/dist/gpu-project/index.cjs +3 -0
  333. package/dist/gpu-project/index.cjs.map +3 -3
  334. package/dist/gpu-project/index.d.ts +1 -0
  335. package/dist/gpu-project/index.d.ts.map +1 -1
  336. package/dist/gpu-project/index.js +1 -0
  337. package/dist/gpu-project/index.js.map +1 -1
  338. package/dist/gpu-simple-graph/compiled-gpu-expression-graph.cjs +75 -5
  339. package/dist/gpu-simple-graph/compiled-gpu-expression-graph.d.ts +5 -1
  340. package/dist/gpu-simple-graph/compiled-gpu-expression-graph.d.ts.map +1 -1
  341. package/dist/gpu-simple-graph/compiled-gpu-expression-graph.js +86 -6
  342. package/dist/gpu-simple-graph/compiled-gpu-expression-graph.js.map +1 -1
  343. package/dist/gpu-simple-graph/gpu-simple-graph-lowering.cjs +9 -0
  344. package/dist/gpu-simple-graph/gpu-simple-graph-lowering.d.ts +2 -0
  345. package/dist/gpu-simple-graph/gpu-simple-graph-lowering.d.ts.map +1 -1
  346. package/dist/gpu-simple-graph/gpu-simple-graph-lowering.js +10 -0
  347. package/dist/gpu-simple-graph/gpu-simple-graph-lowering.js.map +1 -1
  348. package/dist/gpu-simple-graph/gpu-simple-graph.cjs +126 -10
  349. package/dist/gpu-simple-graph/gpu-simple-graph.d.ts +36 -11
  350. package/dist/gpu-simple-graph/gpu-simple-graph.d.ts.map +1 -1
  351. package/dist/gpu-simple-graph/gpu-simple-graph.js +137 -12
  352. package/dist/gpu-simple-graph/gpu-simple-graph.js.map +1 -1
  353. package/dist/gpu-simple-graph/index.cjs.map +3 -3
  354. package/dist/gpu-simple-graph/index.d.ts +1 -1
  355. package/dist/gpu-simple-graph/index.d.ts.map +1 -1
  356. package/dist/gpu-simple-graph/index.js.map +1 -1
  357. package/dist/gpu-simple-graph/operation/gpu-data-evaluator.cjs +25 -0
  358. package/dist/gpu-simple-graph/operation/gpu-data-evaluator.d.ts +6 -0
  359. package/dist/gpu-simple-graph/operation/gpu-data-evaluator.d.ts.map +1 -1
  360. package/dist/gpu-simple-graph/operation/gpu-data-evaluator.js +28 -0
  361. package/dist/gpu-simple-graph/operation/gpu-data-evaluator.js.map +1 -1
  362. package/dist/gpu-simple-graph/operation/gpu-vector-evaluator.cjs +7 -0
  363. package/dist/gpu-simple-graph/operation/gpu-vector-evaluator.d.ts +2 -0
  364. package/dist/gpu-simple-graph/operation/gpu-vector-evaluator.d.ts.map +1 -1
  365. package/dist/gpu-simple-graph/operation/gpu-vector-evaluator.js +7 -0
  366. package/dist/gpu-simple-graph/operation/gpu-vector-evaluator.js.map +1 -1
  367. package/dist/gpu-simple-graph/operations/convert-colors.cjs +6 -6
  368. package/dist/gpu-simple-graph/operations/convert-colors.d.ts +5 -1
  369. package/dist/gpu-simple-graph/operations/convert-colors.d.ts.map +1 -1
  370. package/dist/gpu-simple-graph/operations/convert-colors.js +12 -7
  371. package/dist/gpu-simple-graph/operations/convert-colors.js.map +1 -1
  372. package/dist/gpu-simple-graph/operations/cpu/convert-colors.cjs +16 -33
  373. package/dist/gpu-simple-graph/operations/cpu/convert-colors.d.ts.map +1 -1
  374. package/dist/gpu-simple-graph/operations/cpu/convert-colors.js +22 -35
  375. package/dist/gpu-simple-graph/operations/cpu/convert-colors.js.map +1 -1
  376. package/dist/gpu-simple-graph/operations/cpu/index.cjs.map +3 -3
  377. package/dist/gpu-simple-graph/operations/webgl/index.cjs.map +3 -3
  378. package/dist/gpu-simple-graph/operations/webgpu/convert-colors.cjs +31 -13
  379. package/dist/gpu-simple-graph/operations/webgpu/convert-colors.d.ts.map +1 -1
  380. package/dist/gpu-simple-graph/operations/webgpu/convert-colors.js +42 -13
  381. package/dist/gpu-simple-graph/operations/webgpu/convert-colors.js.map +1 -1
  382. package/dist/gpu-simple-graph/operations/webgpu/index.cjs.map +1 -1
  383. package/dist/gpu-sql/gpu-sql.cjs +376 -0
  384. package/dist/gpu-sql/gpu-sql.d.ts +36 -0
  385. package/dist/gpu-sql/gpu-sql.d.ts.map +1 -0
  386. package/dist/gpu-sql/gpu-sql.js +374 -0
  387. package/dist/gpu-sql/gpu-sql.js.map +1 -0
  388. package/dist/gpu-sql/index.cjs +5 -5
  389. package/dist/gpu-sql/index.cjs.map +3 -3
  390. package/dist/gpu-sql/index.d.ts +2 -2
  391. package/dist/gpu-sql/index.d.ts.map +1 -1
  392. package/dist/gpu-sql/index.js +1 -1
  393. package/dist/gpu-sql/index.js.map +1 -1
  394. package/dist/gpu-tables/index.cjs.map +2 -2
  395. package/dist/gpu-tables/table/gpu-table.cjs +2 -2
  396. package/dist/gpu-tables/table/gpu-table.d.ts.map +1 -1
  397. package/dist/gpu-tables/table/gpu-table.js +2 -2
  398. package/dist/gpu-tables/table/gpu-table.js.map +1 -1
  399. package/dist/gpu-timeseries/index.cjs.map +1 -1
  400. package/dist/index.cjs +11 -0
  401. package/dist/index.cjs.map +3 -3
  402. package/dist/index.d.ts +7 -1
  403. package/dist/index.d.ts.map +1 -1
  404. package/dist/index.js +3 -0
  405. package/dist/index.js.map +1 -1
  406. package/package.json +21 -7
  407. package/src/arrow/arrow-colors.ts +194 -33
  408. package/src/arrow/arrow-utils/arrow-paths.ts +5 -3
  409. package/src/arrow/cpu/arrow-coordinate-projection.ts +18 -0
  410. package/src/arrow/cpu/arrow-cpu-pipelines.ts +9 -0
  411. package/src/arrow/cpu/arrow-cpu-vector-adapters.ts +153 -0
  412. package/src/arrow/geoarrow/arrow-geoarrow-adapter.ts +21 -493
  413. package/src/arrow/geoarrow/arrow-geoarrow-conversion.ts +7 -5
  414. package/src/arrow/geoarrow/arrow-polygon-tessellation.ts +1 -1
  415. package/src/arrow/gpu/arrow-column-gpu-vector.ts +67 -14
  416. package/src/arrow/gpu/arrow-gpu-table-conversion.ts +96 -4
  417. package/src/arrow/gpu/arrow-gpu-vector-adapters.ts +20 -7
  418. package/src/arrow/gpu/arrow-gpu-vector-conversion.ts +49 -6
  419. package/src/arrow/index.ts +14 -0
  420. package/src/geospatial/gpu-point-spatial-query.ts +2 -15
  421. package/src/gpu-core/compiled-gpu-graph.ts +73 -1
  422. package/src/gpu-core/gpu-command-graph-compiler.ts +25 -2
  423. package/src/gpu-core/gpu-command-graph-types.ts +20 -0
  424. package/src/gpu-core/gpu-command-graph.ts +48 -11
  425. package/src/gpu-core/gpu-cpu-execution.ts +345 -0
  426. package/src/gpu-core/gpu-cpu-operation.ts +65 -0
  427. package/src/gpu-core/gpu-dispatch-utils.ts +13 -1
  428. package/src/gpu-core/gpu-expression-operation.ts +1 -1
  429. package/src/gpu-core/gpu-expression-plan.ts +11 -3
  430. package/src/gpu-core/gpu-graph-compiler.ts +61 -0
  431. package/src/gpu-core/gpu-graph.ts +3 -3
  432. package/src/gpu-core/gpu-grid-aggregation.ts +2 -5
  433. package/src/gpu-core/gpu-grid-binning.ts +2 -5
  434. package/src/gpu-core/gpu-grid-coordinate.ts +24 -0
  435. package/src/gpu-core/gpu-grid-index-internals.ts +2 -15
  436. package/src/gpu-core/gpu-grid-index-query.ts +2 -16
  437. package/src/gpu-core/gpu-group-aggregation.ts +38 -50
  438. package/src/gpu-core/gpu-operation.ts +9 -7
  439. package/src/gpu-core/gpu-reduction.ts +32 -42
  440. package/src/gpu-core/gpu-render-operation.ts +42 -0
  441. package/src/gpu-core/gpu-scan.ts +59 -45
  442. package/src/gpu-core/gpu-segmented-reduction.ts +20 -10
  443. package/src/gpu-core/gpu-segmented-scan.ts +82 -17
  444. package/src/gpu-core/gpu-semantic-aggregation-operation.ts +150 -0
  445. package/src/gpu-core/gpu-shader-pass-kernel.ts +307 -0
  446. package/src/gpu-core/gpu-shader-pass-operation.ts +103 -0
  447. package/src/gpu-core/gpu-texture-plan.ts +3 -2
  448. package/src/gpu-core/index.ts +39 -0
  449. package/src/gpu-data/color-conversion.ts +158 -0
  450. package/src/gpu-data/cpu-data.ts +62 -0
  451. package/src/gpu-data/cpu-gpu-vector-transfer.ts +110 -0
  452. package/src/gpu-data/cpu-vector.ts +31 -0
  453. package/src/gpu-data/gpu-data-buffer-props.ts +25 -0
  454. package/src/gpu-data/gpu-vector-wgsl-layout.ts +79 -0
  455. package/src/gpu-data/index.ts +15 -0
  456. package/src/gpu-dataframe/gpu-data-frame-query.ts +6 -26
  457. package/src/gpu-dataframe/gpu-expression.ts +135 -0
  458. package/src/gpu-dataframe/index.ts +11 -0
  459. package/src/gpu-dataframe/portable-expression.ts +117 -0
  460. package/src/gpu-graph/index.ts +17 -0
  461. package/src/gpu-graph-algorithms/gpu-graph-spatial-force-layout-internals.ts +2 -15
  462. package/src/gpu-physics/gpu-rigid-body-world.ts +227 -2
  463. package/src/gpu-physics/index.ts +1 -0
  464. package/src/gpu-physics/rigid-body-parallel-shaders.ts +32 -9
  465. package/src/gpu-physics/rigid-body-shaders.ts +3 -2
  466. package/src/gpu-physics/rigid-body-vehicle.ts +99 -0
  467. package/src/gpu-project/README.md +4 -4
  468. package/src/gpu-project/coordinate-projection-graph.ts +59 -0
  469. package/src/gpu-project/cpu-geoarrow.ts +135 -0
  470. package/src/gpu-project/cpu-geometry-pipelines.ts +159 -0
  471. package/src/gpu-project/cpu-projection-operation.ts +49 -0
  472. package/src/gpu-project/geoarrow.ts +11 -0
  473. package/src/gpu-project/graph.ts +10 -0
  474. package/src/gpu-project/index.ts +2 -0
  475. package/src/gpu-simple-graph/compiled-gpu-expression-graph.ts +97 -6
  476. package/src/gpu-simple-graph/gpu-simple-graph-lowering.ts +11 -0
  477. package/src/gpu-simple-graph/gpu-simple-graph.ts +163 -19
  478. package/src/gpu-simple-graph/index.ts +1 -0
  479. package/src/gpu-simple-graph/operation/gpu-data-evaluator.ts +24 -0
  480. package/src/gpu-simple-graph/operation/gpu-vector-evaluator.ts +7 -0
  481. package/src/gpu-simple-graph/operations/convert-colors.ts +22 -7
  482. package/src/gpu-simple-graph/operations/cpu/convert-colors.ts +31 -48
  483. package/src/gpu-simple-graph/operations/webgpu/convert-colors.ts +47 -13
  484. package/src/gpu-sql/gpu-sql.ts +494 -0
  485. package/src/gpu-sql/index.ts +2 -2
  486. package/src/gpu-tables/table/gpu-table.ts +2 -1
  487. package/src/index.ts +21 -0
  488. package/dist/gpu-sql/lu-sql.cjs +0 -499
  489. package/dist/gpu-sql/lu-sql.d.ts +0 -36
  490. package/dist/gpu-sql/lu-sql.d.ts.map +0 -1
  491. package/dist/gpu-sql/lu-sql.js +0 -497
  492. package/dist/gpu-sql/lu-sql.js.map +0 -1
  493. package/src/gpu-sql/lu-sql.ts +0 -599
@@ -0,0 +1,279 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var gpu_cpu_execution_exports = {};
19
+ __export(gpu_cpu_execution_exports, {
20
+ GPUCPUExecution: () => GPUCPUExecution
21
+ });
22
+ module.exports = __toCommonJS(gpu_cpu_execution_exports);
23
+ var import_core = require("@luma.gl/core");
24
+ var import_gpu_data = require("@luma.gl/graph/gpu-data");
25
+ var import_gpu_graph = require("./gpu-graph.cjs");
26
+ var import_gpu_graph_value = require("./gpu-graph-value.cjs");
27
+ var import_gpu_cpu_operation = require("./gpu-cpu-operation.cjs");
28
+ var import_gpu_expression_plan = require("./gpu-expression-plan.cjs");
29
+ var import_gpu_transfer_operation = require("./gpu-transfer-operation.cjs");
30
+ class GPUCPUExecution {
31
+ device;
32
+ program;
33
+ compileStage;
34
+ stages = [];
35
+ constructor(device, program, compileStage) {
36
+ this.device = device;
37
+ this.program = program;
38
+ this.compileStage = compileStage;
39
+ (0, import_core.assert)(!program.textures.length && !program.vectors.some((value) => value.role === "state"));
40
+ const declarations = [...program.scalars, ...program.vectors];
41
+ const addInput = (graph, name) => {
42
+ const declaration = declarations.find((value) => value.id === name);
43
+ (0, import_core.assert)(declaration);
44
+ const vector = program.vectors.find((value) => value.id === name);
45
+ if (vector)
46
+ graph.addInput(name, import_gpu_graph_value.gpuGraph.vector(vector.format, {
47
+ length: vector.length,
48
+ chunkLengths: vector.chunkLengths
49
+ }));
50
+ else
51
+ graph.addInput(name, import_gpu_graph_value.gpuGraph.scalar(program.scalars.find((value) => value.id === name).format));
52
+ };
53
+ try {
54
+ for (const operation of program.operations) {
55
+ if (operation instanceof import_gpu_cpu_operation.GPUCPUOperation) {
56
+ this.stages.push(operation);
57
+ continue;
58
+ }
59
+ (0, import_core.assert)("contract" in operation && operation.contract);
60
+ const inputs = operation.contract.values.filter((use) => use.access !== "write").map((use) => typeof use.value === "string" ? use.value : use.value.id);
61
+ const outputs = operation.contract.values.filter((use) => use.access !== "read").map((use) => typeof use.value === "string" ? use.value : use.value.id);
62
+ const graph = new import_gpu_graph.GPUGraph();
63
+ for (const name of new Set(inputs))
64
+ addInput(graph, name);
65
+ for (const name of new Set(outputs)) {
66
+ const vector = program.vectors.find((value) => value.id === name);
67
+ if (vector)
68
+ graph.addDeclaration(name, import_gpu_graph_value.gpuGraph.vector(vector.format, {
69
+ length: vector.length,
70
+ chunkLengths: vector.chunkLengths
71
+ }), "value");
72
+ }
73
+ graph.add(operation);
74
+ this.stages.push({
75
+ graph: compileStage(graph, outputs),
76
+ inputs
77
+ });
78
+ }
79
+ } catch (error) {
80
+ this.destroy();
81
+ throw error;
82
+ }
83
+ }
84
+ async run(bindings, locations = {}) {
85
+ for (const [name, location] of Object.entries(locations))
86
+ (0, import_core.assert)(this.program.outputs.includes(name) && (location === "cpu" || location === "gpu"));
87
+ const cpu = /* @__PURE__ */ new Map();
88
+ for (const declaration of [...this.program.vectors, ...this.program.scalars].filter((value) => value.role === "input")) {
89
+ const value = bindings[declaration.id];
90
+ (0, import_core.assert)(value !== void 0);
91
+ if (!(value instanceof import_gpu_data.CPUVector)) {
92
+ const graph = new import_gpu_graph.GPUGraph();
93
+ const vector = this.program.vectors.find((vector2) => vector2.id === declaration.id);
94
+ if (vector)
95
+ graph.addInput(declaration.id, import_gpu_graph_value.gpuGraph.vector(vector.format, {
96
+ length: vector.length,
97
+ chunkLengths: vector.chunkLengths
98
+ }));
99
+ else
100
+ graph.addInput(declaration.id, import_gpu_graph_value.gpuGraph.scalar(this.program.scalars.find((scalar) => scalar.id === declaration.id).format));
101
+ new import_gpu_expression_plan.GPUExpressionProgram(graph, { outputs: [] }).prepare(this.device, { [declaration.id]: value }).finish();
102
+ }
103
+ if (value instanceof import_gpu_data.CPUVector) {
104
+ (0, import_core.assert)(value.data.every((chunk) => !chunk.nullBitmap && !chunk.valueOffsets));
105
+ (0, import_core.assert)(value.format === declaration.format);
106
+ const vector = this.program.vectors.find((vector2) => vector2.id === declaration.id);
107
+ (0, import_core.assert)(vector && (vector.length === void 0 || vector.length === value.length));
108
+ (0, import_core.assert)(!vector.chunkLengths || vector.chunkLengths.length === value.data.length && vector.chunkLengths.every((length, index) => length === value.data[index].length));
109
+ cpu.set(declaration.id, value);
110
+ }
111
+ }
112
+ const values = { ...bindings };
113
+ const owned = /* @__PURE__ */ new Set();
114
+ const ensureCPU = async (name) => {
115
+ let value = cpu.get(name);
116
+ if (!value) {
117
+ const gpu = values[name];
118
+ (0, import_core.assert)(gpu instanceof import_gpu_data.GPUVector);
119
+ const read = await readCPUVector(gpu);
120
+ value = makeCPUVector(read.format, read.chunks.map((chunk) => chunk.values));
121
+ cpu.set(name, value);
122
+ }
123
+ return getCPUView(value);
124
+ };
125
+ const ensureGPU = async (name) => {
126
+ const existing = values[name];
127
+ if (existing instanceof import_gpu_data.GPUVector)
128
+ return existing;
129
+ const view = await ensureCPU(name);
130
+ const graph = new import_gpu_graph.GPUGraph();
131
+ graph.add(new import_gpu_transfer_operation.GPUUploadOperation({
132
+ output: name,
133
+ format: view.format,
134
+ data: view.chunks.map((chunk) => chunk.values)
135
+ }));
136
+ const compiled = this.compileStage(graph);
137
+ try {
138
+ const result = (await compiled.run({}))[name];
139
+ owned.add(result);
140
+ values[name] = result;
141
+ return result;
142
+ } finally {
143
+ compiled.destroy();
144
+ }
145
+ };
146
+ try {
147
+ for (const stage of this.stages) {
148
+ let results;
149
+ if (stage instanceof import_gpu_cpu_operation.GPUCPUOperation) {
150
+ const inputs = /* @__PURE__ */ Object.create(null);
151
+ for (const [localName, name] of Object.entries(stage.inputs)) {
152
+ const value = values[name];
153
+ const cpuValue = typeof value === "number" ? value : await ensureCPU(name);
154
+ inputs[localName] = typeof cpuValue !== "number" && this.program.scalars.some((scalar) => scalar.id === name) ? cpuValue.pack()[0] : cpuValue;
155
+ }
156
+ const outputs2 = await stage.execute({ inputs });
157
+ (0, import_core.assert)(Object.keys(outputs2).length === Object.keys(stage.outputs).length);
158
+ for (const name of Object.keys(stage.outputs)) {
159
+ const descriptor = this.program.vectors.find((vector) => vector.id === name);
160
+ const result = outputs2[name];
161
+ (0, import_core.assert)(result);
162
+ const arrays = "chunks" in result ? result.chunks.map((chunk) => chunk.values) : [result];
163
+ const upload = new import_gpu_transfer_operation.GPUUploadOperation({
164
+ output: name,
165
+ format: descriptor.format,
166
+ data: arrays
167
+ });
168
+ const length = upload.chunkLengths.reduce((total, count) => total + count, 0);
169
+ (0, import_core.assert)(descriptor.length === void 0 || descriptor.length === length);
170
+ (0, import_core.assert)(!descriptor.chunkLengths || descriptor.chunkLengths.length === arrays.length && descriptor.chunkLengths.every((count, index) => count === upload.chunkLengths[index]));
171
+ cpu.set(name, makeCPUVector(descriptor.format, arrays));
172
+ delete values[name];
173
+ }
174
+ continue;
175
+ } else {
176
+ const inputs = /* @__PURE__ */ Object.create(null);
177
+ for (const name of stage.inputs) {
178
+ const value = values[name];
179
+ inputs[name] = this.program.scalars.some((scalar) => scalar.id === name) ? typeof value === "number" ? value : (await ensureCPU(name)).pack()[0] : await ensureGPU(name);
180
+ }
181
+ results = await stage.graph.run({ inputs });
182
+ }
183
+ for (const [name, value] of Object.entries(results)) {
184
+ cpu.delete(name);
185
+ values[name] = value;
186
+ owned.add(value);
187
+ }
188
+ }
189
+ const outputs = /* @__PURE__ */ Object.create(null);
190
+ for (const name of this.program.outputs) {
191
+ if (locations[name] === "cpu") {
192
+ await ensureCPU(name);
193
+ outputs[name] = cpu.get(name);
194
+ } else
195
+ outputs[name] = await ensureGPU(name);
196
+ }
197
+ for (const value of Object.values(outputs))
198
+ if (value instanceof import_gpu_data.GPUVector)
199
+ owned.delete(value);
200
+ return outputs;
201
+ } finally {
202
+ for (const value of owned)
203
+ value.destroy();
204
+ }
205
+ }
206
+ destroy() {
207
+ for (const stage of this.stages)
208
+ if (!(stage instanceof import_gpu_cpu_operation.GPUCPUOperation))
209
+ stage.graph.destroy();
210
+ }
211
+ }
212
+ async function readCPUVector(vector) {
213
+ (0, import_core.assert)(vector.format);
214
+ const info = (0, import_gpu_data.getGPUVectorFormatInfo)(vector.format);
215
+ const ValueType = info.signedDataType === "float32" ? Float32Array : info.signedDataType === "uint32" ? Uint32Array : Int32Array;
216
+ const chunks = [];
217
+ for (const chunk of vector.data) {
218
+ const values = new ValueType(chunk.length * info.byteLength / 4);
219
+ if (chunk.length) {
220
+ const bytes = await chunk.buffer.readAsync(chunk.byteOffset, (chunk.length - 1) * chunk.byteStride + info.byteLength);
221
+ const packed = new Uint8Array(values.buffer);
222
+ for (let row = 0; row < chunk.length; row++)
223
+ packed.set(bytes.subarray(row * chunk.byteStride, row * chunk.byteStride + info.byteLength), row * info.byteLength);
224
+ }
225
+ chunks.push({ values, length: chunk.length });
226
+ }
227
+ return {
228
+ format: vector.format,
229
+ length: vector.length,
230
+ chunks,
231
+ pack() {
232
+ const packed = new ValueType(chunks.reduce((total, chunk) => total + chunk.values.length, 0));
233
+ let offset = 0;
234
+ for (const chunk of chunks) {
235
+ packed.set(chunk.values, offset);
236
+ offset += chunk.values.length;
237
+ }
238
+ return packed;
239
+ }
240
+ };
241
+ }
242
+ function makeCPUVector(format, arrays) {
243
+ const width = (0, import_gpu_data.getGPUVectorFormatInfo)(format).byteLength;
244
+ return new import_gpu_data.CPUVector({
245
+ format,
246
+ data: arrays.map((buffer) => new import_gpu_data.CPUData({ buffer, format, length: buffer.byteLength / width }))
247
+ });
248
+ }
249
+ function getCPUView(vector) {
250
+ const format = vector.format;
251
+ (0, import_core.assert)(/^(float32|sint32|uint32)(x[234])?$/.test(format));
252
+ const info = (0, import_gpu_data.getGPUVectorFormatInfo)(format);
253
+ const ValueType = info.signedDataType === "float32" ? Float32Array : info.signedDataType === "uint32" ? Uint32Array : Int32Array;
254
+ const chunks = vector.data.map((chunk) => {
255
+ const values = new ValueType(chunk.length * info.components);
256
+ const bytes = new Uint8Array(values.buffer);
257
+ for (let row = 0; row < chunk.length; row++)
258
+ bytes.set(new Uint8Array(chunk.buffer, chunk.byteOffset + row * chunk.byteStride, info.byteLength), row * info.byteLength);
259
+ return { values, length: chunk.length };
260
+ });
261
+ return {
262
+ format,
263
+ length: vector.length,
264
+ chunks,
265
+ pack() {
266
+ const values = new ValueType(vector.length * info.components);
267
+ let offset = 0;
268
+ for (const chunk of chunks) {
269
+ values.set(chunk.values, offset);
270
+ offset += chunk.values.length;
271
+ }
272
+ return values;
273
+ }
274
+ };
275
+ }
276
+ // Annotate the CommonJS export names for ESM import in node:
277
+ 0 && (module.exports = {
278
+ GPUCPUExecution
279
+ });
@@ -0,0 +1,22 @@
1
+ import { type Device } from '@luma.gl/core';
2
+ import { CPUVector, GPUVector } from '@luma.gl/graph/gpu-data';
3
+ import { GPUGraph } from "./gpu-graph.js";
4
+ import { GPUExpressionProgram, type GPUGraphRunBindings } from "./gpu-expression-plan.js";
5
+ import type { GPUGraphExecutionBindings } from "./gpu-expression-plan.js";
6
+ /** Backend-specific GPU stage; CPU scheduling is shared by both graph executors. */
7
+ export type GPUCPUStage = {
8
+ run(bindings: GPUGraphExecutionBindings): Promise<Record<string, GPUVector>>;
9
+ destroy(): void;
10
+ };
11
+ export type GPUCPUStageCompiler = (source: GPUGraph, outputs?: readonly string[]) => GPUCPUStage;
12
+ /** Submission boundaries around CPU callbacks; each GPU stage resolves its shapes independently. */
13
+ export declare class GPUCPUExecution {
14
+ readonly device: Device;
15
+ readonly program: GPUExpressionProgram;
16
+ private readonly compileStage;
17
+ private readonly stages;
18
+ constructor(device: Device, program: GPUExpressionProgram, compileStage: GPUCPUStageCompiler);
19
+ run(bindings: GPUGraphRunBindings, locations?: Readonly<Record<string, 'cpu' | 'gpu'>>): Promise<Record<string, GPUVector | CPUVector>>;
20
+ destroy(): void;
21
+ }
22
+ //# sourceMappingURL=gpu-cpu-execution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gpu-cpu-execution.d.ts","sourceRoot":"","sources":["../../src/gpu-core/gpu-cpu-execution.ts"],"names":[],"mappings":"AAIA,OAAO,EAAS,KAAK,MAAM,EAAC,MAAM,eAAe,CAAC;AAClD,OAAO,EAAU,SAAS,EAAE,SAAS,EAAyB,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EAAC,QAAQ,EAAC,uBAAoB;AAGrC,OAAO,EAAC,oBAAoB,EAAE,KAAK,mBAAmB,EAAC,iCAA8B;AAErF,OAAO,KAAK,EAAC,yBAAyB,EAAC,iCAA8B;AAErE,oFAAoF;AACpF,MAAM,MAAM,WAAW,GAAG;IACxB,GAAG,CAAC,QAAQ,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;IAC7E,OAAO,IAAI,IAAI,CAAC;CACjB,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,KAAK,WAAW,CAAC;AAEjG,oGAAoG;AACpG,qBAAa,eAAe;IAUxB,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,OAAO,EAAE,oBAAoB;IACtC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAX/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAMd;gBAGE,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,oBAAoB,EACrB,YAAY,EAAE,mBAAmB;IA8D9C,GAAG,CACP,QAAQ,EAAE,mBAAmB,EAC7B,SAAS,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC,CAAM,GACtD,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC;IA8JjD,OAAO,IAAI,IAAI;CAGhB"}
@@ -0,0 +1,294 @@
1
+ // luma.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
+ import { assert } from '@luma.gl/core';
5
+ import { CPUData, CPUVector, GPUVector, getGPUVectorFormatInfo } from '@luma.gl/graph/gpu-data';
6
+ import { GPUGraph } from "./gpu-graph.js";
7
+ import { gpuGraph } from "./gpu-graph-value.js";
8
+ import { GPUCPUOperation } from "./gpu-cpu-operation.js";
9
+ import { GPUExpressionProgram } from "./gpu-expression-plan.js";
10
+ import { GPUUploadOperation } from "./gpu-transfer-operation.js";
11
+ /** Submission boundaries around CPU callbacks; each GPU stage resolves its shapes independently. */
12
+ export class GPUCPUExecution {
13
+ device;
14
+ program;
15
+ compileStage;
16
+ stages = [];
17
+ constructor(device, program, compileStage) {
18
+ this.device = device;
19
+ this.program = program;
20
+ this.compileStage = compileStage;
21
+ // Initial support is for pure numeric, operation-owned results.
22
+ assert(!program.textures.length && !program.vectors.some(value => value.role === 'state'));
23
+ const declarations = [...program.scalars, ...program.vectors];
24
+ const addInput = (graph, name) => {
25
+ const declaration = declarations.find(value => value.id === name);
26
+ assert(declaration);
27
+ const vector = program.vectors.find(value => value.id === name);
28
+ if (vector)
29
+ graph.addInput(name, gpuGraph.vector(vector.format, {
30
+ length: vector.length,
31
+ chunkLengths: vector.chunkLengths
32
+ }));
33
+ else
34
+ graph.addInput(name, gpuGraph.scalar(program.scalars.find(value => value.id === name).format));
35
+ };
36
+ try {
37
+ for (const operation of program.operations) {
38
+ if (operation instanceof GPUCPUOperation) {
39
+ this.stages.push(operation);
40
+ continue;
41
+ }
42
+ assert('contract' in operation && operation.contract);
43
+ const inputs = operation.contract.values
44
+ .filter(use => use.access !== 'write')
45
+ .map(use => (typeof use.value === 'string' ? use.value : use.value.id));
46
+ const outputs = operation.contract.values
47
+ .filter(use => use.access !== 'read')
48
+ .map(use => (typeof use.value === 'string' ? use.value : use.value.id));
49
+ const graph = new GPUGraph();
50
+ for (const name of new Set(inputs))
51
+ addInput(graph, name);
52
+ for (const name of new Set(outputs)) {
53
+ const vector = program.vectors.find(value => value.id === name);
54
+ if (vector)
55
+ graph.addDeclaration(name, gpuGraph.vector(vector.format, {
56
+ length: vector.length,
57
+ chunkLengths: vector.chunkLengths
58
+ }), 'value');
59
+ }
60
+ graph.add(operation);
61
+ this.stages.push({
62
+ graph: compileStage(graph, outputs),
63
+ inputs
64
+ });
65
+ }
66
+ }
67
+ catch (error) {
68
+ this.destroy();
69
+ throw error;
70
+ }
71
+ }
72
+ async run(bindings, locations = {}) {
73
+ for (const [name, location] of Object.entries(locations))
74
+ assert(this.program.outputs.includes(name) && (location === 'cpu' || location === 'gpu'));
75
+ const cpu = new Map();
76
+ for (const declaration of [...this.program.vectors, ...this.program.scalars].filter(value => value.role === 'input')) {
77
+ const value = bindings[declaration.id];
78
+ assert(value !== undefined);
79
+ if (!(value instanceof CPUVector)) {
80
+ const graph = new GPUGraph();
81
+ const vector = this.program.vectors.find(vector => vector.id === declaration.id);
82
+ if (vector)
83
+ graph.addInput(declaration.id, gpuGraph.vector(vector.format, {
84
+ length: vector.length,
85
+ chunkLengths: vector.chunkLengths
86
+ }));
87
+ else
88
+ graph.addInput(declaration.id, gpuGraph.scalar(this.program.scalars.find(scalar => scalar.id === declaration.id).format));
89
+ new GPUExpressionProgram(graph, { outputs: [] })
90
+ .prepare(this.device, { [declaration.id]: value })
91
+ .finish();
92
+ }
93
+ if (value instanceof CPUVector) {
94
+ // List and validity metadata cannot be represented by portable callback rows yet.
95
+ assert(value.data.every(chunk => !chunk.nullBitmap && !chunk.valueOffsets));
96
+ assert(value.format === declaration.format);
97
+ const vector = this.program.vectors.find(vector => vector.id === declaration.id);
98
+ assert(vector && (vector.length === undefined || vector.length === value.length));
99
+ assert(!vector.chunkLengths ||
100
+ (vector.chunkLengths.length === value.data.length &&
101
+ vector.chunkLengths.every((length, index) => length === value.data[index].length)));
102
+ cpu.set(declaration.id, value);
103
+ }
104
+ }
105
+ const values = { ...bindings };
106
+ const owned = new Set();
107
+ const ensureCPU = async (name) => {
108
+ let value = cpu.get(name);
109
+ if (!value) {
110
+ const gpu = values[name];
111
+ assert(gpu instanceof GPUVector);
112
+ const read = await readCPUVector(gpu);
113
+ value = makeCPUVector(read.format, read.chunks.map(chunk => chunk.values));
114
+ cpu.set(name, value);
115
+ }
116
+ return getCPUView(value);
117
+ };
118
+ const ensureGPU = async (name) => {
119
+ const existing = values[name];
120
+ if (existing instanceof GPUVector)
121
+ return existing;
122
+ const view = await ensureCPU(name);
123
+ const graph = new GPUGraph();
124
+ graph.add(new GPUUploadOperation({
125
+ output: name,
126
+ format: view.format,
127
+ data: view.chunks.map(chunk => chunk.values)
128
+ }));
129
+ const compiled = this.compileStage(graph);
130
+ try {
131
+ const result = (await compiled.run({}))[name];
132
+ owned.add(result);
133
+ values[name] = result;
134
+ return result;
135
+ }
136
+ finally {
137
+ compiled.destroy();
138
+ }
139
+ };
140
+ try {
141
+ for (const stage of this.stages) {
142
+ let results;
143
+ if (stage instanceof GPUCPUOperation) {
144
+ const inputs = Object.create(null);
145
+ for (const [localName, name] of Object.entries(stage.inputs)) {
146
+ const value = values[name];
147
+ const cpuValue = typeof value === 'number' ? value : await ensureCPU(name);
148
+ inputs[localName] =
149
+ typeof cpuValue !== 'number' &&
150
+ this.program.scalars.some(scalar => scalar.id === name)
151
+ ? cpuValue.pack()[0]
152
+ : cpuValue;
153
+ }
154
+ const outputs = await stage.execute({ inputs });
155
+ assert(Object.keys(outputs).length === Object.keys(stage.outputs).length);
156
+ for (const name of Object.keys(stage.outputs)) {
157
+ // The resolved declaration includes constraints supplied through graph.vector().
158
+ const descriptor = this.program.vectors.find(vector => vector.id === name);
159
+ const result = outputs[name];
160
+ assert(result);
161
+ const arrays = 'chunks' in result ? result.chunks.map(chunk => chunk.values) : [result];
162
+ const upload = new GPUUploadOperation({
163
+ output: name,
164
+ format: descriptor.format,
165
+ data: arrays
166
+ });
167
+ const length = upload.chunkLengths.reduce((total, count) => total + count, 0);
168
+ // Returned rows must satisfy any declared fixed shape.
169
+ assert(descriptor.length === undefined || descriptor.length === length);
170
+ assert(!descriptor.chunkLengths ||
171
+ (descriptor.chunkLengths.length === arrays.length &&
172
+ descriptor.chunkLengths.every((count, index) => count === upload.chunkLengths[index])));
173
+ cpu.set(name, makeCPUVector(descriptor.format, arrays));
174
+ delete values[name];
175
+ }
176
+ continue;
177
+ }
178
+ else {
179
+ const inputs = Object.create(null);
180
+ for (const name of stage.inputs) {
181
+ const value = values[name];
182
+ // Stage scalar inputs are host numbers, including results produced by an earlier GPU stage.
183
+ inputs[name] = this.program.scalars.some(scalar => scalar.id === name)
184
+ ? typeof value === 'number'
185
+ ? value
186
+ : (await ensureCPU(name)).pack()[0]
187
+ : await ensureGPU(name);
188
+ }
189
+ results = await stage.graph.run({ inputs });
190
+ }
191
+ for (const [name, value] of Object.entries(results)) {
192
+ cpu.delete(name);
193
+ values[name] = value;
194
+ owned.add(value);
195
+ }
196
+ }
197
+ const outputs = Object.create(null);
198
+ for (const name of this.program.outputs) {
199
+ if (locations[name] === 'cpu') {
200
+ await ensureCPU(name);
201
+ outputs[name] = cpu.get(name);
202
+ }
203
+ else
204
+ outputs[name] = await ensureGPU(name);
205
+ }
206
+ for (const value of Object.values(outputs))
207
+ if (value instanceof GPUVector)
208
+ owned.delete(value);
209
+ return outputs;
210
+ }
211
+ finally {
212
+ for (const value of owned)
213
+ value.destroy();
214
+ }
215
+ }
216
+ destroy() {
217
+ for (const stage of this.stages)
218
+ if (!(stage instanceof GPUCPUOperation))
219
+ stage.graph.destroy();
220
+ }
221
+ }
222
+ async function readCPUVector(vector) {
223
+ assert(vector.format);
224
+ const info = getGPUVectorFormatInfo(vector.format);
225
+ const ValueType = info.signedDataType === 'float32'
226
+ ? Float32Array
227
+ : info.signedDataType === 'uint32'
228
+ ? Uint32Array
229
+ : Int32Array;
230
+ const chunks = [];
231
+ for (const chunk of vector.data) {
232
+ const values = new ValueType((chunk.length * info.byteLength) / 4);
233
+ if (chunk.length) {
234
+ const bytes = await chunk.buffer.readAsync(chunk.byteOffset, (chunk.length - 1) * chunk.byteStride + info.byteLength);
235
+ const packed = new Uint8Array(values.buffer);
236
+ for (let row = 0; row < chunk.length; row++)
237
+ packed.set(bytes.subarray(row * chunk.byteStride, row * chunk.byteStride + info.byteLength), row * info.byteLength);
238
+ }
239
+ chunks.push({ values, length: chunk.length });
240
+ }
241
+ return {
242
+ format: vector.format,
243
+ length: vector.length,
244
+ chunks,
245
+ pack() {
246
+ const packed = new ValueType(chunks.reduce((total, chunk) => total + chunk.values.length, 0));
247
+ let offset = 0;
248
+ for (const chunk of chunks) {
249
+ packed.set(chunk.values, offset);
250
+ offset += chunk.values.length;
251
+ }
252
+ return packed;
253
+ }
254
+ };
255
+ }
256
+ function makeCPUVector(format, arrays) {
257
+ const width = getGPUVectorFormatInfo(format).byteLength;
258
+ return new CPUVector({
259
+ format,
260
+ data: arrays.map(buffer => new CPUData({ buffer, format, length: buffer.byteLength / width }))
261
+ });
262
+ }
263
+ function getCPUView(vector) {
264
+ const format = vector.format;
265
+ assert(/^(float32|sint32|uint32)(x[234])?$/.test(format));
266
+ const info = getGPUVectorFormatInfo(format);
267
+ const ValueType = info.signedDataType === 'float32'
268
+ ? Float32Array
269
+ : info.signedDataType === 'uint32'
270
+ ? Uint32Array
271
+ : Int32Array;
272
+ const chunks = vector.data.map(chunk => {
273
+ const values = new ValueType(chunk.length * info.components);
274
+ const bytes = new Uint8Array(values.buffer);
275
+ for (let row = 0; row < chunk.length; row++)
276
+ bytes.set(new Uint8Array(chunk.buffer, chunk.byteOffset + row * chunk.byteStride, info.byteLength), row * info.byteLength);
277
+ return { values, length: chunk.length };
278
+ });
279
+ return {
280
+ format,
281
+ length: vector.length,
282
+ chunks,
283
+ pack() {
284
+ const values = new ValueType(vector.length * info.components);
285
+ let offset = 0;
286
+ for (const chunk of chunks) {
287
+ values.set(chunk.values, offset);
288
+ offset += chunk.values.length;
289
+ }
290
+ return values;
291
+ }
292
+ };
293
+ }
294
+ //# sourceMappingURL=gpu-cpu-execution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gpu-cpu-execution.js","sourceRoot":"","sources":["../../src/gpu-core/gpu-cpu-execution.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAE5D,OAAO,EAAC,MAAM,EAAc,MAAM,eAAe,CAAC;AAClD,OAAO,EAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,sBAAsB,EAAC,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EAAC,QAAQ,EAAC,uBAAoB;AACrC,OAAO,EAAC,QAAQ,EAAC,6BAA0B;AAC3C,OAAO,EAAC,eAAe,EAAsC,+BAA4B;AACzF,OAAO,EAAC,oBAAoB,EAA2B,iCAA8B;AACrF,OAAO,EAAC,kBAAkB,EAAC,oCAAiC;AAU5D,oGAAoG;AACpG,MAAM,OAAO,eAAe;IAUf;IACA;IACQ;IAXF,MAAM,GAMjB,EAAE,CAAC;IAET,YACW,MA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