@luma.gl/graph 10.0.0-alpha.9 → 10.0.0-beta.2
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.
- package/LICENSE +4 -4
- package/THIRD-PARTY-NOTICES.md +19 -0
- package/dist/arrow/arrow-colors.cjs +99 -18
- package/dist/arrow/arrow-colors.d.ts +27 -10
- package/dist/arrow/arrow-colors.d.ts.map +1 -1
- package/dist/arrow/arrow-colors.js +107 -24
- package/dist/arrow/arrow-colors.js.map +1 -1
- package/dist/arrow/arrow-utils/arrow-paths.cjs +4 -3
- package/dist/arrow/arrow-utils/arrow-paths.d.ts.map +1 -1
- package/dist/arrow/arrow-utils/arrow-paths.js +5 -4
- package/dist/arrow/arrow-utils/arrow-paths.js.map +1 -1
- package/dist/arrow/cpu/arrow-coordinate-projection.cjs +30 -0
- package/dist/arrow/cpu/arrow-coordinate-projection.d.ts +5 -0
- package/dist/arrow/cpu/arrow-coordinate-projection.d.ts.map +1 -0
- package/dist/arrow/cpu/arrow-coordinate-projection.js +9 -0
- package/dist/arrow/cpu/arrow-coordinate-projection.js.map +1 -0
- package/dist/arrow/cpu/arrow-cpu-pipelines.cjs +31 -0
- package/dist/arrow/cpu/arrow-cpu-pipelines.d.ts +2 -0
- package/dist/arrow/cpu/arrow-cpu-pipelines.d.ts.map +1 -0
- package/dist/arrow/cpu/arrow-cpu-pipelines.js +5 -0
- package/dist/arrow/cpu/arrow-cpu-pipelines.js.map +1 -0
- package/dist/arrow/cpu/arrow-cpu-vector-adapters.cjs +99 -0
- package/dist/arrow/cpu/arrow-cpu-vector-adapters.d.ts +9 -0
- package/dist/arrow/cpu/arrow-cpu-vector-adapters.d.ts.map +1 -0
- package/dist/arrow/cpu/arrow-cpu-vector-adapters.js +100 -0
- package/dist/arrow/cpu/arrow-cpu-vector-adapters.js.map +1 -0
- package/dist/arrow/geoarrow/arrow-geoarrow-adapter.cjs +9 -371
- package/dist/arrow/geoarrow/arrow-geoarrow-adapter.d.ts +8 -28
- package/dist/arrow/geoarrow/arrow-geoarrow-adapter.d.ts.map +1 -1
- package/dist/arrow/geoarrow/arrow-geoarrow-adapter.js +4 -381
- package/dist/arrow/geoarrow/arrow-geoarrow-adapter.js.map +1 -1
- package/dist/arrow/geoarrow/arrow-geoarrow-conversion.cjs +11 -11
- package/dist/arrow/geoarrow/arrow-geoarrow-conversion.d.ts +2 -0
- package/dist/arrow/geoarrow/arrow-geoarrow-conversion.d.ts.map +1 -1
- package/dist/arrow/geoarrow/arrow-geoarrow-conversion.js +4 -4
- package/dist/arrow/geoarrow/arrow-geoarrow-conversion.js.map +1 -1
- package/dist/arrow/geoarrow/arrow-polygon-tessellation.cjs +2 -2
- package/dist/arrow/geoarrow/arrow-polygon-tessellation.js +1 -1
- package/dist/arrow/geoarrow/arrow-polygon-tessellation.js.map +1 -1
- package/dist/arrow/gpu/arrow-column-gpu-vector.cjs +27 -8
- package/dist/arrow/gpu/arrow-column-gpu-vector.d.ts +11 -1
- package/dist/arrow/gpu/arrow-column-gpu-vector.d.ts.map +1 -1
- package/dist/arrow/gpu/arrow-column-gpu-vector.js +33 -8
- package/dist/arrow/gpu/arrow-column-gpu-vector.js.map +1 -1
- package/dist/arrow/gpu/arrow-gpu-table-conversion.cjs +68 -3
- package/dist/arrow/gpu/arrow-gpu-table-conversion.d.ts +9 -2
- package/dist/arrow/gpu/arrow-gpu-table-conversion.d.ts.map +1 -1
- package/dist/arrow/gpu/arrow-gpu-table-conversion.js +76 -3
- package/dist/arrow/gpu/arrow-gpu-table-conversion.js.map +1 -1
- package/dist/arrow/gpu/arrow-gpu-vector-adapters.cjs +8 -6
- package/dist/arrow/gpu/arrow-gpu-vector-adapters.d.ts +1 -0
- package/dist/arrow/gpu/arrow-gpu-vector-adapters.d.ts.map +1 -1
- package/dist/arrow/gpu/arrow-gpu-vector-adapters.js +17 -7
- package/dist/arrow/gpu/arrow-gpu-vector-adapters.js.map +1 -1
- package/dist/arrow/gpu/arrow-gpu-vector-conversion.cjs +35 -5
- package/dist/arrow/gpu/arrow-gpu-vector-conversion.d.ts +6 -1
- package/dist/arrow/gpu/arrow-gpu-vector-conversion.d.ts.map +1 -1
- package/dist/arrow/gpu/arrow-gpu-vector-conversion.js +40 -5
- package/dist/arrow/gpu/arrow-gpu-vector-conversion.js.map +1 -1
- package/dist/arrow/index.cjs +19 -2
- package/dist/arrow/index.cjs.map +3 -3
- package/dist/arrow/index.d.ts +5 -2
- package/dist/arrow/index.d.ts.map +1 -1
- package/dist/arrow/index.js +4 -1
- package/dist/arrow/index.js.map +1 -1
- package/dist/arrow/internal.cjs.map +2 -2
- package/dist/dist.dev.js +3820 -1646
- package/dist/dist.min.js +450 -136
- package/dist/experimental/index.cjs.map +1 -1
- package/dist/experimental/simulation/index.cjs.map +1 -1
- package/dist/experimental-models.cjs +21 -0
- package/dist/experimental-models.d.ts +2 -0
- package/dist/experimental-models.d.ts.map +1 -0
- package/dist/experimental-models.js +5 -0
- package/dist/experimental-models.js.map +1 -0
- package/dist/experimental-simulation.cjs +21 -0
- package/dist/experimental-simulation.d.ts +2 -0
- package/dist/experimental-simulation.d.ts.map +1 -0
- package/dist/experimental-simulation.js +5 -0
- package/dist/experimental-simulation.js.map +1 -0
- package/dist/geospatial/gpu-point-spatial-query.cjs +2 -15
- package/dist/geospatial/gpu-point-spatial-query.d.ts.map +1 -1
- package/dist/geospatial/gpu-point-spatial-query.js +2 -15
- package/dist/geospatial/gpu-point-spatial-query.js.map +1 -1
- package/dist/geospatial/index.cjs.map +2 -2
- package/dist/gpu-a5/index.cjs.map +1 -1
- package/dist/gpu-core/compiled-gpu-graph.cjs +47 -0
- package/dist/gpu-core/compiled-gpu-graph.d.ts +5 -0
- package/dist/gpu-core/compiled-gpu-graph.d.ts.map +1 -1
- package/dist/gpu-core/compiled-gpu-graph.js +54 -1
- package/dist/gpu-core/compiled-gpu-graph.js.map +1 -1
- package/dist/gpu-core/gpu-command-graph-compiler.cjs +11 -2
- package/dist/gpu-core/gpu-command-graph-compiler.d.ts +2 -1
- package/dist/gpu-core/gpu-command-graph-compiler.d.ts.map +1 -1
- package/dist/gpu-core/gpu-command-graph-compiler.js +13 -2
- package/dist/gpu-core/gpu-command-graph-compiler.js.map +1 -1
- package/dist/gpu-core/gpu-command-graph-types.d.ts +16 -1
- package/dist/gpu-core/gpu-command-graph-types.d.ts.map +1 -1
- package/dist/gpu-core/gpu-command-graph-types.js.map +1 -1
- package/dist/gpu-core/gpu-command-graph.cjs +34 -11
- package/dist/gpu-core/gpu-command-graph.d.ts +17 -8
- package/dist/gpu-core/gpu-command-graph.d.ts.map +1 -1
- package/dist/gpu-core/gpu-command-graph.js +39 -11
- package/dist/gpu-core/gpu-command-graph.js.map +1 -1
- package/dist/gpu-core/gpu-cpu-execution.cjs +279 -0
- package/dist/gpu-core/gpu-cpu-execution.d.ts +22 -0
- package/dist/gpu-core/gpu-cpu-execution.d.ts.map +1 -0
- package/dist/gpu-core/gpu-cpu-execution.js +294 -0
- package/dist/gpu-core/gpu-cpu-execution.js.map +1 -0
- package/dist/gpu-core/gpu-cpu-operation.cjs +54 -0
- package/dist/gpu-core/gpu-cpu-operation.d.ts +40 -0
- package/dist/gpu-core/gpu-cpu-operation.d.ts.map +1 -0
- package/dist/gpu-core/gpu-cpu-operation.js +35 -0
- package/dist/gpu-core/gpu-cpu-operation.js.map +1 -0
- package/dist/gpu-core/gpu-dispatch-utils.cjs +7 -3
- package/dist/gpu-core/gpu-dispatch-utils.d.ts +2 -0
- package/dist/gpu-core/gpu-dispatch-utils.d.ts.map +1 -1
- package/dist/gpu-core/gpu-dispatch-utils.js +4 -1
- package/dist/gpu-core/gpu-dispatch-utils.js.map +1 -1
- package/dist/gpu-core/gpu-expression-operation.cjs +2 -2
- package/dist/gpu-core/gpu-expression-operation.d.ts +1 -1
- package/dist/gpu-core/gpu-expression-operation.d.ts.map +1 -1
- package/dist/gpu-core/gpu-expression-operation.js +1 -1
- package/dist/gpu-core/gpu-expression-operation.js.map +1 -1
- package/dist/gpu-core/gpu-expression-plan.cjs +5 -1
- package/dist/gpu-core/gpu-expression-plan.d.ts +3 -2
- package/dist/gpu-core/gpu-expression-plan.d.ts.map +1 -1
- package/dist/gpu-core/gpu-expression-plan.js +7 -1
- package/dist/gpu-core/gpu-expression-plan.js.map +1 -1
- package/dist/gpu-core/gpu-graph-compiler.cjs +48 -0
- package/dist/gpu-core/gpu-graph-compiler.d.ts +1 -0
- package/dist/gpu-core/gpu-graph-compiler.d.ts.map +1 -1
- package/dist/gpu-core/gpu-graph-compiler.js +50 -0
- package/dist/gpu-core/gpu-graph-compiler.js.map +1 -1
- package/dist/gpu-core/gpu-graph.d.ts +2 -2
- package/dist/gpu-core/gpu-graph.d.ts.map +1 -1
- package/dist/gpu-core/gpu-graph.js.map +1 -1
- package/dist/gpu-core/gpu-grid-aggregation.cjs +2 -5
- package/dist/gpu-core/gpu-grid-aggregation.d.ts.map +1 -1
- package/dist/gpu-core/gpu-grid-aggregation.js +2 -5
- package/dist/gpu-core/gpu-grid-aggregation.js.map +1 -1
- package/dist/gpu-core/gpu-grid-binning.cjs +2 -5
- package/dist/gpu-core/gpu-grid-binning.d.ts.map +1 -1
- package/dist/gpu-core/gpu-grid-binning.js +2 -5
- package/dist/gpu-core/gpu-grid-binning.js.map +1 -1
- package/dist/gpu-core/gpu-grid-coordinate.cjs +41 -0
- package/dist/gpu-core/gpu-grid-coordinate.d.ts +7 -0
- package/dist/gpu-core/gpu-grid-coordinate.d.ts.map +1 -0
- package/dist/gpu-core/gpu-grid-coordinate.js +24 -0
- package/dist/gpu-core/gpu-grid-coordinate.js.map +1 -0
- package/dist/gpu-core/gpu-grid-index-internals.cjs +2 -15
- package/dist/gpu-core/gpu-grid-index-internals.d.ts.map +1 -1
- package/dist/gpu-core/gpu-grid-index-internals.js +2 -15
- package/dist/gpu-core/gpu-grid-index-internals.js.map +1 -1
- package/dist/gpu-core/gpu-grid-index-query.cjs +2 -16
- package/dist/gpu-core/gpu-grid-index-query.d.ts.map +1 -1
- package/dist/gpu-core/gpu-grid-index-query.js +2 -16
- package/dist/gpu-core/gpu-grid-index-query.js.map +1 -1
- package/dist/gpu-core/gpu-group-aggregation.cjs +7 -15
- package/dist/gpu-core/gpu-group-aggregation.d.ts.map +1 -1
- package/dist/gpu-core/gpu-group-aggregation.js +7 -18
- package/dist/gpu-core/gpu-group-aggregation.js.map +1 -1
- package/dist/gpu-core/gpu-operation.d.ts +4 -4
- package/dist/gpu-core/gpu-operation.d.ts.map +1 -1
- package/dist/gpu-core/gpu-operation.js.map +1 -1
- package/dist/gpu-core/gpu-reduction.cjs +6 -14
- package/dist/gpu-core/gpu-reduction.d.ts.map +1 -1
- package/dist/gpu-core/gpu-reduction.js +6 -15
- package/dist/gpu-core/gpu-reduction.js.map +1 -1
- package/dist/gpu-core/gpu-render-operation.cjs +39 -0
- package/dist/gpu-core/gpu-render-operation.d.ts +21 -0
- package/dist/gpu-core/gpu-render-operation.d.ts.map +1 -0
- package/dist/gpu-core/gpu-render-operation.js +22 -0
- package/dist/gpu-core/gpu-render-operation.js.map +1 -0
- package/dist/gpu-core/gpu-scan.cjs +46 -32
- package/dist/gpu-core/gpu-scan.d.ts.map +1 -1
- package/dist/gpu-core/gpu-scan.js +56 -44
- package/dist/gpu-core/gpu-scan.js.map +1 -1
- package/dist/gpu-core/gpu-segmented-reduction.cjs +12 -9
- package/dist/gpu-core/gpu-segmented-reduction.d.ts +1 -1
- package/dist/gpu-core/gpu-segmented-reduction.d.ts.map +1 -1
- package/dist/gpu-core/gpu-segmented-reduction.js +12 -9
- package/dist/gpu-core/gpu-segmented-reduction.js.map +1 -1
- package/dist/gpu-core/gpu-segmented-scan.cjs +73 -16
- package/dist/gpu-core/gpu-segmented-scan.d.ts.map +1 -1
- package/dist/gpu-core/gpu-segmented-scan.js +73 -16
- package/dist/gpu-core/gpu-segmented-scan.js.map +1 -1
- package/dist/gpu-core/gpu-semantic-aggregation-operation.cjs +112 -0
- package/dist/gpu-core/gpu-semantic-aggregation-operation.d.ts +71 -0
- package/dist/gpu-core/gpu-semantic-aggregation-operation.d.ts.map +1 -0
- package/dist/gpu-core/gpu-semantic-aggregation-operation.js +92 -0
- package/dist/gpu-core/gpu-semantic-aggregation-operation.js.map +1 -0
- package/dist/gpu-core/gpu-shader-pass-kernel.cjs +267 -0
- package/dist/gpu-core/gpu-shader-pass-kernel.d.ts +29 -0
- package/dist/gpu-core/gpu-shader-pass-kernel.d.ts.map +1 -0
- package/dist/gpu-core/gpu-shader-pass-kernel.js +260 -0
- package/dist/gpu-core/gpu-shader-pass-kernel.js.map +1 -0
- package/dist/gpu-core/gpu-shader-pass-operation.cjs +85 -0
- package/dist/gpu-core/gpu-shader-pass-operation.d.ts +32 -0
- package/dist/gpu-core/gpu-shader-pass-operation.d.ts.map +1 -0
- package/dist/gpu-core/gpu-shader-pass-operation.js +74 -0
- package/dist/gpu-core/gpu-shader-pass-operation.js.map +1 -0
- package/dist/gpu-core/gpu-texture-plan.d.ts +3 -2
- package/dist/gpu-core/gpu-texture-plan.d.ts.map +1 -1
- package/dist/gpu-core/gpu-texture-plan.js.map +1 -1
- package/dist/gpu-core/index.cjs +32 -0
- package/dist/gpu-core/index.cjs.map +3 -3
- package/dist/gpu-core/index.d.ts +21 -1
- package/dist/gpu-core/index.d.ts.map +1 -1
- package/dist/gpu-core/index.js +10 -0
- package/dist/gpu-core/index.js.map +1 -1
- package/dist/gpu-data/color-conversion.cjs +105 -0
- package/dist/gpu-data/color-conversion.d.ts +30 -0
- package/dist/gpu-data/color-conversion.d.ts.map +1 -0
- package/dist/gpu-data/color-conversion.js +109 -0
- package/dist/gpu-data/color-conversion.js.map +1 -0
- package/dist/gpu-data/cpu-data.cjs +60 -0
- package/dist/gpu-data/cpu-data.d.ts +28 -0
- package/dist/gpu-data/cpu-data.d.ts.map +1 -0
- package/dist/gpu-data/cpu-data.js +41 -0
- package/dist/gpu-data/cpu-data.js.map +1 -0
- package/dist/gpu-data/cpu-gpu-vector-transfer.cjs +98 -0
- package/dist/gpu-data/cpu-gpu-vector-transfer.d.ts +9 -0
- package/dist/gpu-data/cpu-gpu-vector-transfer.d.ts.map +1 -0
- package/dist/gpu-data/cpu-gpu-vector-transfer.js +85 -0
- package/dist/gpu-data/cpu-gpu-vector-transfer.js.map +1 -0
- package/dist/gpu-data/cpu-vector.cjs +42 -0
- package/dist/gpu-data/cpu-vector.d.ts +17 -0
- package/dist/gpu-data/cpu-vector.d.ts.map +1 -0
- package/dist/gpu-data/cpu-vector.js +21 -0
- package/dist/gpu-data/cpu-vector.js.map +1 -0
- package/dist/gpu-data/gpu-data-buffer-props.cjs +41 -0
- package/dist/gpu-data/gpu-data-buffer-props.d.ts +5 -0
- package/dist/gpu-data/gpu-data-buffer-props.d.ts.map +1 -0
- package/dist/gpu-data/gpu-data-buffer-props.js +19 -0
- package/dist/gpu-data/gpu-data-buffer-props.js.map +1 -0
- package/dist/gpu-data/gpu-vector-wgsl-layout.cjs +50 -0
- package/dist/gpu-data/gpu-vector-wgsl-layout.d.ts +41 -0
- package/dist/gpu-data/gpu-vector-wgsl-layout.d.ts.map +1 -0
- package/dist/gpu-data/gpu-vector-wgsl-layout.js +45 -0
- package/dist/gpu-data/gpu-vector-wgsl-layout.js.map +1 -0
- package/dist/gpu-data/index.cjs +21 -2
- package/dist/gpu-data/index.cjs.map +3 -3
- package/dist/gpu-data/index.d.ts +6 -0
- package/dist/gpu-data/index.d.ts.map +1 -1
- package/dist/gpu-data/index.js +5 -0
- package/dist/gpu-data/index.js.map +1 -1
- package/dist/gpu-dataframe/gpu-data-frame-query.cjs +8 -19
- package/dist/gpu-dataframe/gpu-data-frame-query.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-data-frame-query.js +14 -26
- package/dist/gpu-dataframe/gpu-data-frame-query.js.map +1 -1
- package/dist/gpu-dataframe/gpu-expression-shader.cjs +87 -5
- package/dist/gpu-dataframe/gpu-expression-shader.d.ts +2 -1
- package/dist/gpu-dataframe/gpu-expression-shader.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-expression-shader.js +101 -5
- package/dist/gpu-dataframe/gpu-expression-shader.js.map +1 -1
- package/dist/gpu-dataframe/gpu-expression.cjs +177 -2
- package/dist/gpu-dataframe/gpu-expression.d.ts +60 -2
- package/dist/gpu-dataframe/gpu-expression.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-expression.js +187 -0
- package/dist/gpu-dataframe/gpu-expression.js.map +1 -1
- package/dist/gpu-dataframe/gpu-global-aggregation-compiler.cjs +0 -1
- package/dist/gpu-dataframe/gpu-global-aggregation-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-global-aggregation-compiler.js +0 -1
- package/dist/gpu-dataframe/gpu-global-aggregation-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-global-aggregation-query.cjs +2 -2
- package/dist/gpu-dataframe/gpu-global-aggregation-query.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-global-aggregation-query.js +5 -3
- package/dist/gpu-dataframe/gpu-global-aggregation-query.js.map +1 -1
- package/dist/gpu-dataframe/gpu-global-sort-compiler.cjs +23 -11
- package/dist/gpu-dataframe/gpu-global-sort-compiler.d.ts +1 -1
- package/dist/gpu-dataframe/gpu-global-sort-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-global-sort-compiler.js +24 -12
- package/dist/gpu-dataframe/gpu-global-sort-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-group-aggregation-compiler.cjs +0 -1
- package/dist/gpu-dataframe/gpu-group-aggregation-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-group-aggregation-compiler.js +0 -1
- package/dist/gpu-dataframe/gpu-group-aggregation-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-group-by-query.cjs +2 -2
- package/dist/gpu-dataframe/gpu-group-by-query.js +5 -3
- package/dist/gpu-dataframe/gpu-group-by-query.js.map +1 -1
- package/dist/gpu-dataframe/gpu-histogram-compiler.cjs +0 -1
- package/dist/gpu-dataframe/gpu-histogram-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-histogram-compiler.js +0 -1
- package/dist/gpu-dataframe/gpu-histogram-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-join-compiler.cjs +0 -2
- package/dist/gpu-dataframe/gpu-join-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-join-compiler.js +0 -2
- package/dist/gpu-dataframe/gpu-join-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-query-compiler.cjs +3 -1
- package/dist/gpu-dataframe/gpu-query-compiler.d.ts +0 -1
- package/dist/gpu-dataframe/gpu-query-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-query-compiler.js +3 -1
- package/dist/gpu-dataframe/gpu-query-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-sort-compiler.cjs +0 -1
- package/dist/gpu-dataframe/gpu-sort-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-sort-compiler.js +0 -1
- package/dist/gpu-dataframe/gpu-sort-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-sort-query.cjs +13 -5
- package/dist/gpu-dataframe/gpu-sort-query.d.ts +4 -1
- package/dist/gpu-dataframe/gpu-sort-query.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-sort-query.js +14 -5
- package/dist/gpu-dataframe/gpu-sort-query.js.map +1 -1
- package/dist/gpu-dataframe/index.cjs +20 -2
- package/dist/gpu-dataframe/index.cjs.map +3 -3
- package/dist/gpu-dataframe/index.d.ts +6 -2
- package/dist/gpu-dataframe/index.d.ts.map +1 -1
- package/dist/gpu-dataframe/index.js +3 -1
- package/dist/gpu-dataframe/index.js.map +1 -1
- package/dist/gpu-dataframe/portable-expression.cjs +167 -0
- package/dist/gpu-dataframe/portable-expression.d.ts +21 -0
- package/dist/gpu-dataframe/portable-expression.d.ts.map +1 -0
- package/dist/gpu-dataframe/portable-expression.js +162 -0
- package/dist/gpu-dataframe/portable-expression.js.map +1 -0
- package/dist/gpu-dggs/benchmarks.cjs.map +1 -1
- package/dist/gpu-dggs/index.cjs.map +1 -1
- package/dist/gpu-dggs-benchmarks.cjs +21 -0
- package/dist/gpu-dggs-benchmarks.d.ts +2 -0
- package/dist/gpu-dggs-benchmarks.d.ts.map +1 -0
- package/dist/gpu-dggs-benchmarks.js +5 -0
- package/dist/gpu-dggs-benchmarks.js.map +1 -0
- package/dist/gpu-geometry/index.cjs.map +1 -1
- package/dist/gpu-graph/index.cjs +8 -0
- package/dist/gpu-graph/index.cjs.map +3 -3
- package/dist/gpu-graph/index.d.ts +4 -0
- package/dist/gpu-graph/index.d.ts.map +1 -1
- package/dist/gpu-graph/index.js +2 -0
- package/dist/gpu-graph/index.js.map +1 -1
- package/dist/gpu-graph-algorithms/benchmarks.cjs.map +2 -2
- package/dist/gpu-graph-algorithms/gpu-graph-spatial-force-layout-internals.cjs +2 -15
- package/dist/gpu-graph-algorithms/gpu-graph-spatial-force-layout-internals.d.ts.map +1 -1
- package/dist/gpu-graph-algorithms/gpu-graph-spatial-force-layout-internals.js +2 -15
- package/dist/gpu-graph-algorithms/gpu-graph-spatial-force-layout-internals.js.map +1 -1
- package/dist/gpu-graph-algorithms/index.cjs.map +2 -2
- package/dist/gpu-graph-algorithms-benchmarks.cjs +21 -0
- package/dist/gpu-graph-algorithms-benchmarks.d.ts +2 -0
- package/dist/gpu-graph-algorithms-benchmarks.d.ts.map +1 -0
- package/dist/gpu-graph-algorithms-benchmarks.js +5 -0
- package/dist/gpu-graph-algorithms-benchmarks.js.map +1 -0
- package/dist/gpu-h3/index.cjs.map +1 -1
- package/dist/gpu-physics/gpu-physics-ensemble-terrain.cjs +116 -0
- package/dist/gpu-physics/gpu-physics-ensemble-terrain.d.ts +42 -0
- package/dist/gpu-physics/gpu-physics-ensemble-terrain.d.ts.map +1 -0
- package/dist/gpu-physics/gpu-physics-ensemble-terrain.js +90 -0
- package/dist/gpu-physics/gpu-physics-ensemble-terrain.js.map +1 -0
- package/dist/gpu-physics/gpu-physics-ensemble.cjs +97 -5
- package/dist/gpu-physics/gpu-physics-ensemble.d.ts +31 -2
- package/dist/gpu-physics/gpu-physics-ensemble.d.ts.map +1 -1
- package/dist/gpu-physics/gpu-physics-ensemble.js +99 -3
- package/dist/gpu-physics/gpu-physics-ensemble.js.map +1 -1
- package/dist/gpu-physics/gpu-rigid-body-world.cjs +568 -77
- package/dist/gpu-physics/gpu-rigid-body-world.d.ts +86 -0
- package/dist/gpu-physics/gpu-rigid-body-world.d.ts.map +1 -1
- package/dist/gpu-physics/gpu-rigid-body-world.js +617 -76
- package/dist/gpu-physics/gpu-rigid-body-world.js.map +1 -1
- package/dist/gpu-physics/index.cjs +23 -2
- package/dist/gpu-physics/index.cjs.map +3 -3
- package/dist/gpu-physics/index.d.ts +9 -2
- package/dist/gpu-physics/index.d.ts.map +1 -1
- package/dist/gpu-physics/index.js +6 -1
- package/dist/gpu-physics/index.js.map +1 -1
- package/dist/gpu-physics/rigid-body-bounds-shaders.cjs +21 -8
- package/dist/gpu-physics/rigid-body-bounds-shaders.d.ts +2 -1
- package/dist/gpu-physics/rigid-body-bounds-shaders.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-bounds-shaders.js +15 -1
- package/dist/gpu-physics/rigid-body-bounds-shaders.js.map +1 -1
- package/dist/gpu-physics/rigid-body-convex-shaders.cjs +3 -2
- package/dist/gpu-physics/rigid-body-convex-shaders.d.ts +1 -1
- package/dist/gpu-physics/rigid-body-convex-shaders.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-convex-shaders.js +3 -2
- package/dist/gpu-physics/rigid-body-convex-shaders.js.map +1 -1
- package/dist/gpu-physics/rigid-body-ensemble-reset.cjs +36 -7
- package/dist/gpu-physics/rigid-body-ensemble-reset.d.ts +1 -1
- package/dist/gpu-physics/rigid-body-ensemble-reset.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-ensemble-reset.js +42 -7
- package/dist/gpu-physics/rigid-body-ensemble-reset.js.map +1 -1
- package/dist/gpu-physics/rigid-body-ensemble-transaction.cjs +23 -1
- package/dist/gpu-physics/rigid-body-ensemble-transaction.d.ts +4 -1
- package/dist/gpu-physics/rigid-body-ensemble-transaction.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-ensemble-transaction.js +25 -1
- package/dist/gpu-physics/rigid-body-ensemble-transaction.js.map +1 -1
- package/dist/gpu-physics/rigid-body-geometry.cjs +41 -4
- package/dist/gpu-physics/rigid-body-geometry.d.ts +10 -1
- package/dist/gpu-physics/rigid-body-geometry.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-geometry.js +44 -3
- package/dist/gpu-physics/rigid-body-geometry.js.map +1 -1
- package/dist/gpu-physics/rigid-body-height-field-shader.cjs +80 -0
- package/dist/gpu-physics/rigid-body-height-field-shader.d.ts +3 -0
- package/dist/gpu-physics/rigid-body-height-field-shader.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-height-field-shader.js +56 -0
- package/dist/gpu-physics/rigid-body-height-field-shader.js.map +1 -0
- package/dist/gpu-physics/rigid-body-height-field.cjs +166 -0
- package/dist/gpu-physics/rigid-body-height-field.d.ts +55 -0
- package/dist/gpu-physics/rigid-body-height-field.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-height-field.js +184 -0
- package/dist/gpu-physics/rigid-body-height-field.js.map +1 -0
- package/dist/gpu-physics/rigid-body-mesh-query-shaders.cjs +4 -2
- package/dist/gpu-physics/rigid-body-mesh-query-shaders.d.ts +1 -1
- package/dist/gpu-physics/rigid-body-mesh-query-shaders.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-mesh-query-shaders.js +4 -2
- package/dist/gpu-physics/rigid-body-mesh-query-shaders.js.map +1 -1
- package/dist/gpu-physics/rigid-body-mesh.cjs +72 -17
- package/dist/gpu-physics/rigid-body-mesh.d.ts +3 -0
- package/dist/gpu-physics/rigid-body-mesh.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-mesh.js +76 -20
- package/dist/gpu-physics/rigid-body-mesh.js.map +1 -1
- package/dist/gpu-physics/rigid-body-parallel-shaders.cjs +24 -9
- package/dist/gpu-physics/rigid-body-parallel-shaders.d.ts +1 -1
- package/dist/gpu-physics/rigid-body-parallel-shaders.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-parallel-shaders.js +28 -9
- package/dist/gpu-physics/rigid-body-parallel-shaders.js.map +1 -1
- package/dist/gpu-physics/rigid-body-properties.cjs +4 -4
- package/dist/gpu-physics/rigid-body-properties.d.ts +6 -0
- package/dist/gpu-physics/rigid-body-properties.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-properties.js +1 -1
- package/dist/gpu-physics/rigid-body-properties.js.map +1 -1
- package/dist/gpu-physics/rigid-body-publication.cjs +2 -2
- package/dist/gpu-physics/rigid-body-publication.js +1 -1
- package/dist/gpu-physics/rigid-body-publication.js.map +1 -1
- package/dist/gpu-physics/rigid-body-query-geometry.cjs +22 -4
- package/dist/gpu-physics/rigid-body-query-geometry.d.ts +1 -1
- package/dist/gpu-physics/rigid-body-query-geometry.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-query-geometry.js +22 -4
- package/dist/gpu-physics/rigid-body-query-geometry.js.map +1 -1
- package/dist/gpu-physics/rigid-body-shaders.cjs +12 -6
- package/dist/gpu-physics/rigid-body-shaders.d.ts +1 -1
- package/dist/gpu-physics/rigid-body-shaders.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-shaders.js +15 -7
- package/dist/gpu-physics/rigid-body-shaders.js.map +1 -1
- package/dist/gpu-physics/rigid-body-shape-properties.cjs +2 -0
- package/dist/gpu-physics/rigid-body-shape-properties.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-shape-properties.js +2 -0
- package/dist/gpu-physics/rigid-body-shape-properties.js.map +1 -1
- package/dist/gpu-physics/rigid-body-terrain-atlas.cjs +287 -0
- package/dist/gpu-physics/rigid-body-terrain-atlas.d.ts +87 -0
- package/dist/gpu-physics/rigid-body-terrain-atlas.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-atlas.js +275 -0
- package/dist/gpu-physics/rigid-body-terrain-atlas.js.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-lod.cjs +240 -0
- package/dist/gpu-physics/rigid-body-terrain-lod.d.ts +76 -0
- package/dist/gpu-physics/rigid-body-terrain-lod.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-lod.js +247 -0
- package/dist/gpu-physics/rigid-body-terrain-lod.js.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-stitch.cjs +215 -0
- package/dist/gpu-physics/rigid-body-terrain-stitch.d.ts +25 -0
- package/dist/gpu-physics/rigid-body-terrain-stitch.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-stitch.js +218 -0
- package/dist/gpu-physics/rigid-body-terrain-stitch.js.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-stream.cjs +263 -0
- package/dist/gpu-physics/rigid-body-terrain-stream.d.ts +97 -0
- package/dist/gpu-physics/rigid-body-terrain-stream.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-stream.js +250 -0
- package/dist/gpu-physics/rigid-body-terrain-stream.js.map +1 -0
- package/dist/gpu-physics/rigid-body-triggers.cjs +1 -0
- package/dist/gpu-physics/rigid-body-triggers.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-triggers.js +1 -0
- package/dist/gpu-physics/rigid-body-triggers.js.map +1 -1
- package/dist/gpu-physics/rigid-body-vehicle.cjs +145 -0
- package/dist/gpu-physics/rigid-body-vehicle.d.ts +47 -0
- package/dist/gpu-physics/rigid-body-vehicle.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-vehicle.js +119 -0
- package/dist/gpu-physics/rigid-body-vehicle.js.map +1 -0
- package/dist/gpu-pointcloud/index.cjs.map +1 -1
- package/dist/gpu-project/benchmarks.cjs.map +2 -2
- package/dist/gpu-project/coordinate-projection-graph.cjs +59 -0
- package/dist/gpu-project/coordinate-projection-graph.d.ts +23 -0
- package/dist/gpu-project/coordinate-projection-graph.d.ts.map +1 -0
- package/dist/gpu-project/coordinate-projection-graph.js +40 -0
- package/dist/gpu-project/coordinate-projection-graph.js.map +1 -0
- package/dist/gpu-project/cpu-geoarrow.cjs +112 -0
- package/dist/gpu-project/cpu-geoarrow.d.ts +10 -0
- package/dist/gpu-project/cpu-geoarrow.d.ts.map +1 -0
- package/dist/gpu-project/cpu-geoarrow.js +103 -0
- package/dist/gpu-project/cpu-geoarrow.js.map +1 -0
- package/dist/gpu-project/cpu-geometry-pipelines.cjs +134 -0
- package/dist/gpu-project/cpu-geometry-pipelines.d.ts +19 -0
- package/dist/gpu-project/cpu-geometry-pipelines.d.ts.map +1 -0
- package/dist/gpu-project/cpu-geometry-pipelines.js +114 -0
- package/dist/gpu-project/cpu-geometry-pipelines.js.map +1 -0
- package/dist/gpu-project/cpu-projection-operation.cjs +54 -0
- package/dist/gpu-project/cpu-projection-operation.d.ts +14 -0
- package/dist/gpu-project/cpu-projection-operation.d.ts.map +1 -0
- package/dist/gpu-project/cpu-projection-operation.js +37 -0
- package/dist/gpu-project/cpu-projection-operation.js.map +1 -0
- package/dist/gpu-project/crs.cjs.map +3 -3
- package/dist/gpu-project/crs.d.ts +1 -1
- package/dist/gpu-project/geoarrow.cjs +36 -0
- package/dist/gpu-project/geoarrow.cjs.map +6 -0
- package/dist/gpu-project/geoarrow.d.ts +3 -0
- package/dist/gpu-project/geoarrow.d.ts.map +1 -0
- package/dist/gpu-project/geoarrow.js +7 -0
- package/dist/gpu-project/geoarrow.js.map +1 -0
- package/dist/gpu-project/graph.cjs +27 -0
- package/dist/gpu-project/graph.cjs.map +6 -0
- package/dist/gpu-project/graph.d.ts +2 -0
- package/dist/gpu-project/graph.d.ts.map +1 -0
- package/dist/gpu-project/graph.js +6 -0
- package/dist/gpu-project/graph.js.map +1 -0
- package/dist/gpu-project/index.cjs +3 -0
- package/dist/gpu-project/index.cjs.map +3 -3
- package/dist/gpu-project/index.d.ts +1 -0
- package/dist/gpu-project/index.d.ts.map +1 -1
- package/dist/gpu-project/index.js +1 -0
- package/dist/gpu-project/index.js.map +1 -1
- package/dist/gpu-project/projection-crs-benchmark.cjs +2 -2
- package/dist/gpu-project/projection-crs-benchmark.d.ts +1 -1
- package/dist/gpu-project/projection-crs-benchmark.js +1 -1
- package/dist/gpu-project/projection-crs-input.cjs +7 -7
- package/dist/gpu-project/projection-crs-input.d.ts +1 -1
- package/dist/gpu-project/projection-crs-input.js +4 -4
- package/dist/gpu-project/projection-engine.d.ts +2 -2
- package/dist/gpu-project-benchmarks.cjs +21 -0
- package/dist/gpu-project-benchmarks.d.ts +2 -0
- package/dist/gpu-project-benchmarks.d.ts.map +1 -0
- package/dist/gpu-project-benchmarks.js +5 -0
- package/dist/gpu-project-benchmarks.js.map +1 -0
- package/dist/gpu-project-crs.cjs +21 -0
- package/dist/gpu-project-crs.d.ts +2 -0
- package/dist/gpu-project-crs.d.ts.map +1 -0
- package/dist/gpu-project-crs.js +5 -0
- package/dist/gpu-project-crs.js.map +1 -0
- package/dist/gpu-project-geoarrow.cjs +21 -0
- package/dist/gpu-project-geoarrow.d.ts +2 -0
- package/dist/gpu-project-geoarrow.d.ts.map +1 -0
- package/dist/gpu-project-geoarrow.js +5 -0
- package/dist/gpu-project-geoarrow.js.map +1 -0
- package/dist/gpu-project-graph.cjs +21 -0
- package/dist/gpu-project-graph.d.ts +2 -0
- package/dist/gpu-project-graph.d.ts.map +1 -0
- package/dist/gpu-project-graph.js +5 -0
- package/dist/gpu-project-graph.js.map +1 -0
- package/dist/gpu-simple-graph/compiled-gpu-expression-graph.cjs +75 -5
- package/dist/gpu-simple-graph/compiled-gpu-expression-graph.d.ts +5 -1
- package/dist/gpu-simple-graph/compiled-gpu-expression-graph.d.ts.map +1 -1
- package/dist/gpu-simple-graph/compiled-gpu-expression-graph.js +86 -6
- package/dist/gpu-simple-graph/compiled-gpu-expression-graph.js.map +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph-lowering.cjs +9 -0
- package/dist/gpu-simple-graph/gpu-simple-graph-lowering.d.ts +2 -0
- package/dist/gpu-simple-graph/gpu-simple-graph-lowering.d.ts.map +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph-lowering.js +10 -0
- package/dist/gpu-simple-graph/gpu-simple-graph-lowering.js.map +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph-transfer.d.ts +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph-transfer.d.ts.map +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph-value.d.ts +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph-value.d.ts.map +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph.cjs +126 -10
- package/dist/gpu-simple-graph/gpu-simple-graph.d.ts +36 -11
- package/dist/gpu-simple-graph/gpu-simple-graph.d.ts.map +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph.js +137 -12
- package/dist/gpu-simple-graph/gpu-simple-graph.js.map +1 -1
- package/dist/gpu-simple-graph/index.cjs.map +3 -3
- package/dist/gpu-simple-graph/index.d.ts +1 -1
- package/dist/gpu-simple-graph/index.d.ts.map +1 -1
- package/dist/gpu-simple-graph/index.js.map +1 -1
- package/dist/gpu-simple-graph/operation/gpu-data-evaluator.cjs +25 -0
- package/dist/gpu-simple-graph/operation/gpu-data-evaluator.d.ts +7 -1
- package/dist/gpu-simple-graph/operation/gpu-data-evaluator.d.ts.map +1 -1
- package/dist/gpu-simple-graph/operation/gpu-data-evaluator.js +28 -0
- package/dist/gpu-simple-graph/operation/gpu-data-evaluator.js.map +1 -1
- package/dist/gpu-simple-graph/operation/gpu-vector-evaluator.cjs +7 -0
- package/dist/gpu-simple-graph/operation/gpu-vector-evaluator.d.ts +2 -0
- package/dist/gpu-simple-graph/operation/gpu-vector-evaluator.d.ts.map +1 -1
- package/dist/gpu-simple-graph/operation/gpu-vector-evaluator.js +7 -0
- package/dist/gpu-simple-graph/operation/gpu-vector-evaluator.js.map +1 -1
- package/dist/gpu-simple-graph/operation/operation.d.ts +1 -1
- package/dist/gpu-simple-graph/operation/operation.d.ts.map +1 -1
- package/dist/gpu-simple-graph/operations/convert-colors.cjs +6 -6
- package/dist/gpu-simple-graph/operations/convert-colors.d.ts +5 -1
- package/dist/gpu-simple-graph/operations/convert-colors.d.ts.map +1 -1
- package/dist/gpu-simple-graph/operations/convert-colors.js +12 -7
- package/dist/gpu-simple-graph/operations/convert-colors.js.map +1 -1
- package/dist/gpu-simple-graph/operations/cpu/convert-colors.cjs +16 -33
- package/dist/gpu-simple-graph/operations/cpu/convert-colors.d.ts.map +1 -1
- package/dist/gpu-simple-graph/operations/cpu/convert-colors.js +22 -35
- package/dist/gpu-simple-graph/operations/cpu/convert-colors.js.map +1 -1
- package/dist/gpu-simple-graph/operations/cpu/index.cjs.map +3 -3
- package/dist/gpu-simple-graph/operations/webgl/index.cjs.map +3 -3
- package/dist/gpu-simple-graph/operations/webgpu/convert-colors.cjs +31 -13
- package/dist/gpu-simple-graph/operations/webgpu/convert-colors.d.ts.map +1 -1
- package/dist/gpu-simple-graph/operations/webgpu/convert-colors.js +42 -13
- package/dist/gpu-simple-graph/operations/webgpu/convert-colors.js.map +1 -1
- package/dist/gpu-simple-graph/operations/webgpu/index.cjs.map +1 -1
- package/dist/gpu-simple-graph-cpu.cjs +21 -0
- package/dist/gpu-simple-graph-cpu.d.ts +2 -0
- package/dist/gpu-simple-graph-cpu.d.ts.map +1 -0
- package/dist/gpu-simple-graph-cpu.js +5 -0
- package/dist/gpu-simple-graph-cpu.js.map +1 -0
- package/dist/gpu-simple-graph-webgl.cjs +21 -0
- package/dist/gpu-simple-graph-webgl.d.ts +2 -0
- package/dist/gpu-simple-graph-webgl.d.ts.map +1 -0
- package/dist/gpu-simple-graph-webgl.js +5 -0
- package/dist/gpu-simple-graph-webgl.js.map +1 -0
- package/dist/gpu-simple-graph-webgpu.cjs +21 -0
- package/dist/gpu-simple-graph-webgpu.d.ts +2 -0
- package/dist/gpu-simple-graph-webgpu.d.ts.map +1 -0
- package/dist/gpu-simple-graph-webgpu.js +5 -0
- package/dist/gpu-simple-graph-webgpu.js.map +1 -0
- package/dist/gpu-sql/gpu-sql.cjs +159 -328
- package/dist/gpu-sql/gpu-sql.d.ts +1 -1
- package/dist/gpu-sql/gpu-sql.d.ts.map +1 -1
- package/dist/gpu-sql/gpu-sql.js +186 -340
- package/dist/gpu-sql/gpu-sql.js.map +1 -1
- package/dist/gpu-sql/index.cjs.map +3 -3
- package/dist/gpu-tables/index.cjs.map +2 -2
- package/dist/gpu-tables/table/gpu-table.cjs +2 -2
- package/dist/gpu-tables/table/gpu-table.d.ts.map +1 -1
- package/dist/gpu-tables/table/gpu-table.js +2 -2
- package/dist/gpu-tables/table/gpu-table.js.map +1 -1
- package/dist/gpu-timeseries/index.cjs.map +1 -1
- package/dist/index.cjs +11 -0
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +30 -16
- package/src/arrow/arrow-colors.ts +194 -33
- package/src/arrow/arrow-utils/arrow-paths.ts +5 -3
- package/src/arrow/cpu/arrow-coordinate-projection.ts +18 -0
- package/src/arrow/cpu/arrow-cpu-pipelines.ts +9 -0
- package/src/arrow/cpu/arrow-cpu-vector-adapters.ts +153 -0
- package/src/arrow/geoarrow/arrow-geoarrow-adapter.ts +21 -493
- package/src/arrow/geoarrow/arrow-geoarrow-conversion.ts +7 -5
- package/src/arrow/geoarrow/arrow-polygon-tessellation.ts +1 -1
- package/src/arrow/gpu/arrow-column-gpu-vector.ts +67 -14
- package/src/arrow/gpu/arrow-gpu-table-conversion.ts +96 -4
- package/src/arrow/gpu/arrow-gpu-vector-adapters.ts +20 -7
- package/src/arrow/gpu/arrow-gpu-vector-conversion.ts +49 -6
- package/src/arrow/index.ts +14 -0
- package/src/experimental-models.ts +5 -0
- package/src/experimental-simulation.ts +5 -0
- package/src/geospatial/gpu-point-spatial-query.ts +2 -15
- package/src/gpu-core/compiled-gpu-graph.ts +73 -1
- package/src/gpu-core/gpu-command-graph-compiler.ts +25 -2
- package/src/gpu-core/gpu-command-graph-types.ts +20 -0
- package/src/gpu-core/gpu-command-graph.ts +48 -11
- package/src/gpu-core/gpu-cpu-execution.ts +345 -0
- package/src/gpu-core/gpu-cpu-operation.ts +65 -0
- package/src/gpu-core/gpu-dispatch-utils.ts +13 -1
- package/src/gpu-core/gpu-expression-operation.ts +1 -1
- package/src/gpu-core/gpu-expression-plan.ts +11 -3
- package/src/gpu-core/gpu-graph-compiler.ts +61 -0
- package/src/gpu-core/gpu-graph.ts +3 -3
- package/src/gpu-core/gpu-grid-aggregation.ts +2 -5
- package/src/gpu-core/gpu-grid-binning.ts +2 -5
- package/src/gpu-core/gpu-grid-coordinate.ts +24 -0
- package/src/gpu-core/gpu-grid-index-internals.ts +2 -15
- package/src/gpu-core/gpu-grid-index-query.ts +2 -16
- package/src/gpu-core/gpu-group-aggregation.ts +38 -50
- package/src/gpu-core/gpu-operation.ts +9 -7
- package/src/gpu-core/gpu-reduction.ts +32 -42
- package/src/gpu-core/gpu-render-operation.ts +42 -0
- package/src/gpu-core/gpu-scan.ts +59 -45
- package/src/gpu-core/gpu-segmented-reduction.ts +20 -10
- package/src/gpu-core/gpu-segmented-scan.ts +82 -17
- package/src/gpu-core/gpu-semantic-aggregation-operation.ts +150 -0
- package/src/gpu-core/gpu-shader-pass-kernel.ts +307 -0
- package/src/gpu-core/gpu-shader-pass-operation.ts +103 -0
- package/src/gpu-core/gpu-texture-plan.ts +3 -2
- package/src/gpu-core/index.ts +39 -0
- package/src/gpu-data/color-conversion.ts +158 -0
- package/src/gpu-data/cpu-data.ts +62 -0
- package/src/gpu-data/cpu-gpu-vector-transfer.ts +110 -0
- package/src/gpu-data/cpu-vector.ts +31 -0
- package/src/gpu-data/gpu-data-buffer-props.ts +25 -0
- package/src/gpu-data/gpu-vector-wgsl-layout.ts +79 -0
- package/src/gpu-data/index.ts +15 -0
- package/src/gpu-dataframe/gpu-data-frame-query.ts +24 -31
- package/src/gpu-dataframe/gpu-expression-shader.ts +128 -7
- package/src/gpu-dataframe/gpu-expression.ts +259 -1
- package/src/gpu-dataframe/gpu-global-aggregation-compiler.ts +0 -1
- package/src/gpu-dataframe/gpu-global-aggregation-query.ts +5 -3
- package/src/gpu-dataframe/gpu-global-sort-compiler.ts +26 -12
- package/src/gpu-dataframe/gpu-group-aggregation-compiler.ts +0 -1
- package/src/gpu-dataframe/gpu-group-by-query.ts +5 -3
- package/src/gpu-dataframe/gpu-histogram-compiler.ts +0 -1
- package/src/gpu-dataframe/gpu-join-compiler.ts +0 -2
- package/src/gpu-dataframe/gpu-query-compiler.ts +3 -3
- package/src/gpu-dataframe/gpu-sort-compiler.ts +0 -1
- package/src/gpu-dataframe/gpu-sort-query.ts +31 -5
- package/src/gpu-dataframe/index.ts +26 -2
- package/src/gpu-dataframe/portable-expression.ts +194 -0
- package/src/gpu-dggs-benchmarks.ts +5 -0
- package/src/gpu-graph/index.ts +17 -0
- package/src/gpu-graph-algorithms/gpu-graph-spatial-force-layout-internals.ts +2 -15
- package/src/gpu-graph-algorithms-benchmarks.ts +5 -0
- package/src/gpu-physics/gpu-physics-ensemble-terrain.ts +114 -0
- package/src/gpu-physics/gpu-physics-ensemble.ts +147 -4
- package/src/gpu-physics/gpu-rigid-body-world.ts +797 -102
- package/src/gpu-physics/index.ts +38 -0
- package/src/gpu-physics/rigid-body-bounds-shaders.ts +16 -1
- package/src/gpu-physics/rigid-body-convex-shaders.ts +3 -2
- package/src/gpu-physics/rigid-body-ensemble-reset.ts +48 -8
- package/src/gpu-physics/rigid-body-ensemble-transaction.ts +34 -1
- package/src/gpu-physics/rigid-body-geometry.ts +49 -4
- package/src/gpu-physics/rigid-body-height-field-shader.ts +56 -0
- package/src/gpu-physics/rigid-body-height-field.ts +257 -0
- package/src/gpu-physics/rigid-body-mesh-query-shaders.ts +4 -2
- package/src/gpu-physics/rigid-body-mesh.ts +97 -26
- package/src/gpu-physics/rigid-body-parallel-shaders.ts +32 -9
- package/src/gpu-physics/rigid-body-properties.ts +5 -2
- package/src/gpu-physics/rigid-body-publication.ts +1 -1
- package/src/gpu-physics/rigid-body-query-geometry.ts +22 -4
- package/src/gpu-physics/rigid-body-shaders.ts +19 -7
- package/src/gpu-physics/rigid-body-shape-properties.ts +2 -0
- package/src/gpu-physics/rigid-body-terrain-atlas.ts +378 -0
- package/src/gpu-physics/rigid-body-terrain-lod.ts +332 -0
- package/src/gpu-physics/rigid-body-terrain-stitch.ts +286 -0
- package/src/gpu-physics/rigid-body-terrain-stream.ts +323 -0
- package/src/gpu-physics/rigid-body-triggers.ts +1 -0
- package/src/gpu-physics/rigid-body-vehicle.ts +166 -0
- package/src/gpu-project/README.md +2 -2
- package/src/gpu-project/coordinate-projection-graph.ts +59 -0
- package/src/gpu-project/cpu-geoarrow.ts +135 -0
- package/src/gpu-project/cpu-geometry-pipelines.ts +159 -0
- package/src/gpu-project/cpu-projection-operation.ts +49 -0
- package/src/gpu-project/crs.ts +2 -2
- package/src/gpu-project/geoarrow.ts +11 -0
- package/src/gpu-project/graph.ts +10 -0
- package/src/gpu-project/index.ts +2 -0
- package/src/gpu-project/projection-crs-benchmark.ts +2 -2
- package/src/gpu-project/projection-crs-input.ts +4 -4
- package/src/gpu-project/projection-engine.ts +2 -2
- package/src/gpu-project-benchmarks.ts +5 -0
- package/src/gpu-project-crs.ts +5 -0
- package/src/gpu-project-geoarrow.ts +5 -0
- package/src/gpu-project-graph.ts +5 -0
- package/src/gpu-simple-graph/compiled-gpu-expression-graph.ts +97 -6
- package/src/gpu-simple-graph/gpu-simple-graph-lowering.ts +11 -0
- package/src/gpu-simple-graph/gpu-simple-graph-transfer.ts +1 -1
- package/src/gpu-simple-graph/gpu-simple-graph-value.ts +1 -1
- package/src/gpu-simple-graph/gpu-simple-graph.ts +163 -19
- package/src/gpu-simple-graph/index.ts +1 -0
- package/src/gpu-simple-graph/operation/gpu-data-evaluator.ts +25 -1
- package/src/gpu-simple-graph/operation/gpu-vector-evaluator.ts +7 -0
- package/src/gpu-simple-graph/operation/operation.ts +1 -1
- package/src/gpu-simple-graph/operations/convert-colors.ts +22 -7
- package/src/gpu-simple-graph/operations/cpu/convert-colors.ts +31 -48
- package/src/gpu-simple-graph/operations/swizzle.ts +1 -1
- package/src/gpu-simple-graph/operations/webgpu/convert-colors.ts +47 -13
- package/src/gpu-simple-graph-cpu.ts +5 -0
- package/src/gpu-simple-graph-webgl.ts +5 -0
- package/src/gpu-simple-graph-webgpu.ts +5 -0
- package/src/gpu-sql/gpu-sql.ts +238 -354
- package/src/gpu-tables/table/gpu-table.ts +2 -1
- package/src/index.ts +21 -0
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
import {assert, type Device} from '@luma.gl/core';
|
|
6
|
+
import {CPUData, CPUVector, GPUVector, getGPUVectorFormatInfo} from '@luma.gl/graph/gpu-data';
|
|
7
|
+
import {GPUGraph} from './gpu-graph';
|
|
8
|
+
import {gpuGraph} from './gpu-graph-value';
|
|
9
|
+
import {GPUCPUOperation, type GPUCPUVector, type GPUCPUArray} from './gpu-cpu-operation';
|
|
10
|
+
import {GPUExpressionProgram, type GPUGraphRunBindings} from './gpu-expression-plan';
|
|
11
|
+
import {GPUUploadOperation} from './gpu-transfer-operation';
|
|
12
|
+
import type {GPUGraphExecutionBindings} from './gpu-expression-plan';
|
|
13
|
+
|
|
14
|
+
/** Backend-specific GPU stage; CPU scheduling is shared by both graph executors. */
|
|
15
|
+
export type GPUCPUStage = {
|
|
16
|
+
run(bindings: GPUGraphExecutionBindings): Promise<Record<string, GPUVector>>;
|
|
17
|
+
destroy(): void;
|
|
18
|
+
};
|
|
19
|
+
export type GPUCPUStageCompiler = (source: GPUGraph, outputs?: readonly string[]) => GPUCPUStage;
|
|
20
|
+
|
|
21
|
+
/** Submission boundaries around CPU callbacks; each GPU stage resolves its shapes independently. */
|
|
22
|
+
export class GPUCPUExecution {
|
|
23
|
+
private readonly stages: (
|
|
24
|
+
| GPUCPUOperation
|
|
25
|
+
| {
|
|
26
|
+
graph: GPUCPUStage;
|
|
27
|
+
inputs: readonly string[];
|
|
28
|
+
}
|
|
29
|
+
)[] = [];
|
|
30
|
+
|
|
31
|
+
constructor(
|
|
32
|
+
readonly device: Device,
|
|
33
|
+
readonly program: GPUExpressionProgram,
|
|
34
|
+
private readonly compileStage: GPUCPUStageCompiler
|
|
35
|
+
) {
|
|
36
|
+
// Initial support is for pure numeric, operation-owned results.
|
|
37
|
+
assert(!program.textures.length && !program.vectors.some(value => value.role === 'state'));
|
|
38
|
+
const declarations = [...program.scalars, ...program.vectors];
|
|
39
|
+
const addInput = (graph: GPUGraph, name: string) => {
|
|
40
|
+
const declaration = declarations.find(value => value.id === name)!;
|
|
41
|
+
assert(declaration);
|
|
42
|
+
const vector = program.vectors.find(value => value.id === name);
|
|
43
|
+
if (vector)
|
|
44
|
+
graph.addInput(
|
|
45
|
+
name,
|
|
46
|
+
gpuGraph.vector(vector.format, {
|
|
47
|
+
length: vector.length,
|
|
48
|
+
chunkLengths: vector.chunkLengths
|
|
49
|
+
})
|
|
50
|
+
);
|
|
51
|
+
else
|
|
52
|
+
graph.addInput(
|
|
53
|
+
name,
|
|
54
|
+
gpuGraph.scalar(program.scalars.find(value => value.id === name)!.format)
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
try {
|
|
58
|
+
for (const operation of program.operations) {
|
|
59
|
+
if (operation instanceof GPUCPUOperation) {
|
|
60
|
+
this.stages.push(operation);
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
assert('contract' in operation && operation.contract);
|
|
64
|
+
const inputs = operation.contract.values
|
|
65
|
+
.filter(use => use.access !== 'write')
|
|
66
|
+
.map(use => (typeof use.value === 'string' ? use.value : use.value.id));
|
|
67
|
+
const outputs = operation.contract.values
|
|
68
|
+
.filter(use => use.access !== 'read')
|
|
69
|
+
.map(use => (typeof use.value === 'string' ? use.value : use.value.id));
|
|
70
|
+
const graph = new GPUGraph();
|
|
71
|
+
for (const name of new Set(inputs)) addInput(graph, name);
|
|
72
|
+
for (const name of new Set(outputs)) {
|
|
73
|
+
const vector = program.vectors.find(value => value.id === name);
|
|
74
|
+
if (vector)
|
|
75
|
+
graph.addDeclaration(
|
|
76
|
+
name,
|
|
77
|
+
gpuGraph.vector(vector.format, {
|
|
78
|
+
length: vector.length,
|
|
79
|
+
chunkLengths: vector.chunkLengths
|
|
80
|
+
}),
|
|
81
|
+
'value'
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
graph.add(operation);
|
|
85
|
+
this.stages.push({
|
|
86
|
+
graph: compileStage(graph, outputs),
|
|
87
|
+
inputs
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
} catch (error) {
|
|
91
|
+
this.destroy();
|
|
92
|
+
throw error;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
async run(
|
|
97
|
+
bindings: GPUGraphRunBindings,
|
|
98
|
+
locations: Readonly<Record<string, 'cpu' | 'gpu'>> = {}
|
|
99
|
+
): Promise<Record<string, GPUVector | CPUVector>> {
|
|
100
|
+
for (const [name, location] of Object.entries(locations))
|
|
101
|
+
assert(this.program.outputs.includes(name) && (location === 'cpu' || location === 'gpu'));
|
|
102
|
+
const cpu = new Map<string, CPUVector>();
|
|
103
|
+
for (const declaration of [...this.program.vectors, ...this.program.scalars].filter(
|
|
104
|
+
value => value.role === 'input'
|
|
105
|
+
)) {
|
|
106
|
+
const value = bindings[declaration.id];
|
|
107
|
+
assert(value !== undefined);
|
|
108
|
+
if (!(value instanceof CPUVector)) {
|
|
109
|
+
const graph = new GPUGraph();
|
|
110
|
+
const vector = this.program.vectors.find(vector => vector.id === declaration.id);
|
|
111
|
+
if (vector)
|
|
112
|
+
graph.addInput(
|
|
113
|
+
declaration.id,
|
|
114
|
+
gpuGraph.vector(vector.format, {
|
|
115
|
+
length: vector.length,
|
|
116
|
+
chunkLengths: vector.chunkLengths
|
|
117
|
+
})
|
|
118
|
+
);
|
|
119
|
+
else
|
|
120
|
+
graph.addInput(
|
|
121
|
+
declaration.id,
|
|
122
|
+
gpuGraph.scalar(
|
|
123
|
+
this.program.scalars.find(scalar => scalar.id === declaration.id)!.format
|
|
124
|
+
)
|
|
125
|
+
);
|
|
126
|
+
new GPUExpressionProgram(graph, {outputs: []})
|
|
127
|
+
.prepare(this.device, {[declaration.id]: value})
|
|
128
|
+
.finish();
|
|
129
|
+
}
|
|
130
|
+
if (value instanceof CPUVector) {
|
|
131
|
+
// List and validity metadata cannot be represented by portable callback rows yet.
|
|
132
|
+
assert(value.data.every(chunk => !chunk.nullBitmap && !chunk.valueOffsets));
|
|
133
|
+
assert(value.format === declaration.format);
|
|
134
|
+
const vector = this.program.vectors.find(vector => vector.id === declaration.id);
|
|
135
|
+
assert(vector && (vector.length === undefined || vector.length === value.length));
|
|
136
|
+
assert(
|
|
137
|
+
!vector.chunkLengths ||
|
|
138
|
+
(vector.chunkLengths.length === value.data.length &&
|
|
139
|
+
vector.chunkLengths.every((length, index) => length === value.data[index].length))
|
|
140
|
+
);
|
|
141
|
+
cpu.set(declaration.id, value);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
const values: Record<string, GPUGraphRunBindings[string]> = {...bindings};
|
|
145
|
+
const owned = new Set<GPUVector>();
|
|
146
|
+
const ensureCPU = async (name: string): Promise<GPUCPUVector> => {
|
|
147
|
+
let value = cpu.get(name);
|
|
148
|
+
if (!value) {
|
|
149
|
+
const gpu = values[name];
|
|
150
|
+
assert(gpu instanceof GPUVector);
|
|
151
|
+
const read = await readCPUVector(gpu);
|
|
152
|
+
value = makeCPUVector(
|
|
153
|
+
read.format,
|
|
154
|
+
read.chunks.map(chunk => chunk.values)
|
|
155
|
+
);
|
|
156
|
+
cpu.set(name, value);
|
|
157
|
+
}
|
|
158
|
+
return getCPUView(value);
|
|
159
|
+
};
|
|
160
|
+
const ensureGPU = async (name: string): Promise<GPUVector> => {
|
|
161
|
+
const existing = values[name];
|
|
162
|
+
if (existing instanceof GPUVector) return existing;
|
|
163
|
+
const view = await ensureCPU(name);
|
|
164
|
+
const graph = new GPUGraph();
|
|
165
|
+
graph.add(
|
|
166
|
+
new GPUUploadOperation({
|
|
167
|
+
output: name,
|
|
168
|
+
format: view.format,
|
|
169
|
+
data: view.chunks.map(chunk => chunk.values)
|
|
170
|
+
})
|
|
171
|
+
);
|
|
172
|
+
const compiled = this.compileStage(graph);
|
|
173
|
+
try {
|
|
174
|
+
const result = (await compiled.run({}))[name];
|
|
175
|
+
owned.add(result);
|
|
176
|
+
values[name] = result;
|
|
177
|
+
return result;
|
|
178
|
+
} finally {
|
|
179
|
+
compiled.destroy();
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
try {
|
|
183
|
+
for (const stage of this.stages) {
|
|
184
|
+
let results: Record<string, GPUVector>;
|
|
185
|
+
if (stage instanceof GPUCPUOperation) {
|
|
186
|
+
const inputs: Record<string, GPUCPUVector | number> = Object.create(null);
|
|
187
|
+
for (const [localName, name] of Object.entries(stage.inputs)) {
|
|
188
|
+
const value = values[name];
|
|
189
|
+
const cpuValue = typeof value === 'number' ? value : await ensureCPU(name);
|
|
190
|
+
inputs[localName] =
|
|
191
|
+
typeof cpuValue !== 'number' &&
|
|
192
|
+
this.program.scalars.some(scalar => scalar.id === name)
|
|
193
|
+
? cpuValue.pack()[0]
|
|
194
|
+
: cpuValue;
|
|
195
|
+
}
|
|
196
|
+
const outputs = await stage.execute({inputs});
|
|
197
|
+
assert(Object.keys(outputs).length === Object.keys(stage.outputs).length);
|
|
198
|
+
for (const name of Object.keys(stage.outputs)) {
|
|
199
|
+
// The resolved declaration includes constraints supplied through graph.vector().
|
|
200
|
+
const descriptor = this.program.vectors.find(vector => vector.id === name)!;
|
|
201
|
+
const result = outputs[name];
|
|
202
|
+
assert(result);
|
|
203
|
+
const arrays = 'chunks' in result ? result.chunks.map(chunk => chunk.values) : [result];
|
|
204
|
+
const upload = new GPUUploadOperation({
|
|
205
|
+
output: name,
|
|
206
|
+
format: descriptor.format,
|
|
207
|
+
data: arrays
|
|
208
|
+
});
|
|
209
|
+
const length = upload.chunkLengths.reduce((total, count) => total + count, 0);
|
|
210
|
+
// Returned rows must satisfy any declared fixed shape.
|
|
211
|
+
assert(descriptor.length === undefined || descriptor.length === length);
|
|
212
|
+
assert(
|
|
213
|
+
!descriptor.chunkLengths ||
|
|
214
|
+
(descriptor.chunkLengths.length === arrays.length &&
|
|
215
|
+
descriptor.chunkLengths.every(
|
|
216
|
+
(count, index) => count === upload.chunkLengths[index]
|
|
217
|
+
))
|
|
218
|
+
);
|
|
219
|
+
cpu.set(name, makeCPUVector(descriptor.format, arrays));
|
|
220
|
+
delete values[name];
|
|
221
|
+
}
|
|
222
|
+
continue;
|
|
223
|
+
} else {
|
|
224
|
+
const inputs: Record<string, GPUGraphRunBindings[string]> = Object.create(null);
|
|
225
|
+
for (const name of stage.inputs) {
|
|
226
|
+
const value = values[name];
|
|
227
|
+
// Stage scalar inputs are host numbers, including results produced by an earlier GPU stage.
|
|
228
|
+
inputs[name] = this.program.scalars.some(scalar => scalar.id === name)
|
|
229
|
+
? typeof value === 'number'
|
|
230
|
+
? value
|
|
231
|
+
: (await ensureCPU(name)).pack()[0]
|
|
232
|
+
: await ensureGPU(name);
|
|
233
|
+
}
|
|
234
|
+
results = await stage.graph.run({inputs});
|
|
235
|
+
}
|
|
236
|
+
for (const [name, value] of Object.entries(results)) {
|
|
237
|
+
cpu.delete(name);
|
|
238
|
+
values[name] = value;
|
|
239
|
+
owned.add(value);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
const outputs: Record<string, GPUVector | CPUVector> = Object.create(null);
|
|
243
|
+
for (const name of this.program.outputs) {
|
|
244
|
+
if (locations[name] === 'cpu') {
|
|
245
|
+
await ensureCPU(name);
|
|
246
|
+
outputs[name] = cpu.get(name)!;
|
|
247
|
+
} else outputs[name] = await ensureGPU(name);
|
|
248
|
+
}
|
|
249
|
+
for (const value of Object.values(outputs))
|
|
250
|
+
if (value instanceof GPUVector) owned.delete(value);
|
|
251
|
+
return outputs;
|
|
252
|
+
} finally {
|
|
253
|
+
for (const value of owned) value.destroy();
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
destroy(): void {
|
|
258
|
+
for (const stage of this.stages) if (!(stage instanceof GPUCPUOperation)) stage.graph.destroy();
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
async function readCPUVector(vector: GPUVector): Promise<GPUCPUVector> {
|
|
263
|
+
assert(vector.format);
|
|
264
|
+
const info = getGPUVectorFormatInfo(vector.format);
|
|
265
|
+
const ValueType =
|
|
266
|
+
info.signedDataType === 'float32'
|
|
267
|
+
? Float32Array
|
|
268
|
+
: info.signedDataType === 'uint32'
|
|
269
|
+
? Uint32Array
|
|
270
|
+
: Int32Array;
|
|
271
|
+
const chunks: {values: GPUCPUArray; length: number}[] = [];
|
|
272
|
+
for (const chunk of vector.data) {
|
|
273
|
+
const values = new ValueType((chunk.length * info.byteLength) / 4);
|
|
274
|
+
if (chunk.length) {
|
|
275
|
+
const bytes = await chunk.buffer.readAsync(
|
|
276
|
+
chunk.byteOffset,
|
|
277
|
+
(chunk.length - 1) * chunk.byteStride + info.byteLength
|
|
278
|
+
);
|
|
279
|
+
const packed = new Uint8Array(values.buffer);
|
|
280
|
+
for (let row = 0; row < chunk.length; row++)
|
|
281
|
+
packed.set(
|
|
282
|
+
bytes.subarray(row * chunk.byteStride, row * chunk.byteStride + info.byteLength),
|
|
283
|
+
row * info.byteLength
|
|
284
|
+
);
|
|
285
|
+
}
|
|
286
|
+
chunks.push({values, length: chunk.length});
|
|
287
|
+
}
|
|
288
|
+
return {
|
|
289
|
+
format: vector.format as GPUCPUVector['format'],
|
|
290
|
+
length: vector.length,
|
|
291
|
+
chunks,
|
|
292
|
+
pack() {
|
|
293
|
+
const packed = new ValueType(chunks.reduce((total, chunk) => total + chunk.values.length, 0));
|
|
294
|
+
let offset = 0;
|
|
295
|
+
for (const chunk of chunks) {
|
|
296
|
+
packed.set(chunk.values, offset);
|
|
297
|
+
offset += chunk.values.length;
|
|
298
|
+
}
|
|
299
|
+
return packed;
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
function makeCPUVector(format: GPUCPUVector['format'], arrays: readonly GPUCPUArray[]): CPUVector {
|
|
305
|
+
const width = getGPUVectorFormatInfo(format).byteLength;
|
|
306
|
+
return new CPUVector({
|
|
307
|
+
format,
|
|
308
|
+
data: arrays.map(buffer => new CPUData({buffer, format, length: buffer.byteLength / width}))
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
function getCPUView(vector: CPUVector): GPUCPUVector {
|
|
312
|
+
const format = vector.format as GPUCPUVector['format'];
|
|
313
|
+
assert(/^(float32|sint32|uint32)(x[234])?$/.test(format));
|
|
314
|
+
const info = getGPUVectorFormatInfo(format);
|
|
315
|
+
const ValueType =
|
|
316
|
+
info.signedDataType === 'float32'
|
|
317
|
+
? Float32Array
|
|
318
|
+
: info.signedDataType === 'uint32'
|
|
319
|
+
? Uint32Array
|
|
320
|
+
: Int32Array;
|
|
321
|
+
const chunks = vector.data.map(chunk => {
|
|
322
|
+
const values = new ValueType(chunk.length * info.components);
|
|
323
|
+
const bytes = new Uint8Array(values.buffer);
|
|
324
|
+
for (let row = 0; row < chunk.length; row++)
|
|
325
|
+
bytes.set(
|
|
326
|
+
new Uint8Array(chunk.buffer, chunk.byteOffset + row * chunk.byteStride, info.byteLength),
|
|
327
|
+
row * info.byteLength
|
|
328
|
+
);
|
|
329
|
+
return {values, length: chunk.length};
|
|
330
|
+
});
|
|
331
|
+
return {
|
|
332
|
+
format,
|
|
333
|
+
length: vector.length,
|
|
334
|
+
chunks,
|
|
335
|
+
pack() {
|
|
336
|
+
const values = new ValueType(vector.length * info.components);
|
|
337
|
+
let offset = 0;
|
|
338
|
+
for (const chunk of chunks) {
|
|
339
|
+
values.set(chunk.values, offset);
|
|
340
|
+
offset += chunk.values.length;
|
|
341
|
+
}
|
|
342
|
+
return values;
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
import type {GPUOperation} from './gpu-operation';
|
|
6
|
+
import type {GPUOperationContract} from './gpu-operation-contract';
|
|
7
|
+
import type {GPUGraphVectorDescriptor, GPUGraphVectorFormat} from './gpu-graph-value';
|
|
8
|
+
|
|
9
|
+
/** Packed numeric rows supported by portable graph operations. */
|
|
10
|
+
export type GPUCPUArray = Float32Array | Int32Array | Uint32Array;
|
|
11
|
+
export type GPUCPUVector = {
|
|
12
|
+
readonly format: GPUGraphVectorFormat;
|
|
13
|
+
readonly length: number;
|
|
14
|
+
readonly chunks: readonly {readonly values: GPUCPUArray; readonly length: number}[];
|
|
15
|
+
/** Explicitly combine the source chunks into a new packed array. */
|
|
16
|
+
pack(): GPUCPUArray;
|
|
17
|
+
};
|
|
18
|
+
export type GPUCPUResult = GPUCPUArray | {chunks: readonly {values: GPUCPUArray}[]};
|
|
19
|
+
export type GPUCPUOperationProps = {
|
|
20
|
+
id: string;
|
|
21
|
+
inputs: Readonly<Record<string, string>>;
|
|
22
|
+
outputs: Readonly<Record<string, GPUGraphVectorDescriptor>>;
|
|
23
|
+
/** Input arrays are borrowed read-only snapshots. Do not mutate returned arrays until run settles. */
|
|
24
|
+
execute(context: {
|
|
25
|
+
inputs: Readonly<Record<string, GPUCPUVector | number>>;
|
|
26
|
+
}): Record<string, GPUCPUResult> | Promise<Record<string, GPUCPUResult>>;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** Shared CPU operation intent. Executed by reusable, unscoped GPUGraph and GPUSimpleGraph. */
|
|
30
|
+
export class GPUCPUOperation implements GPUOperation {
|
|
31
|
+
readonly type = 'cpu';
|
|
32
|
+
readonly id: string;
|
|
33
|
+
readonly inputs: GPUCPUOperationProps['inputs'];
|
|
34
|
+
readonly outputs: GPUCPUOperationProps['outputs'];
|
|
35
|
+
readonly execute: GPUCPUOperationProps['execute'];
|
|
36
|
+
|
|
37
|
+
constructor(props: GPUCPUOperationProps) {
|
|
38
|
+
this.id = props.id;
|
|
39
|
+
this.inputs = Object.freeze({...props.inputs});
|
|
40
|
+
this.outputs = Object.freeze(
|
|
41
|
+
Object.fromEntries(
|
|
42
|
+
Object.entries(props.outputs).map(([name, descriptor]) => [
|
|
43
|
+
name,
|
|
44
|
+
Object.freeze({
|
|
45
|
+
...descriptor,
|
|
46
|
+
...(descriptor.chunkLengths
|
|
47
|
+
? {chunkLengths: Object.freeze([...descriptor.chunkLengths])}
|
|
48
|
+
: {})
|
|
49
|
+
})
|
|
50
|
+
])
|
|
51
|
+
)
|
|
52
|
+
);
|
|
53
|
+
this.execute = props.execute;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
get contract(): GPUOperationContract {
|
|
57
|
+
return {
|
|
58
|
+
outputs: this.outputs,
|
|
59
|
+
values: [
|
|
60
|
+
...Object.values(this.inputs).map(value => ({value, access: 'read' as const})),
|
|
61
|
+
...Object.keys(this.outputs).map(value => ({value, access: 'write' as const}))
|
|
62
|
+
]
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -23,12 +23,24 @@ export function getBoundedDispatchLayout(
|
|
|
23
23
|
throw new Error(`${operationName} element count must be a non-negative uint32`);
|
|
24
24
|
}
|
|
25
25
|
validateWorkgroupSize(operationName, workgroupSize);
|
|
26
|
+
return getBoundedWorkgroupLayout(
|
|
27
|
+
operationName,
|
|
28
|
+
Math.max(1, Math.ceil(elementCount / workgroupSize)),
|
|
29
|
+
maxComputeWorkgroupsPerDimension
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Plans a bounded dispatch for kernels that index their work directly by workgroup. Requires a positive count. @internal */
|
|
34
|
+
export function getBoundedWorkgroupLayout(
|
|
35
|
+
operationName: string,
|
|
36
|
+
workgroupCount: number,
|
|
37
|
+
maxComputeWorkgroupsPerDimension: number
|
|
38
|
+
): GPUBoundedDispatchLayout {
|
|
26
39
|
const maximum = Math.floor(maxComputeWorkgroupsPerDimension);
|
|
27
40
|
if (!Number.isSafeInteger(maximum) || maximum < 1) {
|
|
28
41
|
throw new Error('maxComputeWorkgroupsPerDimension must be a positive integer');
|
|
29
42
|
}
|
|
30
43
|
|
|
31
|
-
const workgroupCount = Math.max(1, Math.ceil(elementCount / workgroupSize));
|
|
32
44
|
const x = Math.min(workgroupCount, maximum);
|
|
33
45
|
const y = Math.min(Math.ceil(workgroupCount / x), maximum);
|
|
34
46
|
const z = Math.ceil(workgroupCount / x / y);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import {parse, type Expression} from '@math.gl/
|
|
5
|
+
import {parse, type Expression} from '@math.gl/sql/expressions';
|
|
6
6
|
import {getGPUVectorFormatInfo} from '@luma.gl/graph/gpu-data';
|
|
7
7
|
import {gpuGraph, type GPUGraphVectorFormat} from './gpu-graph-value';
|
|
8
8
|
import type {GPUOperationContract} from './gpu-operation-contract';
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
5
|
import {Buffer, Texture, TextureView, type Device} from '@luma.gl/core';
|
|
6
|
-
import {GPUData, GPUVector, getGPUVectorFormatInfo} from '@luma.gl/graph/gpu-data';
|
|
6
|
+
import {CPUVector, GPUData, GPUVector, getGPUVectorFormatInfo} from '@luma.gl/graph/gpu-data';
|
|
7
7
|
import type {GPUGraph} from './gpu-graph';
|
|
8
8
|
import {GPUCopyOperation} from './gpu-transfer-operation';
|
|
9
|
+
import {GPUShaderPassOperation} from './gpu-shader-pass-operation';
|
|
9
10
|
import {validateTextureCopy} from './gpu-texture-copy';
|
|
10
11
|
import {
|
|
11
12
|
GPUTextureInvocation,
|
|
@@ -37,7 +38,7 @@ import {
|
|
|
37
38
|
} from './gpu-operation-contract';
|
|
38
39
|
|
|
39
40
|
export type GPUGraphRunBindings = Readonly<
|
|
40
|
-
Record<string, GPUVector | number | GPUGraphTextureBinding>
|
|
41
|
+
Record<string, GPUVector | CPUVector | number | GPUGraphTextureBinding>
|
|
41
42
|
>;
|
|
42
43
|
export type GPUGraphExecutionBindings = {
|
|
43
44
|
inputs?: GPUGraphRunBindings;
|
|
@@ -46,6 +47,7 @@ export type GPUGraphExecutionBindings = {
|
|
|
46
47
|
};
|
|
47
48
|
export type GPUGraphCompileOptions = {
|
|
48
49
|
outputs?: readonly string[];
|
|
50
|
+
outputLocations?: Readonly<Record<string, 'cpu' | 'gpu'>>;
|
|
49
51
|
lowerings?: readonly GPUOperationLowering[];
|
|
50
52
|
};
|
|
51
53
|
export type GPUGraphRunOptions = {outputTargets?: Readonly<Record<string, GPUGraphOutput>>};
|
|
@@ -88,6 +90,11 @@ export class GPUExpressionProgram {
|
|
|
88
90
|
operation.operations.forEach(flatten);
|
|
89
91
|
else {
|
|
90
92
|
if (operation instanceof GPUCompositeOperation) {
|
|
93
|
+
const containsShaderPass = (child: GPUGraphOperation): boolean =>
|
|
94
|
+
child instanceof GPUShaderPassOperation ||
|
|
95
|
+
(child instanceof GPUCompositeOperation && child.operations.some(containsShaderPass));
|
|
96
|
+
if (operation.operations.some(containsShaderPass))
|
|
97
|
+
throw new Error('Shader-pass operations inside control flow are not supported');
|
|
91
98
|
const containsExpression = (child: GPUGraphOperation): boolean =>
|
|
92
99
|
child instanceof GPUExpressionOperation ||
|
|
93
100
|
(child instanceof GPUCompositeOperation && child.operations.some(containsExpression));
|
|
@@ -259,6 +266,7 @@ export class GPUExpressionProgram {
|
|
|
259
266
|
value !== undefined &&
|
|
260
267
|
typeof value === 'object' &&
|
|
261
268
|
!(value instanceof GPUVector) &&
|
|
269
|
+
!(value instanceof CPUVector) &&
|
|
262
270
|
!(value instanceof Texture) &&
|
|
263
271
|
!(value instanceof TextureView)
|
|
264
272
|
);
|
|
@@ -272,7 +280,7 @@ export class GPUExpressionProgram {
|
|
|
272
280
|
if (!['inputs', 'state', 'outputTargets'].includes(name))
|
|
273
281
|
throw new Error(`Unknown execution option ${name}`);
|
|
274
282
|
const execution = supplied as GPUGraphExecutionBindings;
|
|
275
|
-
const bindings: Record<string, GPUVector | number | GPUGraphTextureBinding> =
|
|
283
|
+
const bindings: Record<string, GPUVector | CPUVector | number | GPUGraphTextureBinding> =
|
|
276
284
|
Object.create(null);
|
|
277
285
|
for (const [role, group] of [
|
|
278
286
|
['input', execution.inputs],
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
import {lowerGPUUpload, lowerGPUCopy, lowerGPUTextureCopy} from './gpu-transfer-lowering';
|
|
6
6
|
import {GPUUploadOperation, GPUCopyOperation} from './gpu-transfer-operation';
|
|
7
7
|
import {GPUCompactionOperation} from './gpu-compaction-operation';
|
|
8
|
+
import {GPUGraphGroupAggregation, GPUGraphReduction} from './gpu-semantic-aggregation-operation';
|
|
9
|
+
import {GPUGroupAggregation} from './gpu-group-aggregation';
|
|
10
|
+
import {GPUReduction} from './gpu-reduction';
|
|
8
11
|
import {GPUCompaction} from './gpu-compaction';
|
|
9
12
|
|
|
10
13
|
import type {TextureFormat} from '@luma.gl/core';
|
|
@@ -108,6 +111,7 @@ export class GPUGraphCompiler<Parameters = void> {
|
|
|
108
111
|
readonly capabilities: GPUGraphBackendCapabilities;
|
|
109
112
|
readonly lowerings: readonly GPUOperationLowering<Parameters>[];
|
|
110
113
|
private compactionIndex = 0;
|
|
114
|
+
private aggregationIndex = 0;
|
|
111
115
|
constructor(device: Device, lowerings: readonly GPUOperationLowering<Parameters>[] = []) {
|
|
112
116
|
this.device = device;
|
|
113
117
|
this.capabilities = Object.freeze({
|
|
@@ -131,6 +135,7 @@ export class GPUGraphCompiler<Parameters = void> {
|
|
|
131
135
|
}
|
|
132
136
|
compile(program: GPUGraph, bindings: GPUGraphBindings = {}): GPUGraphCompilation<Parameters> {
|
|
133
137
|
this.compactionIndex = 0;
|
|
138
|
+
this.aggregationIndex = 0;
|
|
134
139
|
// Bound external partitions must be available when resolving shape-inheriting results.
|
|
135
140
|
program = program.clone();
|
|
136
141
|
for (const vector of program.vectors) {
|
|
@@ -336,6 +341,54 @@ export class GPUGraphCompiler<Parameters = void> {
|
|
|
336
341
|
return [
|
|
337
342
|
{type: 'vector-upload', lower: lowerGPUUpload},
|
|
338
343
|
{type: 'vector-copy', lower: lowerGPUCopy},
|
|
344
|
+
{
|
|
345
|
+
type: 'group-aggregation',
|
|
346
|
+
lower: (operation: GPUGraphGroupAggregation, context) => {
|
|
347
|
+
const {props} = operation;
|
|
348
|
+
const id = `${operation.id}-${this.aggregationIndex++}`;
|
|
349
|
+
const keys = context.resolveVector<'uint32'>(props.keys);
|
|
350
|
+
const mask = props.mask ? context.resolveVector<'uint32'>(props.mask) : undefined;
|
|
351
|
+
if (props.operation === 'count') {
|
|
352
|
+
context.graph.add(
|
|
353
|
+
new GPUGroupAggregation({
|
|
354
|
+
id,
|
|
355
|
+
keys,
|
|
356
|
+
mask,
|
|
357
|
+
operation: 'count',
|
|
358
|
+
output: getAggregationOutput(context.resolveVector<'uint32'>(props.output))
|
|
359
|
+
})
|
|
360
|
+
);
|
|
361
|
+
} else {
|
|
362
|
+
context.graph.add(
|
|
363
|
+
new GPUGroupAggregation({
|
|
364
|
+
id,
|
|
365
|
+
keys,
|
|
366
|
+
mask,
|
|
367
|
+
operation: props.operation,
|
|
368
|
+
values: context.resolveVector<'float32'>(props.values),
|
|
369
|
+
output: getAggregationOutput(context.resolveVector<'float32'>(props.output))
|
|
370
|
+
})
|
|
371
|
+
);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
type: 'reduction',
|
|
377
|
+
lower: (operation: GPUGraphReduction, context) => {
|
|
378
|
+
const {props} = operation;
|
|
379
|
+
context.graph.add(
|
|
380
|
+
new GPUReduction({
|
|
381
|
+
id: `${operation.id}-${this.aggregationIndex++}`,
|
|
382
|
+
input: context.resolveVector<'uint32' | 'sint32' | 'float32'>(props.input),
|
|
383
|
+
mask: props.mask ? context.resolveVector<'uint32'>(props.mask) : undefined,
|
|
384
|
+
operation: props.operation,
|
|
385
|
+
output: getAggregationOutput(
|
|
386
|
+
context.resolveVector<'uint32' | 'sint32' | 'float32'>(props.output)
|
|
387
|
+
)
|
|
388
|
+
})
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
},
|
|
339
392
|
{
|
|
340
393
|
type: 'compaction',
|
|
341
394
|
lower: (operation: GPUCompactionOperation, context) => {
|
|
@@ -760,3 +813,11 @@ function getTransientChunkLengths(
|
|
|
760
813
|
}
|
|
761
814
|
return lengths;
|
|
762
815
|
}
|
|
816
|
+
|
|
817
|
+
// These reduction kernels write one packed destination, never just the first of several chunks.
|
|
818
|
+
function getAggregationOutput<Format extends 'uint32' | 'sint32' | 'float32'>(
|
|
819
|
+
output: GraphVectorView<Format>
|
|
820
|
+
) {
|
|
821
|
+
assert(output.data.length === 1);
|
|
822
|
+
return output.data[0];
|
|
823
|
+
}
|
|
@@ -222,9 +222,9 @@ export class GPUGraph {
|
|
|
222
222
|
throw new Error(`${this.id} accepts GPU operations only`);
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
export function composite(
|
|
226
|
-
operations: readonly
|
|
225
|
+
export function composite<Operation extends GPUGraphOperation>(
|
|
226
|
+
operations: readonly Operation[],
|
|
227
227
|
props: {id?: string} = {}
|
|
228
|
-
): GPUCompositeOperation {
|
|
228
|
+
): GPUCompositeOperation<Operation> {
|
|
229
229
|
return new GPUCompositeOperation({id: props.id, operations});
|
|
230
230
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
+
import {GPU_GRID_COORDINATE_WGSL} from './gpu-grid-coordinate';
|
|
5
6
|
import type {GPUCommandNode} from './gpu-command-node';
|
|
6
7
|
import {
|
|
7
8
|
GPUCommandGraph,
|
|
@@ -346,11 +347,7 @@ ${boundsBinding}
|
|
|
346
347
|
@group(0) @binding(${outputBinding}) var<storage, read_write> outputValues: array<atomic<u32>>;
|
|
347
348
|
${countsBinding}
|
|
348
349
|
|
|
349
|
-
|
|
350
|
-
if (maximum == minimum || value == minimum) { return 0u; }
|
|
351
|
-
if (value == maximum) { return size - 1u; }
|
|
352
|
-
return min(u32((value - minimum) / (maximum - minimum) * f32(size)), size - 1u);
|
|
353
|
-
}
|
|
350
|
+
${GPU_GRID_COORDINATE_WGSL}
|
|
354
351
|
|
|
355
352
|
${getAggregationFunction(aggregation.operation)}
|
|
356
353
|
${useSubgroups ? getSubgroupBallotHelpersWGSL() : ''}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
+
import {GPU_GRID_COORDINATE_WGSL} from './gpu-grid-coordinate';
|
|
5
6
|
import type {GPUCommandNode} from './gpu-command-node';
|
|
6
7
|
import {
|
|
7
8
|
GPUCommandGraph,
|
|
@@ -291,11 +292,7 @@ ${boundsBinding}
|
|
|
291
292
|
${local ? `var<workgroup> localCounts: array<atomic<u32>, ${binning.output.length}>;` : ''}
|
|
292
293
|
${useSubgroups ? getSubgroupBallotHelpersWGSL() : ''}
|
|
293
294
|
|
|
294
|
-
|
|
295
|
-
if (maximum == minimum || value == minimum) { return 0u; }
|
|
296
|
-
if (value == maximum) { return size - 1u; }
|
|
297
|
-
return min(u32((value - minimum) / (maximum - minimum) * f32(size)), size - 1u);
|
|
298
|
-
}
|
|
295
|
+
${GPU_GRID_COORDINATE_WGSL}
|
|
299
296
|
|
|
300
297
|
@compute @workgroup_size(${GRID_WORKGROUP_SIZE}) fn main(
|
|
301
298
|
@builtin(workgroup_id) workgroupId: vec3<u32>,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* WGSL `getCoordinate(value, minimum, maximum, size)` for grids.
|
|
7
|
+
* Supply a finite value, inclusive bounds, and a positive cell count.
|
|
8
|
+
* Coordinates outside the bounds clamp to the first or last cell.
|
|
9
|
+
*/
|
|
10
|
+
export const GPU_GRID_COORDINATE_WGSL = `fn getCoordinate(value: f32, minimum: f32, maximum: f32, size: u32) -> u32 {
|
|
11
|
+
if (maximum == minimum || value <= minimum) { return 0u; }
|
|
12
|
+
if (value >= maximum) { return size - 1u; }
|
|
13
|
+
if (minimum < 0.0 && maximum > 3.402823466e+38 + minimum) {
|
|
14
|
+
let scale = max(abs(minimum), abs(maximum));
|
|
15
|
+
let scaledValue = value / scale;
|
|
16
|
+
let scaledMinimum = minimum / scale;
|
|
17
|
+
let scaledMaximum = maximum / scale;
|
|
18
|
+
return min(
|
|
19
|
+
u32((scaledValue - scaledMinimum) / (scaledMaximum - scaledMinimum) * f32(size)),
|
|
20
|
+
size - 1u
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
return min(u32((value - minimum) / (maximum - minimum) * f32(size)), size - 1u);
|
|
24
|
+
}`;
|