@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.
- 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/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 +1 -16
- package/dist/gpu-dataframe/gpu-data-frame-query.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-data-frame-query.js +1 -23
- package/dist/gpu-dataframe/gpu-data-frame-query.js.map +1 -1
- package/dist/gpu-dataframe/gpu-expression.cjs +91 -2
- package/dist/gpu-dataframe/gpu-expression.d.ts +37 -0
- package/dist/gpu-dataframe/gpu-expression.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-expression.js +106 -0
- package/dist/gpu-dataframe/gpu-expression.js.map +1 -1
- package/dist/gpu-dataframe/index.cjs +12 -2
- package/dist/gpu-dataframe/index.cjs.map +3 -3
- package/dist/gpu-dataframe/index.d.ts +4 -0
- package/dist/gpu-dataframe/index.d.ts.map +1 -1
- package/dist/gpu-dataframe/index.js +2 -0
- package/dist/gpu-dataframe/index.js.map +1 -1
- package/dist/gpu-dataframe/portable-expression.cjs +103 -0
- package/dist/gpu-dataframe/portable-expression.d.ts +19 -0
- package/dist/gpu-dataframe/portable-expression.d.ts.map +1 -0
- package/dist/gpu-dataframe/portable-expression.js +98 -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-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-h3/index.cjs.map +1 -1
- package/dist/gpu-physics/gpu-rigid-body-world.cjs +162 -2
- package/dist/gpu-physics/gpu-rigid-body-world.d.ts +25 -0
- package/dist/gpu-physics/gpu-rigid-body-world.d.ts.map +1 -1
- package/dist/gpu-physics/gpu-rigid-body-world.js +181 -2
- package/dist/gpu-physics/gpu-rigid-body-world.js.map +1 -1
- package/dist/gpu-physics/index.cjs.map +2 -2
- package/dist/gpu-physics/index.d.ts +1 -0
- package/dist/gpu-physics/index.d.ts.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-shaders.cjs +2 -2
- 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 +2 -2
- package/dist/gpu-physics/rigid-body-shaders.js.map +1 -1
- package/dist/gpu-physics/rigid-body-vehicle.cjs +90 -0
- package/dist/gpu-physics/rigid-body-vehicle.d.ts +35 -0
- package/dist/gpu-physics/rigid-body-vehicle.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-vehicle.js +66 -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 +2 -2
- 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-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.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 +6 -0
- 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/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-sql/gpu-sql.cjs +376 -0
- package/dist/gpu-sql/gpu-sql.d.ts +36 -0
- package/dist/gpu-sql/gpu-sql.d.ts.map +1 -0
- package/dist/gpu-sql/gpu-sql.js +374 -0
- package/dist/gpu-sql/gpu-sql.js.map +1 -0
- package/dist/gpu-sql/index.cjs +5 -5
- package/dist/gpu-sql/index.cjs.map +3 -3
- package/dist/gpu-sql/index.d.ts +2 -2
- package/dist/gpu-sql/index.d.ts.map +1 -1
- package/dist/gpu-sql/index.js +1 -1
- package/dist/gpu-sql/index.js.map +1 -1
- 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 +21 -7
- 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/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 +6 -26
- package/src/gpu-dataframe/gpu-expression.ts +135 -0
- package/src/gpu-dataframe/index.ts +11 -0
- package/src/gpu-dataframe/portable-expression.ts +117 -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-physics/gpu-rigid-body-world.ts +227 -2
- package/src/gpu-physics/index.ts +1 -0
- package/src/gpu-physics/rigid-body-parallel-shaders.ts +32 -9
- package/src/gpu-physics/rigid-body-shaders.ts +3 -2
- package/src/gpu-physics/rigid-body-vehicle.ts +99 -0
- package/src/gpu-project/README.md +4 -4
- 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/geoarrow.ts +11 -0
- package/src/gpu-project/graph.ts +10 -0
- package/src/gpu-project/index.ts +2 -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.ts +163 -19
- package/src/gpu-simple-graph/index.ts +1 -0
- package/src/gpu-simple-graph/operation/gpu-data-evaluator.ts +24 -0
- package/src/gpu-simple-graph/operation/gpu-vector-evaluator.ts +7 -0
- 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/webgpu/convert-colors.ts +47 -13
- package/src/gpu-sql/gpu-sql.ts +494 -0
- package/src/gpu-sql/index.ts +2 -2
- package/src/gpu-tables/table/gpu-table.ts +2 -1
- package/src/index.ts +21 -0
- package/dist/gpu-sql/lu-sql.cjs +0 -499
- package/dist/gpu-sql/lu-sql.d.ts +0 -36
- package/dist/gpu-sql/lu-sql.d.ts.map +0 -1
- package/dist/gpu-sql/lu-sql.js +0 -497
- package/dist/gpu-sql/lu-sql.js.map +0 -1
- package/src/gpu-sql/lu-sql.ts +0 -599
|
@@ -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 {type GPUCommandGraph, type GraphDataView} from './gpu-command-graph';
|
|
7
8
|
import {
|
|
@@ -246,21 +247,7 @@ const DEPTH: u32 = ${depth}u;
|
|
|
246
247
|
@group(0) @binding(0) var<storage, read> positions: array<f32>;
|
|
247
248
|
${bindings}
|
|
248
249
|
|
|
249
|
-
|
|
250
|
-
if (maximum == minimum || value == minimum) { return 0u; }
|
|
251
|
-
if (value == maximum) { return size - 1u; }
|
|
252
|
-
if (minimum < 0.0 && maximum > 0.0) {
|
|
253
|
-
let scale = max(abs(minimum), abs(maximum));
|
|
254
|
-
let scaledValue = value / scale;
|
|
255
|
-
let scaledMinimum = minimum / scale;
|
|
256
|
-
let scaledMaximum = maximum / scale;
|
|
257
|
-
return min(
|
|
258
|
-
u32((scaledValue - scaledMinimum) / (scaledMaximum - scaledMinimum) * f32(size)),
|
|
259
|
-
size - 1u
|
|
260
|
-
);
|
|
261
|
-
}
|
|
262
|
-
return min(u32((value - minimum) / (maximum - minimum) * f32(size)), size - 1u);
|
|
263
|
-
}
|
|
250
|
+
${GPU_GRID_COORDINATE_WGSL}
|
|
264
251
|
|
|
265
252
|
@compute @workgroup_size(256)
|
|
266
253
|
fn main(@builtin(workgroup_id) workgroupId: vec3u, @builtin(local_invocation_index) localInvocationIndex: u32) {
|
|
@@ -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 {GPUCommandGraph, type GraphDataView, type GraphVectorView} from './gpu-command-graph';
|
|
7
8
|
import type {GPUGridIndexBounds, GPUGridIndexSize} from './gpu-grid-index';
|
|
@@ -223,22 +224,7 @@ fn finite(value: f32) -> bool {
|
|
|
223
224
|
return value == value && abs(value) <= 3.402823466e+38;
|
|
224
225
|
}
|
|
225
226
|
|
|
226
|
-
|
|
227
|
-
if (!finite(value)) { return 0u; }
|
|
228
|
-
if (maximum == minimum || value == minimum) { return 0u; }
|
|
229
|
-
if (value == maximum) { return size - 1u; }
|
|
230
|
-
if (minimum < 0.0 && maximum > 0.0) {
|
|
231
|
-
let scale = max(abs(minimum), abs(maximum));
|
|
232
|
-
let scaledValue = value / scale;
|
|
233
|
-
let scaledMinimum = minimum / scale;
|
|
234
|
-
let scaledMaximum = maximum / scale;
|
|
235
|
-
return min(
|
|
236
|
-
u32((scaledValue - scaledMinimum) / (scaledMaximum - scaledMinimum) * f32(size)),
|
|
237
|
-
size - 1u
|
|
238
|
-
);
|
|
239
|
-
}
|
|
240
|
-
return min(u32((value - minimum) / (maximum - minimum) * f32(size)), size - 1u);
|
|
241
|
-
}
|
|
227
|
+
${GPU_GRID_COORDINATE_WGSL}
|
|
242
228
|
fn cellMinimum(coordinate: u32, size: u32, minimum: f32, maximum: f32) -> f32 {
|
|
243
229
|
let ratio = f32(coordinate) / f32(size);
|
|
244
230
|
return minimum * (1.0 - ratio) + maximum * ratio;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import {alignGraphVectorViews} from './graph-vector-view-utils';
|
|
6
6
|
|
|
7
|
+
import {setGPUComputeDispatchWorkgroups} from './gpu-command-dispatch-metadata';
|
|
7
8
|
import {type GPUCommandNode, createGPUComputeCommandNode} from './gpu-command-node';
|
|
8
9
|
import {type Binding} from '@luma.gl/core';
|
|
9
10
|
import {Kernel} from '../execution/compute/kernel';
|
|
@@ -739,56 +740,43 @@ function addKernelPass<Parameters>(
|
|
|
739
740
|
dispatchSize?: GPUGroupAggregationDispatchLayout;
|
|
740
741
|
}
|
|
741
742
|
): readonly GPUCommandNode<Parameters>[] {
|
|
742
|
-
const
|
|
743
|
-
const maximumWorkgroupCount =
|
|
744
|
-
|
|
745
|
-
:
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
743
|
+
const {x, y, z} = props.dispatchSize ?? {x: props.dispatchCount ?? 1, y: 1, z: 1};
|
|
744
|
+
const maximumWorkgroupCount = x * y * z;
|
|
745
|
+
const node = createGPUComputeCommandNode<Parameters>({
|
|
746
|
+
id: props.id,
|
|
747
|
+
resources: props.resources,
|
|
748
|
+
workload: {
|
|
749
|
+
operation: 'GPUGroupAggregation',
|
|
750
|
+
commandCount: 1,
|
|
751
|
+
maximumWorkgroupCount,
|
|
752
|
+
maximumInvocationCount: maximumWorkgroupCount * GROUP_AGGREGATION_WORKGROUP_SIZE
|
|
753
|
+
},
|
|
754
|
+
compile: ({device}) => {
|
|
755
|
+
const kernel = new Kernel(device, {
|
|
756
|
+
id: props.id,
|
|
757
|
+
source: props.source,
|
|
758
|
+
shaderLayout: {
|
|
759
|
+
bindings: Object.keys(props.bindings).map((name, location) => ({
|
|
760
|
+
name,
|
|
761
|
+
type: 'storage' as const,
|
|
762
|
+
group: 0,
|
|
763
|
+
location
|
|
764
|
+
}))
|
|
765
|
+
}
|
|
766
|
+
});
|
|
767
|
+
return {
|
|
768
|
+
encode: ({computePass, getBuffer}) => {
|
|
769
|
+
const bindings: Record<string, Binding> = {};
|
|
770
|
+
for (const [name, view] of Object.entries(props.bindings)) {
|
|
771
|
+
bindings[name] = getViewBinding(view, getBuffer);
|
|
767
772
|
}
|
|
768
|
-
});
|
|
769
|
-
return {
|
|
770
|
-
encode: ({computePass, getBuffer}) => {
|
|
771
|
-
const bindings: Record<string, Binding> = {};
|
|
772
|
-
for (const [name, view] of Object.entries(props.bindings)) {
|
|
773
|
-
bindings[name] = getViewBinding(view, getBuffer);
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
if (props.dispatchSize) {
|
|
777
|
-
kernel.dispatch(computePass, {
|
|
778
|
-
bindings,
|
|
779
|
-
x: props.dispatchSize.x,
|
|
780
|
-
y: props.dispatchSize.y,
|
|
781
|
-
z: props.dispatchSize.z
|
|
782
|
-
});
|
|
783
|
-
} else {
|
|
784
|
-
kernel.dispatch(computePass, {bindings, x: props.dispatchCount!});
|
|
785
|
-
}
|
|
786
|
-
},
|
|
787
|
-
destroy: () => kernel.destroy()
|
|
788
|
-
};
|
|
789
|
-
}
|
|
790
|
-
})
|
|
791
|
-
);
|
|
792
773
|
|
|
793
|
-
|
|
774
|
+
kernel.dispatch(computePass, {bindings, x, y, z});
|
|
775
|
+
},
|
|
776
|
+
destroy: () => kernel.destroy()
|
|
777
|
+
};
|
|
778
|
+
}
|
|
779
|
+
});
|
|
780
|
+
|
|
781
|
+
return [setGPUComputeDispatchWorkgroups(node, [x, y, z])];
|
|
794
782
|
}
|
|
@@ -49,30 +49,32 @@ export type GPUGraphOperation =
|
|
|
49
49
|
export type GPUOperationLike = GPUGraphOperation | readonly GPUOperationLike[];
|
|
50
50
|
|
|
51
51
|
/** Semantic hierarchy. Grouping never implies synchronization or a command-graph child graph. */
|
|
52
|
-
export class GPUCompositeOperation
|
|
52
|
+
export class GPUCompositeOperation<Operation extends GPUGraphOperation = GPUGraphOperation>
|
|
53
|
+
implements GPUOperation
|
|
54
|
+
{
|
|
53
55
|
readonly id: string;
|
|
54
56
|
readonly type: string = 'composite';
|
|
55
|
-
readonly operations: readonly
|
|
57
|
+
readonly operations: readonly Operation[];
|
|
56
58
|
readonly metadata?: GPUOperationMetadata;
|
|
57
59
|
|
|
58
60
|
constructor(
|
|
59
61
|
props:
|
|
60
|
-
| readonly
|
|
62
|
+
| readonly Operation[]
|
|
61
63
|
| {
|
|
62
64
|
id?: string;
|
|
63
|
-
operations: readonly
|
|
65
|
+
operations: readonly Operation[];
|
|
64
66
|
metadata?: GPUOperationMetadata;
|
|
65
67
|
}
|
|
66
68
|
) {
|
|
67
69
|
const normalized: {
|
|
68
70
|
id?: string;
|
|
69
|
-
operations: readonly
|
|
71
|
+
operations: readonly Operation[];
|
|
70
72
|
metadata?: GPUOperationMetadata;
|
|
71
73
|
} = Array.isArray(props)
|
|
72
|
-
? {operations: props as readonly
|
|
74
|
+
? {operations: props as readonly Operation[]}
|
|
73
75
|
: (props as {
|
|
74
76
|
id?: string;
|
|
75
|
-
operations: readonly
|
|
77
|
+
operations: readonly Operation[];
|
|
76
78
|
metadata?: GPUOperationMetadata;
|
|
77
79
|
});
|
|
78
80
|
this.id = normalized.id ?? 'gpu-composite-operation';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
+
import {setGPUComputeDispatchWorkgroups} from './gpu-command-dispatch-metadata';
|
|
5
6
|
import {type GPUCommandNode, createGPUComputeCommandNode} from './gpu-command-node';
|
|
6
7
|
import {type Binding, type Device} from '@luma.gl/core';
|
|
7
8
|
import {Kernel} from '../execution/compute/kernel';
|
|
@@ -701,50 +702,39 @@ function addKernelPass<Parameters>(
|
|
|
701
702
|
dispatchLayout?: GPUBoundedDispatchLayout;
|
|
702
703
|
}
|
|
703
704
|
): readonly GPUCommandNode<Parameters>[] {
|
|
704
|
-
const
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
705
|
+
const {x, y, z} = props.dispatchLayout ?? {x: props.dispatchCount ?? 1, y: 1, z: 1};
|
|
706
|
+
const node = createGPUComputeCommandNode<Parameters>({
|
|
707
|
+
id: props.id,
|
|
708
|
+
resources: props.resources,
|
|
709
|
+
compile: ({device}) => {
|
|
710
|
+
const bindingNames = Object.keys(props.bindings);
|
|
711
|
+
const kernel = new Kernel(device, {
|
|
712
|
+
id: props.id,
|
|
713
|
+
source: props.source,
|
|
714
|
+
shaderLayout: {
|
|
715
|
+
bindings: bindingNames.map((name, location) => ({
|
|
716
|
+
name,
|
|
717
|
+
type: 'storage' as const,
|
|
718
|
+
group: 0,
|
|
719
|
+
location
|
|
720
|
+
}))
|
|
721
|
+
}
|
|
722
|
+
});
|
|
723
|
+
return {
|
|
724
|
+
encode: ({computePass, getBuffer}) => {
|
|
725
|
+
const bindings: Record<string, Binding> = {};
|
|
726
|
+
for (const [name, view] of Object.entries(props.bindings)) {
|
|
727
|
+
bindings[name] = getViewBinding(view, getBuffer);
|
|
721
728
|
}
|
|
722
|
-
});
|
|
723
|
-
return {
|
|
724
|
-
encode: ({computePass, getBuffer}) => {
|
|
725
|
-
const bindings: Record<string, Binding> = {};
|
|
726
|
-
for (const [name, view] of Object.entries(props.bindings)) {
|
|
727
|
-
bindings[name] = getViewBinding(view, getBuffer);
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
if (props.dispatchLayout) {
|
|
731
|
-
kernel.dispatch(computePass, {
|
|
732
|
-
bindings,
|
|
733
|
-
x: props.dispatchLayout.x,
|
|
734
|
-
y: props.dispatchLayout.y,
|
|
735
|
-
z: props.dispatchLayout.z
|
|
736
|
-
});
|
|
737
|
-
} else {
|
|
738
|
-
kernel.dispatch(computePass, {bindings, x: props.dispatchCount ?? 1});
|
|
739
|
-
}
|
|
740
|
-
},
|
|
741
|
-
destroy: () => kernel.destroy()
|
|
742
|
-
};
|
|
743
|
-
}
|
|
744
|
-
})
|
|
745
|
-
);
|
|
746
729
|
|
|
747
|
-
|
|
730
|
+
kernel.dispatch(computePass, {bindings, x, y, z});
|
|
731
|
+
},
|
|
732
|
+
destroy: () => kernel.destroy()
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
});
|
|
736
|
+
|
|
737
|
+
return [setGPUComputeDispatchWorkgroups(node, [x, y, z])];
|
|
748
738
|
}
|
|
749
739
|
|
|
750
740
|
/** Returns the WGSL scalar type corresponding to a supported GPU storage format. */
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
import type {GPUCommandGraph} from './gpu-command-graph';
|
|
6
|
+
import type {GPURenderCommandNode} from './gpu-command-node';
|
|
7
|
+
|
|
8
|
+
/** Resource declarations shared by SimpleGraph and full WebGPU graphs. */
|
|
9
|
+
export type GPURenderOperationResources<Parameters = unknown> = Pick<
|
|
10
|
+
GPUCommandGraph<Parameters>,
|
|
11
|
+
'device' | 'importBuffer' | 'importTexture' | 'createTransientTexture' | 'createTextureView'
|
|
12
|
+
>;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A reusable render primitive. Each compilation creates fresh logical resources and executables.
|
|
16
|
+
* Declare every buffer and texture access so the containing graph can schedule its passes.
|
|
17
|
+
* Omit the parameter type for passes that do not inspect application parameters.
|
|
18
|
+
*/
|
|
19
|
+
export class GPURenderOperation<Parameters = unknown> {
|
|
20
|
+
readonly type = 'render-operation';
|
|
21
|
+
readonly id: string;
|
|
22
|
+
private readonly createNodes: (
|
|
23
|
+
graph: GPURenderOperationResources<Parameters>
|
|
24
|
+
) => readonly GPURenderCommandNode<Parameters>[];
|
|
25
|
+
|
|
26
|
+
constructor(props: {
|
|
27
|
+
id: string;
|
|
28
|
+
createNodes: (
|
|
29
|
+
graph: GPURenderOperationResources<Parameters>
|
|
30
|
+
) => readonly GPURenderCommandNode<Parameters>[];
|
|
31
|
+
}) {
|
|
32
|
+
this.id = props.id;
|
|
33
|
+
this.createNodes = props.createNodes;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Contributes individual passes to the containing graph; never compiles or submits it. */
|
|
37
|
+
getCommandNodes(
|
|
38
|
+
graph: GPURenderOperationResources<Parameters>
|
|
39
|
+
): readonly GPURenderCommandNode<Parameters>[] {
|
|
40
|
+
return this.createNodes(graph);
|
|
41
|
+
}
|
|
42
|
+
}
|
package/src/gpu-core/gpu-scan.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import {setGPUComputeDispatchWorkgroups} from './gpu-command-dispatch-metadata';
|
|
6
6
|
import {type GPUCommandNode, createGPUComputeCommandNode} from './gpu-command-node';
|
|
7
|
-
import {type Binding, type Device} from '@luma.gl/core';
|
|
7
|
+
import {type Binding, type Device, type ComputeShaderLayout} from '@luma.gl/core';
|
|
8
8
|
import {Kernel} from '../execution/compute/kernel';
|
|
9
9
|
import {GPUCommandGraph, type GraphDataView, GraphVectorView} from './gpu-command-graph';
|
|
10
10
|
import {
|
|
@@ -602,9 +602,39 @@ ${props.segmentFlags ? `var<workgroup> segmentScratch: array<u32, ${SCAN_WORKGRO
|
|
|
602
602
|
? getSubgroupBlockScanSource(props, sumOutput, sumBinding)
|
|
603
603
|
: portableSource;
|
|
604
604
|
|
|
605
|
+
const shaderLayout: ComputeShaderLayout = {
|
|
606
|
+
bindings: [
|
|
607
|
+
{name: 'inputValues', type: 'storage', group: 0, location: 0},
|
|
608
|
+
{name: 'outputValues', type: 'storage', group: 0, location: 1},
|
|
609
|
+
...(sumOutput ? [{name: 'sumValues', type: 'storage' as const, group: 0, location: 2}] : []),
|
|
610
|
+
...(props.segmentFlags
|
|
611
|
+
? [{name: 'segmentFlags', type: 'storage' as const, group: 0, location: 3}]
|
|
612
|
+
: []),
|
|
613
|
+
...(props.segmentPrefixes
|
|
614
|
+
? [{name: 'segmentPrefixes', type: 'storage' as const, group: 0, location: 4}]
|
|
615
|
+
: []),
|
|
616
|
+
...(segmentFlagOutput
|
|
617
|
+
? [
|
|
618
|
+
{
|
|
619
|
+
name: 'summarySegmentFlags',
|
|
620
|
+
type: 'storage' as const,
|
|
621
|
+
group: 0,
|
|
622
|
+
location: 5
|
|
623
|
+
}
|
|
624
|
+
]
|
|
625
|
+
: [])
|
|
626
|
+
]
|
|
627
|
+
};
|
|
628
|
+
|
|
605
629
|
nodes.push(
|
|
606
630
|
createGPUComputeCommandNode<Parameters>({
|
|
607
631
|
id: props.id,
|
|
632
|
+
kernel: {
|
|
633
|
+
entryPoint: 'main',
|
|
634
|
+
workgroupSize: [SCAN_WORKGROUP_SIZE, 1, 1],
|
|
635
|
+
bindings: shaderLayout.bindings,
|
|
636
|
+
source
|
|
637
|
+
},
|
|
608
638
|
workload: {
|
|
609
639
|
operation: 'GPUScan',
|
|
610
640
|
variant: strategy,
|
|
@@ -637,31 +667,7 @@ ${props.segmentFlags ? `var<workgroup> segmentScratch: array<u32, ${SCAN_WORKGRO
|
|
|
637
667
|
const kernel = new Kernel(device, {
|
|
638
668
|
id: props.id,
|
|
639
669
|
source,
|
|
640
|
-
shaderLayout
|
|
641
|
-
bindings: [
|
|
642
|
-
{name: 'inputValues', type: 'storage', group: 0, location: 0},
|
|
643
|
-
{name: 'outputValues', type: 'storage', group: 0, location: 1},
|
|
644
|
-
...(sumOutput
|
|
645
|
-
? [{name: 'sumValues', type: 'storage' as const, group: 0, location: 2}]
|
|
646
|
-
: []),
|
|
647
|
-
...(props.segmentFlags
|
|
648
|
-
? [{name: 'segmentFlags', type: 'storage' as const, group: 0, location: 3}]
|
|
649
|
-
: []),
|
|
650
|
-
...(props.segmentPrefixes
|
|
651
|
-
? [{name: 'segmentPrefixes', type: 'storage' as const, group: 0, location: 4}]
|
|
652
|
-
: []),
|
|
653
|
-
...(segmentFlagOutput
|
|
654
|
-
? [
|
|
655
|
-
{
|
|
656
|
-
name: 'summarySegmentFlags',
|
|
657
|
-
type: 'storage' as const,
|
|
658
|
-
group: 0,
|
|
659
|
-
location: 5
|
|
660
|
-
}
|
|
661
|
-
]
|
|
662
|
-
: [])
|
|
663
|
-
]
|
|
664
|
-
}
|
|
670
|
+
shaderLayout
|
|
665
671
|
});
|
|
666
672
|
return {
|
|
667
673
|
encode: ({computePass, getBuffer}) => {
|
|
@@ -854,9 +860,35 @@ ${props.offsetSegmentPrefixes ? '@group(0) @binding(3) var<storage, read> offset
|
|
|
854
860
|
${props.segmentPrefixes && props.offsetSegmentPrefixes ? 'segmentPrefixes[SEGMENT_PREFIXES_OFFSET + index] = segmentPrefix | offsetSegmentPrefix;' : ''}
|
|
855
861
|
}
|
|
856
862
|
}`;
|
|
863
|
+
const shaderLayout: ComputeShaderLayout = {
|
|
864
|
+
bindings: [
|
|
865
|
+
{name: 'outputValues', type: 'storage', group: 0, location: 0},
|
|
866
|
+
{name: 'offsets', type: 'storage', group: 0, location: 1},
|
|
867
|
+
...(props.segmentPrefixes
|
|
868
|
+
? [{name: 'segmentPrefixes', type: 'storage' as const, group: 0, location: 2}]
|
|
869
|
+
: []),
|
|
870
|
+
...(props.offsetSegmentPrefixes
|
|
871
|
+
? [
|
|
872
|
+
{
|
|
873
|
+
name: 'offsetSegmentPrefixes',
|
|
874
|
+
type: 'storage' as const,
|
|
875
|
+
group: 0,
|
|
876
|
+
location: 3
|
|
877
|
+
}
|
|
878
|
+
]
|
|
879
|
+
: [])
|
|
880
|
+
]
|
|
881
|
+
};
|
|
882
|
+
|
|
857
883
|
nodes.push(
|
|
858
884
|
createGPUComputeCommandNode<Parameters>({
|
|
859
885
|
id: props.id,
|
|
886
|
+
kernel: {
|
|
887
|
+
entryPoint: 'main',
|
|
888
|
+
workgroupSize: [SCAN_WORKGROUP_SIZE, 1, 1],
|
|
889
|
+
bindings: shaderLayout.bindings,
|
|
890
|
+
source
|
|
891
|
+
},
|
|
860
892
|
workload: {
|
|
861
893
|
operation: 'GPUScan',
|
|
862
894
|
commandCount: 1,
|
|
@@ -889,25 +921,7 @@ ${props.offsetSegmentPrefixes ? '@group(0) @binding(3) var<storage, read> offset
|
|
|
889
921
|
const kernel = new Kernel(device, {
|
|
890
922
|
id: props.id,
|
|
891
923
|
source,
|
|
892
|
-
shaderLayout
|
|
893
|
-
bindings: [
|
|
894
|
-
{name: 'outputValues', type: 'storage', group: 0, location: 0},
|
|
895
|
-
{name: 'offsets', type: 'storage', group: 0, location: 1},
|
|
896
|
-
...(props.segmentPrefixes
|
|
897
|
-
? [{name: 'segmentPrefixes', type: 'storage' as const, group: 0, location: 2}]
|
|
898
|
-
: []),
|
|
899
|
-
...(props.offsetSegmentPrefixes
|
|
900
|
-
? [
|
|
901
|
-
{
|
|
902
|
-
name: 'offsetSegmentPrefixes',
|
|
903
|
-
type: 'storage' as const,
|
|
904
|
-
group: 0,
|
|
905
|
-
location: 3
|
|
906
|
-
}
|
|
907
|
-
]
|
|
908
|
-
: [])
|
|
909
|
-
]
|
|
910
|
-
}
|
|
924
|
+
shaderLayout
|
|
911
925
|
});
|
|
912
926
|
return {
|
|
913
927
|
encode: ({computePass, getBuffer}) => {
|
|
@@ -6,6 +6,7 @@ import {type GPUCommandNode, createGPUComputeCommandNode} from './gpu-command-no
|
|
|
6
6
|
import type {Binding} from '@luma.gl/core';
|
|
7
7
|
import {Kernel} from '../execution/compute/kernel';
|
|
8
8
|
import {GPUCommandGraph, type GraphDataView} from './gpu-command-graph';
|
|
9
|
+
import {getBoundedWorkgroupLayout, type GPUBoundedDispatchLayout} from './gpu-dispatch-utils';
|
|
9
10
|
import {
|
|
10
11
|
getViewBinding,
|
|
11
12
|
getViewElementOffset,
|
|
@@ -22,7 +23,7 @@ export type GPUSegmentedReductionOperation = 'sum' | 'min' | 'max';
|
|
|
22
23
|
export type GPUSegmentedReductionProps<T extends GPUScalarFormat = GPUScalarFormat> = {
|
|
23
24
|
id?: string;
|
|
24
25
|
input: GraphDataView<T>;
|
|
25
|
-
/**
|
|
26
|
+
/** Nondecreasing element offsets relative to input. Length must equal output.length + 1. */
|
|
26
27
|
segmentOffsets: GraphDataView<'uint32'>;
|
|
27
28
|
output: GraphDataView<T>;
|
|
28
29
|
operation: GPUSegmentedReductionOperation;
|
|
@@ -73,15 +74,20 @@ export class GPUSegmentedReduction<T extends GPUScalarFormat = GPUScalarFormat>
|
|
|
73
74
|
}
|
|
74
75
|
if (this.output.length === 0) return nodes;
|
|
75
76
|
|
|
76
|
-
const
|
|
77
|
+
const dispatch = getBoundedWorkgroupLayout(
|
|
78
|
+
this.id,
|
|
79
|
+
this.output.length,
|
|
80
|
+
graph.device.limits.maxComputeWorkgroupsPerDimension
|
|
81
|
+
);
|
|
82
|
+
const source = makeShaderSource(this, dispatch);
|
|
77
83
|
nodes.push(
|
|
78
84
|
createGPUComputeCommandNode<Parameters>({
|
|
79
85
|
id: this.id,
|
|
80
86
|
workload: {
|
|
81
87
|
operation: 'GPUSegmentedReduction',
|
|
82
88
|
commandCount: 1,
|
|
83
|
-
maximumWorkgroupCount:
|
|
84
|
-
maximumInvocationCount:
|
|
89
|
+
maximumWorkgroupCount: dispatch.x * dispatch.y * dispatch.z,
|
|
90
|
+
maximumInvocationCount: dispatch.x * dispatch.y * dispatch.z * WORKGROUP_SIZE,
|
|
85
91
|
readByteLength: this.input.length * 4 + this.segmentOffsets.length * 4,
|
|
86
92
|
writeByteLength: this.output.length * 4
|
|
87
93
|
},
|
|
@@ -110,7 +116,7 @@ export class GPUSegmentedReduction<T extends GPUScalarFormat = GPUScalarFormat>
|
|
|
110
116
|
outputValues: getViewBinding(this.output, getBuffer)
|
|
111
117
|
};
|
|
112
118
|
|
|
113
|
-
kernel.dispatch(computePass, {bindings,
|
|
119
|
+
kernel.dispatch(computePass, {bindings, ...dispatch});
|
|
114
120
|
},
|
|
115
121
|
destroy: () => kernel.destroy()
|
|
116
122
|
};
|
|
@@ -122,7 +128,10 @@ export class GPUSegmentedReduction<T extends GPUScalarFormat = GPUScalarFormat>
|
|
|
122
128
|
}
|
|
123
129
|
}
|
|
124
130
|
|
|
125
|
-
function makeShaderSource(
|
|
131
|
+
function makeShaderSource(
|
|
132
|
+
reduction: GPUSegmentedReduction,
|
|
133
|
+
dispatch: GPUBoundedDispatchLayout
|
|
134
|
+
): string {
|
|
126
135
|
const type =
|
|
127
136
|
reduction.input.format === 'uint32'
|
|
128
137
|
? 'u32'
|
|
@@ -161,9 +170,10 @@ var<workgroup> scratch: array<${type}, ${WORKGROUP_SIZE}>;
|
|
|
161
170
|
fn combine(a: ${type}, b: ${type}) -> ${type} { return ${combine}; }
|
|
162
171
|
@compute @workgroup_size(${WORKGROUP_SIZE})
|
|
163
172
|
fn main(@builtin(workgroup_id) wg: vec3u, @builtin(local_invocation_index) lane: u32) {
|
|
164
|
-
let segment = wg.x;
|
|
165
|
-
|
|
166
|
-
let
|
|
173
|
+
let segment = (wg.z * ${dispatch.y}u + wg.y) * ${dispatch.x}u + wg.x;
|
|
174
|
+
if (segment >= ${reduction.output.length}u) { return; }
|
|
175
|
+
let begin = min(segmentOffsets[SEGMENT_OFFSET + segment], ${reduction.input.length}u);
|
|
176
|
+
let end = min(segmentOffsets[SEGMENT_OFFSET + segment + 1u], ${reduction.input.length}u);
|
|
167
177
|
var value: ${type} = ${identity};
|
|
168
178
|
var i = begin + lane;
|
|
169
179
|
loop {
|
|
@@ -181,7 +191,7 @@ fn main(@builtin(workgroup_id) wg: vec3u, @builtin(local_invocation_index) lane:
|
|
|
181
191
|
stride = stride / 2u;
|
|
182
192
|
}
|
|
183
193
|
if (lane == 0u) {
|
|
184
|
-
outputValues[OUTPUT_OFFSET + segment] = select(scratch[0], ${type}(
|
|
194
|
+
outputValues[OUTPUT_OFFSET + segment] = select(scratch[0], ${type}(0), begin >= end);
|
|
185
195
|
}
|
|
186
196
|
}`;
|
|
187
197
|
}
|