@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
|
@@ -22,6 +22,7 @@ __export(gpu_segmented_scan_exports, {
|
|
|
22
22
|
module.exports = __toCommonJS(gpu_segmented_scan_exports);
|
|
23
23
|
var import_gpu_command_node = require("./gpu-command-node.cjs");
|
|
24
24
|
var import_kernel = require("../execution/compute/kernel.cjs");
|
|
25
|
+
var import_gpu_dispatch_utils = require("./gpu-dispatch-utils.cjs");
|
|
25
26
|
var import_graph_data_view_utils = require("./graph-data-view-utils.cjs");
|
|
26
27
|
const WORKGROUP_SIZE = 256;
|
|
27
28
|
class GPUSegmentedScan {
|
|
@@ -55,16 +56,31 @@ class GPUSegmentedScan {
|
|
|
55
56
|
throw new Error(`${this.id} views must belong to target graph`);
|
|
56
57
|
}
|
|
57
58
|
const segmentCount = this.segmentOffsets.length - 1;
|
|
58
|
-
if (segmentCount === 0)
|
|
59
|
+
if (segmentCount === 0 || this.input.length === 0)
|
|
59
60
|
return nodes;
|
|
60
|
-
const
|
|
61
|
+
const dispatch = (0, import_gpu_dispatch_utils.getBoundedWorkgroupLayout)(this.id, segmentCount, graph.device.limits.maxComputeWorkgroupsPerDimension);
|
|
62
|
+
const workgroupCount = dispatch.x * dispatch.y * dispatch.z;
|
|
63
|
+
const source = makeShaderSource(this, dispatch, segmentCount);
|
|
64
|
+
const shaderLayout = {
|
|
65
|
+
bindings: [
|
|
66
|
+
{ name: "inputValues", type: "read-only-storage", group: 0, location: 0 },
|
|
67
|
+
{ name: "segmentOffsets", type: "read-only-storage", group: 0, location: 1 },
|
|
68
|
+
{ name: "outputValues", type: "storage", group: 0, location: 2 }
|
|
69
|
+
]
|
|
70
|
+
};
|
|
61
71
|
nodes.push((0, import_gpu_command_node.createGPUComputeCommandNode)({
|
|
62
72
|
id: this.id,
|
|
73
|
+
kernel: {
|
|
74
|
+
entryPoint: "main",
|
|
75
|
+
workgroupSize: [WORKGROUP_SIZE, 1, 1],
|
|
76
|
+
bindings: shaderLayout.bindings,
|
|
77
|
+
source
|
|
78
|
+
},
|
|
63
79
|
workload: {
|
|
64
80
|
operation: "GPUSegmentedScan",
|
|
65
81
|
commandCount: 1,
|
|
66
|
-
maximumWorkgroupCount:
|
|
67
|
-
maximumInvocationCount:
|
|
82
|
+
maximumWorkgroupCount: workgroupCount,
|
|
83
|
+
maximumInvocationCount: workgroupCount * WORKGROUP_SIZE,
|
|
68
84
|
readByteLength: this.input.length * 4 + this.segmentOffsets.length * 4,
|
|
69
85
|
writeByteLength: this.output.length * 4
|
|
70
86
|
},
|
|
@@ -77,13 +93,7 @@ class GPUSegmentedScan {
|
|
|
77
93
|
const kernel = new import_kernel.Kernel(device, {
|
|
78
94
|
id: this.id,
|
|
79
95
|
source,
|
|
80
|
-
shaderLayout
|
|
81
|
-
bindings: [
|
|
82
|
-
{ name: "inputValues", type: "read-only-storage", group: 0, location: 0 },
|
|
83
|
-
{ name: "segmentOffsets", type: "read-only-storage", group: 0, location: 1 },
|
|
84
|
-
{ name: "outputValues", type: "storage", group: 0, location: 2 }
|
|
85
|
-
]
|
|
86
|
-
}
|
|
96
|
+
shaderLayout
|
|
87
97
|
});
|
|
88
98
|
return {
|
|
89
99
|
encode: ({ computePass, getBuffer }) => {
|
|
@@ -92,7 +102,7 @@ class GPUSegmentedScan {
|
|
|
92
102
|
segmentOffsets: (0, import_graph_data_view_utils.getViewBinding)(this.segmentOffsets, getBuffer),
|
|
93
103
|
outputValues: (0, import_graph_data_view_utils.getViewBinding)(this.output, getBuffer)
|
|
94
104
|
};
|
|
95
|
-
kernel.dispatch(computePass, { bindings,
|
|
105
|
+
kernel.dispatch(computePass, { bindings, ...dispatch });
|
|
96
106
|
},
|
|
97
107
|
destroy: () => kernel.destroy()
|
|
98
108
|
};
|
|
@@ -101,10 +111,57 @@ class GPUSegmentedScan {
|
|
|
101
111
|
return nodes;
|
|
102
112
|
}
|
|
103
113
|
}
|
|
104
|
-
function makeShaderSource(scan) {
|
|
105
|
-
return `const INPUT_OFFSET:
|
|
106
|
-
|
|
107
|
-
|
|
114
|
+
function makeShaderSource(scan, dispatch, segmentCount) {
|
|
115
|
+
return `const INPUT_OFFSET: u32 = ${(0, import_graph_data_view_utils.getViewElementOffset)(scan.input)}u;
|
|
116
|
+
const SEGMENT_OFFSET: u32 = ${(0, import_graph_data_view_utils.getViewElementOffset)(scan.segmentOffsets)}u;
|
|
117
|
+
const OUTPUT_OFFSET: u32 = ${(0, import_graph_data_view_utils.getViewElementOffset)(scan.output)}u;
|
|
118
|
+
const INPUT_LENGTH: u32 = ${scan.input.length}u;
|
|
119
|
+
@group(0) @binding(0) var<storage, read> inputValues: array<u32>;
|
|
120
|
+
@group(0) @binding(1) var<storage, read> segmentOffsets: array<u32>;
|
|
121
|
+
@group(0) @binding(2) var<storage, read_write> outputValues: array<u32>;
|
|
122
|
+
var<workgroup> prefixes: array<u32, ${WORKGROUP_SIZE}>;
|
|
123
|
+
var<workgroup> segmentBounds: array<u32, 2>;
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
@compute @workgroup_size(${WORKGROUP_SIZE})
|
|
127
|
+
fn main(
|
|
128
|
+
@builtin(workgroup_id) workgroup: vec3u,
|
|
129
|
+
@builtin(local_invocation_index) lane: u32
|
|
130
|
+
) {
|
|
131
|
+
let segment = (workgroup.z * ${dispatch.y}u + workgroup.y) * ${dispatch.x}u + workgroup.x;
|
|
132
|
+
if (segment >= ${segmentCount}u) { return; }
|
|
133
|
+
if (lane == 0u) {
|
|
134
|
+
segmentBounds[0] = min(segmentOffsets[SEGMENT_OFFSET + segment], INPUT_LENGTH);
|
|
135
|
+
segmentBounds[1] = min(segmentOffsets[SEGMENT_OFFSET + segment + 1u], INPUT_LENGTH);
|
|
136
|
+
}
|
|
137
|
+
let begin = workgroupUniformLoad(&segmentBounds[0]);
|
|
138
|
+
let end = workgroupUniformLoad(&segmentBounds[1]);
|
|
139
|
+
var carry = 0u;
|
|
140
|
+
for (var tile = begin; tile < end;) {
|
|
141
|
+
let tileLength = min(end - tile, ${WORKGROUP_SIZE}u);
|
|
142
|
+
var value = 0u;
|
|
143
|
+
if (lane < tileLength) {
|
|
144
|
+
value = inputValues[INPUT_OFFSET + tile + lane];
|
|
145
|
+
}
|
|
146
|
+
prefixes[lane] = value;
|
|
147
|
+
workgroupBarrier();
|
|
148
|
+
|
|
149
|
+
for (var stride = 1u; stride < ${WORKGROUP_SIZE}u; stride *= 2u) {
|
|
150
|
+
var previous = 0u;
|
|
151
|
+
if (lane >= stride) { previous = prefixes[lane - stride]; }
|
|
152
|
+
workgroupBarrier();
|
|
153
|
+
prefixes[lane] += previous;
|
|
154
|
+
workgroupBarrier();
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (lane < tileLength) {
|
|
158
|
+
outputValues[OUTPUT_OFFSET + tile + lane] = carry + prefixes[lane]${scan.mode === "exclusive" ? " - value" : ""};
|
|
159
|
+
}
|
|
160
|
+
carry += prefixes[${WORKGROUP_SIZE - 1}u];
|
|
161
|
+
workgroupBarrier();
|
|
162
|
+
tile += tileLength;
|
|
163
|
+
}
|
|
164
|
+
}`;
|
|
108
165
|
}
|
|
109
166
|
// Annotate the CommonJS export names for ESM import in node:
|
|
110
167
|
0 && (module.exports = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gpu-segmented-scan.d.ts","sourceRoot":"","sources":["../../src/gpu-core/gpu-segmented-scan.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,KAAK,cAAc,EAA8B,8BAA2B;AAGpF,OAAO,EAAC,eAAe,EAAE,KAAK,aAAa,EAAC,+BAA4B;
|
|
1
|
+
{"version":3,"file":"gpu-segmented-scan.d.ts","sourceRoot":"","sources":["../../src/gpu-core/gpu-segmented-scan.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,KAAK,cAAc,EAA8B,8BAA2B;AAGpF,OAAO,EAAC,eAAe,EAAE,KAAK,aAAa,EAAC,+BAA4B;AAUxE,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,WAAW,CAAC;AAE7D,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,4BAA4B;IAC5B,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC/B,iEAAiE;IACjE,cAAc,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACxC,uEAAuE;IACvE,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE,oBAAoB,CAAC;CAC7B,CAAC;AAEF,gFAAgF;AAChF,qBAAa,gBAAgB;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACxC,QAAQ,CAAC,cAAc,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACjD,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACzC,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;gBAExB,KAAK,EAAE,qBAAqB;IAsBxC,eAAe,CAAC,UAAU,EACxB,KAAK,EAAE,eAAe,CAAC,UAAU,CAAC,GACjC,SAAS,cAAc,CAAC,UAAU,CAAC,EAAE;CAoEzC"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
import { createGPUComputeCommandNode } from "./gpu-command-node.js";
|
|
5
5
|
import { Kernel } from "../execution/compute/kernel.js";
|
|
6
|
+
import { getBoundedWorkgroupLayout } from "./gpu-dispatch-utils.js";
|
|
6
7
|
import { getViewBinding, getViewElementOffset, validatePackedUint32View } from "./graph-data-view-utils.js";
|
|
7
8
|
const WORKGROUP_SIZE = 256;
|
|
8
9
|
/** Performs an independent uint32 prefix sum inside every CSR-style segment. */
|
|
@@ -38,16 +39,31 @@ export class GPUSegmentedScan {
|
|
|
38
39
|
throw new Error(`${this.id} views must belong to target graph`);
|
|
39
40
|
}
|
|
40
41
|
const segmentCount = this.segmentOffsets.length - 1;
|
|
41
|
-
if (segmentCount === 0)
|
|
42
|
+
if (segmentCount === 0 || this.input.length === 0)
|
|
42
43
|
return nodes;
|
|
43
|
-
const
|
|
44
|
+
const dispatch = getBoundedWorkgroupLayout(this.id, segmentCount, graph.device.limits.maxComputeWorkgroupsPerDimension);
|
|
45
|
+
const workgroupCount = dispatch.x * dispatch.y * dispatch.z;
|
|
46
|
+
const source = makeShaderSource(this, dispatch, segmentCount);
|
|
47
|
+
const shaderLayout = {
|
|
48
|
+
bindings: [
|
|
49
|
+
{ name: 'inputValues', type: 'read-only-storage', group: 0, location: 0 },
|
|
50
|
+
{ name: 'segmentOffsets', type: 'read-only-storage', group: 0, location: 1 },
|
|
51
|
+
{ name: 'outputValues', type: 'storage', group: 0, location: 2 }
|
|
52
|
+
]
|
|
53
|
+
};
|
|
44
54
|
nodes.push(createGPUComputeCommandNode({
|
|
45
55
|
id: this.id,
|
|
56
|
+
kernel: {
|
|
57
|
+
entryPoint: 'main',
|
|
58
|
+
workgroupSize: [WORKGROUP_SIZE, 1, 1],
|
|
59
|
+
bindings: shaderLayout.bindings,
|
|
60
|
+
source
|
|
61
|
+
},
|
|
46
62
|
workload: {
|
|
47
63
|
operation: 'GPUSegmentedScan',
|
|
48
64
|
commandCount: 1,
|
|
49
|
-
maximumWorkgroupCount:
|
|
50
|
-
maximumInvocationCount:
|
|
65
|
+
maximumWorkgroupCount: workgroupCount,
|
|
66
|
+
maximumInvocationCount: workgroupCount * WORKGROUP_SIZE,
|
|
51
67
|
readByteLength: this.input.length * 4 + this.segmentOffsets.length * 4,
|
|
52
68
|
writeByteLength: this.output.length * 4
|
|
53
69
|
},
|
|
@@ -60,13 +76,7 @@ export class GPUSegmentedScan {
|
|
|
60
76
|
const kernel = new Kernel(device, {
|
|
61
77
|
id: this.id,
|
|
62
78
|
source,
|
|
63
|
-
shaderLayout
|
|
64
|
-
bindings: [
|
|
65
|
-
{ name: 'inputValues', type: 'read-only-storage', group: 0, location: 0 },
|
|
66
|
-
{ name: 'segmentOffsets', type: 'read-only-storage', group: 0, location: 1 },
|
|
67
|
-
{ name: 'outputValues', type: 'storage', group: 0, location: 2 }
|
|
68
|
-
]
|
|
69
|
-
}
|
|
79
|
+
shaderLayout
|
|
70
80
|
});
|
|
71
81
|
return {
|
|
72
82
|
encode: ({ computePass, getBuffer }) => {
|
|
@@ -75,7 +85,7 @@ export class GPUSegmentedScan {
|
|
|
75
85
|
segmentOffsets: getViewBinding(this.segmentOffsets, getBuffer),
|
|
76
86
|
outputValues: getViewBinding(this.output, getBuffer)
|
|
77
87
|
};
|
|
78
|
-
kernel.dispatch(computePass, { bindings,
|
|
88
|
+
kernel.dispatch(computePass, { bindings, ...dispatch });
|
|
79
89
|
},
|
|
80
90
|
destroy: () => kernel.destroy()
|
|
81
91
|
};
|
|
@@ -84,9 +94,56 @@ export class GPUSegmentedScan {
|
|
|
84
94
|
return nodes;
|
|
85
95
|
}
|
|
86
96
|
}
|
|
87
|
-
function makeShaderSource(scan) {
|
|
88
|
-
return `const INPUT_OFFSET:
|
|
89
|
-
|
|
90
|
-
|
|
97
|
+
function makeShaderSource(scan, dispatch, segmentCount) {
|
|
98
|
+
return `const INPUT_OFFSET: u32 = ${getViewElementOffset(scan.input)}u;
|
|
99
|
+
const SEGMENT_OFFSET: u32 = ${getViewElementOffset(scan.segmentOffsets)}u;
|
|
100
|
+
const OUTPUT_OFFSET: u32 = ${getViewElementOffset(scan.output)}u;
|
|
101
|
+
const INPUT_LENGTH: u32 = ${scan.input.length}u;
|
|
102
|
+
@group(0) @binding(0) var<storage, read> inputValues: array<u32>;
|
|
103
|
+
@group(0) @binding(1) var<storage, read> segmentOffsets: array<u32>;
|
|
104
|
+
@group(0) @binding(2) var<storage, read_write> outputValues: array<u32>;
|
|
105
|
+
var<workgroup> prefixes: array<u32, ${WORKGROUP_SIZE}>;
|
|
106
|
+
var<workgroup> segmentBounds: array<u32, 2>;
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
@compute @workgroup_size(${WORKGROUP_SIZE})
|
|
110
|
+
fn main(
|
|
111
|
+
@builtin(workgroup_id) workgroup: vec3u,
|
|
112
|
+
@builtin(local_invocation_index) lane: u32
|
|
113
|
+
) {
|
|
114
|
+
let segment = (workgroup.z * ${dispatch.y}u + workgroup.y) * ${dispatch.x}u + workgroup.x;
|
|
115
|
+
if (segment >= ${segmentCount}u) { return; }
|
|
116
|
+
if (lane == 0u) {
|
|
117
|
+
segmentBounds[0] = min(segmentOffsets[SEGMENT_OFFSET + segment], INPUT_LENGTH);
|
|
118
|
+
segmentBounds[1] = min(segmentOffsets[SEGMENT_OFFSET + segment + 1u], INPUT_LENGTH);
|
|
119
|
+
}
|
|
120
|
+
let begin = workgroupUniformLoad(&segmentBounds[0]);
|
|
121
|
+
let end = workgroupUniformLoad(&segmentBounds[1]);
|
|
122
|
+
var carry = 0u;
|
|
123
|
+
for (var tile = begin; tile < end;) {
|
|
124
|
+
let tileLength = min(end - tile, ${WORKGROUP_SIZE}u);
|
|
125
|
+
var value = 0u;
|
|
126
|
+
if (lane < tileLength) {
|
|
127
|
+
value = inputValues[INPUT_OFFSET + tile + lane];
|
|
128
|
+
}
|
|
129
|
+
prefixes[lane] = value;
|
|
130
|
+
workgroupBarrier();
|
|
131
|
+
|
|
132
|
+
for (var stride = 1u; stride < ${WORKGROUP_SIZE}u; stride *= 2u) {
|
|
133
|
+
var previous = 0u;
|
|
134
|
+
if (lane >= stride) { previous = prefixes[lane - stride]; }
|
|
135
|
+
workgroupBarrier();
|
|
136
|
+
prefixes[lane] += previous;
|
|
137
|
+
workgroupBarrier();
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (lane < tileLength) {
|
|
141
|
+
outputValues[OUTPUT_OFFSET + tile + lane] = carry + prefixes[lane]${scan.mode === 'exclusive' ? ' - value' : ''};
|
|
142
|
+
}
|
|
143
|
+
carry += prefixes[${WORKGROUP_SIZE - 1}u];
|
|
144
|
+
workgroupBarrier();
|
|
145
|
+
tile += tileLength;
|
|
146
|
+
}
|
|
147
|
+
}`;
|
|
91
148
|
}
|
|
92
149
|
//# sourceMappingURL=gpu-segmented-scan.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gpu-segmented-scan.js","sourceRoot":"","sources":["../../src/gpu-core/gpu-segmented-scan.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAE5D,OAAO,EAAsB,2BAA2B,EAAC,8BAA2B;AAEpF,OAAO,EAAC,MAAM,EAAC,uCAAoC;AAEnD,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,wBAAwB,EACzB,mCAAgC;AAEjC,MAAM,cAAc,GAAG,GAAG,CAAC;AAe3B,gFAAgF;AAChF,MAAM,OAAO,gBAAgB;IAClB,EAAE,CAAS;IACX,KAAK,CAA0B;IAC/B,cAAc,CAA0B;IACxC,MAAM,CAA0B;IAChC,IAAI,CAAuB;IAEpC,YAAY,KAA4B;QACtC,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,oBAAoB,CAAC;QAC3C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;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B,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC;8BACxC,oBAAoB,CAAC,IAAI,CAAC,cAAc,CAAC;6BAC1C,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC;4BAClC,IAAI,CAAC,KAAK,CAAC,MAAM;;;;sCAIP,cAAc;;;;2BAIzB,cAAc;;;;;iCAKR,QAAQ,CAAC,CAAC,sBAAsB,QAAQ,CAAC,CAAC;mBACxD,YAAY;;;;;;;;;uCASQ,cAAc;;;;;;;;qCAQhB,cAAc;;;;;;;;;0EASuB,IAAI,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;;wBAE7F,cAAc,GAAG,CAAC;;;;EAIxC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var gpu_semantic_aggregation_operation_exports = {};
|
|
19
|
+
__export(gpu_semantic_aggregation_operation_exports, {
|
|
20
|
+
GPUGraphGroupAggregation: () => GPUGraphGroupAggregation,
|
|
21
|
+
GPUGraphReduction: () => GPUGraphReduction
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(gpu_semantic_aggregation_operation_exports);
|
|
24
|
+
var import_core = require("@luma.gl/core");
|
|
25
|
+
var import_gpu_graph_value = require("./gpu-graph-value.cjs");
|
|
26
|
+
var import_gpu_operation_contract = require("./gpu-operation-contract.cjs");
|
|
27
|
+
class GPUGraphGroupAggregation {
|
|
28
|
+
/** Semantic operation discriminator. */
|
|
29
|
+
type = "group-aggregation";
|
|
30
|
+
/** Stable operation identifier. */
|
|
31
|
+
id;
|
|
32
|
+
/** Immutable logical operation arguments. */
|
|
33
|
+
props;
|
|
34
|
+
/** Describe grouped reduction without allocating or reading GPU storage. */
|
|
35
|
+
constructor(props) {
|
|
36
|
+
(0, import_core.assert)(props.groupCount === void 0 || Number.isSafeInteger(props.groupCount) && props.groupCount > 0);
|
|
37
|
+
this.id = props.id ?? `${(0, import_gpu_operation_contract.getGPUOperationValueName)(props.output)}-group-aggregation`;
|
|
38
|
+
this.props = Object.freeze({ ...props });
|
|
39
|
+
}
|
|
40
|
+
/** Logical dependencies and optional inferred output shape. */
|
|
41
|
+
get contract() {
|
|
42
|
+
const { keys, mask, output, groupCount } = this.props;
|
|
43
|
+
const values = this.props.operation === "count" ? void 0 : this.props.values;
|
|
44
|
+
return {
|
|
45
|
+
outputs: ({ getValue }) => {
|
|
46
|
+
for (const input of [keys, mask]) {
|
|
47
|
+
if (input) {
|
|
48
|
+
const descriptor = getValue((0, import_gpu_operation_contract.getGPUOperationValueName)(input));
|
|
49
|
+
(0, import_core.assert)(descriptor.type === "vector" && descriptor.format === "uint32");
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (values) {
|
|
53
|
+
const descriptor = getValue((0, import_gpu_operation_contract.getGPUOperationValueName)(values));
|
|
54
|
+
(0, import_core.assert)(descriptor.type === "vector" && descriptor.format === "float32");
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
[(0, import_gpu_operation_contract.getGPUOperationValueName)(output)]: import_gpu_graph_value.gpuGraph.vector(this.props.operation === "count" ? "uint32" : "float32", { length: groupCount })
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
values: [
|
|
61
|
+
{ value: keys, access: "read" },
|
|
62
|
+
...values ? [{ value: values, access: "read" }] : [],
|
|
63
|
+
...mask ? [{ value: mask, access: "read" }] : [],
|
|
64
|
+
{ value: output, access: "write" }
|
|
65
|
+
]
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
class GPUGraphReduction {
|
|
70
|
+
/** Semantic operation discriminator. */
|
|
71
|
+
type = "reduction";
|
|
72
|
+
/** Stable operation identifier. */
|
|
73
|
+
id;
|
|
74
|
+
/** Immutable logical operation arguments. */
|
|
75
|
+
props;
|
|
76
|
+
/** Describe a scalar reduction without allocating or reading GPU storage. */
|
|
77
|
+
constructor(props) {
|
|
78
|
+
this.id = props.id ?? `${(0, import_gpu_operation_contract.getGPUOperationValueName)(props.output)}-reduction`;
|
|
79
|
+
this.props = Object.freeze({ ...props });
|
|
80
|
+
}
|
|
81
|
+
/** Infer a packed one-row result, or two rows for extent. */
|
|
82
|
+
get contract() {
|
|
83
|
+
const { input, mask, output, operation } = this.props;
|
|
84
|
+
return {
|
|
85
|
+
outputs: ({ getValue }) => {
|
|
86
|
+
const descriptor = getValue((0, import_gpu_operation_contract.getGPUOperationValueName)(input));
|
|
87
|
+
(0, import_core.assert)(descriptor.type === "vector");
|
|
88
|
+
const { format } = descriptor;
|
|
89
|
+
(0, import_core.assert)(format === "uint32" || format === "sint32" || format === "float32");
|
|
90
|
+
if (mask) {
|
|
91
|
+
const selection = getValue((0, import_gpu_operation_contract.getGPUOperationValueName)(mask));
|
|
92
|
+
(0, import_core.assert)(selection.type === "vector" && selection.format === "uint32");
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
[(0, import_gpu_operation_contract.getGPUOperationValueName)(output)]: import_gpu_graph_value.gpuGraph.vector(format, {
|
|
96
|
+
length: operation === "extent" ? 2 : 1
|
|
97
|
+
})
|
|
98
|
+
};
|
|
99
|
+
},
|
|
100
|
+
values: [
|
|
101
|
+
{ value: input, access: "read" },
|
|
102
|
+
...mask ? [{ value: mask, access: "read" }] : [],
|
|
103
|
+
{ value: output, access: "write" }
|
|
104
|
+
]
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
109
|
+
0 && (module.exports = {
|
|
110
|
+
GPUGraphGroupAggregation,
|
|
111
|
+
GPUGraphReduction
|
|
112
|
+
});
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { type GPUGraphVector } from "./gpu-graph-value.js";
|
|
2
|
+
import type { GPUOperation } from "./gpu-operation.js";
|
|
3
|
+
import { type GPUOperationContract } from "./gpu-operation-contract.js";
|
|
4
|
+
import type { GPUGroupAggregationOperation } from "./gpu-group-aggregation.js";
|
|
5
|
+
import type { GPUReductionOperation } from "./gpu-reduction.js";
|
|
6
|
+
type ScalarFormat = 'uint32' | 'sint32' | 'float32';
|
|
7
|
+
/** Logical inputs and destination for dense grouped statistics. */
|
|
8
|
+
export type GPUGraphGroupAggregationProps = {
|
|
9
|
+
/** Stable operation identifier. Defaults to the output name plus a suffix. */
|
|
10
|
+
id?: string;
|
|
11
|
+
/** Dense unsigned group keys; out-of-range keys are ignored. */
|
|
12
|
+
keys: string | GPUGraphVector<'uint32'>;
|
|
13
|
+
/** Optional row selection: zero rejects, nonzero accepts. */
|
|
14
|
+
mask?: string | GPUGraphVector<'uint32'>;
|
|
15
|
+
/** Output cardinality. May be omitted when output storage/shape is declared separately. */
|
|
16
|
+
groupCount?: number;
|
|
17
|
+
} & ({
|
|
18
|
+
/** Count accepted rows per group. */
|
|
19
|
+
operation: 'count';
|
|
20
|
+
/** Logical unsigned count destination. */
|
|
21
|
+
output: string | GPUGraphVector<'uint32'>;
|
|
22
|
+
values?: never;
|
|
23
|
+
} | {
|
|
24
|
+
/** Statistic computed over finite float32 contributions. */
|
|
25
|
+
operation: Exclude<GPUGroupAggregationOperation, 'count'>;
|
|
26
|
+
/** One float32 contribution per key. */
|
|
27
|
+
values: string | GPUGraphVector<'float32'>;
|
|
28
|
+
/** Logical float32 statistic destination. */
|
|
29
|
+
output: string | GPUGraphVector<'float32'>;
|
|
30
|
+
});
|
|
31
|
+
/** Dense grouped statistics lowered to GPUGroupAggregation by GPUGraphCompiler. */
|
|
32
|
+
export declare class GPUGraphGroupAggregation implements GPUOperation {
|
|
33
|
+
/** Semantic operation discriminator. */
|
|
34
|
+
readonly type = "group-aggregation";
|
|
35
|
+
/** Stable operation identifier. */
|
|
36
|
+
readonly id: string;
|
|
37
|
+
/** Immutable logical operation arguments. */
|
|
38
|
+
readonly props: Readonly<GPUGraphGroupAggregationProps>;
|
|
39
|
+
/** Describe grouped reduction without allocating or reading GPU storage. */
|
|
40
|
+
constructor(props: GPUGraphGroupAggregationProps);
|
|
41
|
+
/** Logical dependencies and optional inferred output shape. */
|
|
42
|
+
get contract(): GPUOperationContract;
|
|
43
|
+
}
|
|
44
|
+
/** Logical scalar reduction inputs and destination. */
|
|
45
|
+
export type GPUGraphReductionProps = {
|
|
46
|
+
/** Stable operation identifier. Defaults to the output name plus a suffix. */
|
|
47
|
+
id?: string;
|
|
48
|
+
/** Scalar uint32, sint32, or float32 input. */
|
|
49
|
+
input: string | GPUGraphVector<ScalarFormat>;
|
|
50
|
+
/** Optional nonzero/zero row selection. */
|
|
51
|
+
mask?: string | GPUGraphVector<'uint32'>;
|
|
52
|
+
/** Statistic to compute; extent produces minimum followed by maximum. */
|
|
53
|
+
operation: GPUReductionOperation;
|
|
54
|
+
/** Logical result destination, with the same format as input. */
|
|
55
|
+
output: string | GPUGraphVector<ScalarFormat>;
|
|
56
|
+
};
|
|
57
|
+
/** Scalar statistics lowered to GPUReduction by GPUGraphCompiler. */
|
|
58
|
+
export declare class GPUGraphReduction implements GPUOperation {
|
|
59
|
+
/** Semantic operation discriminator. */
|
|
60
|
+
readonly type = "reduction";
|
|
61
|
+
/** Stable operation identifier. */
|
|
62
|
+
readonly id: string;
|
|
63
|
+
/** Immutable logical operation arguments. */
|
|
64
|
+
readonly props: Readonly<GPUGraphReductionProps>;
|
|
65
|
+
/** Describe a scalar reduction without allocating or reading GPU storage. */
|
|
66
|
+
constructor(props: GPUGraphReductionProps);
|
|
67
|
+
/** Infer a packed one-row result, or two rows for extent. */
|
|
68
|
+
get contract(): GPUOperationContract;
|
|
69
|
+
}
|
|
70
|
+
export {};
|
|
71
|
+
//# sourceMappingURL=gpu-semantic-aggregation-operation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gpu-semantic-aggregation-operation.d.ts","sourceRoot":"","sources":["../../src/gpu-core/gpu-semantic-aggregation-operation.ts"],"names":[],"mappings":"AAKA,OAAO,EAAW,KAAK,cAAc,EAAC,6BAA0B;AAChE,OAAO,KAAK,EAAC,YAAY,EAAC,2BAAwB;AAClD,OAAO,EAA2B,KAAK,oBAAoB,EAAC,oCAAiC;AAC7F,OAAO,KAAK,EAAC,4BAA4B,EAAC,mCAAgC;AAC1E,OAAO,KAAK,EAAC,qBAAqB,EAAC,2BAAwB;AAE3D,KAAK,YAAY,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEpD,mEAAmE;AACnE,MAAM,MAAM,6BAA6B,GAAG;IAC1C,8EAA8E;IAC9E,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,gEAAgE;IAChE,IAAI,EAAE,MAAM,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;IACxC,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;IACzC,2FAA2F;IAC3F,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,CACA;IACE,qCAAqC;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,0CA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,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC;IAEjD,6EAA6E;gBACjE,KAAK,EAAE,sBAAsB;IAKzC,6DAA6D;IAC7D,IAAI,QAAQ,IAAI,oBAAoB,CAwBnC;CACF"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
import { assert } from '@luma.gl/core';
|
|
5
|
+
import { gpuGraph } from "./gpu-graph-value.js";
|
|
6
|
+
import { getGPUOperationValueName } from "./gpu-operation-contract.js";
|
|
7
|
+
/** Dense grouped statistics lowered to GPUGroupAggregation by GPUGraphCompiler. */
|
|
8
|
+
export class GPUGraphGroupAggregation {
|
|
9
|
+
/** Semantic operation discriminator. */
|
|
10
|
+
type = 'group-aggregation';
|
|
11
|
+
/** Stable operation identifier. */
|
|
12
|
+
id;
|
|
13
|
+
/** Immutable logical operation arguments. */
|
|
14
|
+
props;
|
|
15
|
+
/** Describe grouped reduction without allocating or reading GPU storage. */
|
|
16
|
+
constructor(props) {
|
|
17
|
+
// Dense group destinations must have positive integer cardinality.
|
|
18
|
+
assert(props.groupCount === undefined ||
|
|
19
|
+
(Number.isSafeInteger(props.groupCount) && props.groupCount > 0));
|
|
20
|
+
this.id = props.id ?? `${getGPUOperationValueName(props.output)}-group-aggregation`;
|
|
21
|
+
this.props = Object.freeze({ ...props });
|
|
22
|
+
}
|
|
23
|
+
/** Logical dependencies and optional inferred output shape. */
|
|
24
|
+
get contract() {
|
|
25
|
+
const { keys, mask, output, groupCount } = this.props;
|
|
26
|
+
const values = this.props.operation === 'count' ? undefined : this.props.values;
|
|
27
|
+
return {
|
|
28
|
+
outputs: ({ getValue }) => {
|
|
29
|
+
for (const input of [keys, mask]) {
|
|
30
|
+
if (input) {
|
|
31
|
+
const descriptor = getValue(getGPUOperationValueName(input));
|
|
32
|
+
assert(descriptor.type === 'vector' && descriptor.format === 'uint32');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (values) {
|
|
36
|
+
const descriptor = getValue(getGPUOperationValueName(values));
|
|
37
|
+
assert(descriptor.type === 'vector' && descriptor.format === 'float32');
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
[getGPUOperationValueName(output)]: gpuGraph.vector(this.props.operation === 'count' ? 'uint32' : 'float32', { length: groupCount })
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
values: [
|
|
44
|
+
{ value: keys, access: 'read' },
|
|
45
|
+
...(values ? [{ value: values, access: 'read' }] : []),
|
|
46
|
+
...(mask ? [{ value: mask, access: 'read' }] : []),
|
|
47
|
+
{ value: output, access: 'write' }
|
|
48
|
+
]
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/** Scalar statistics lowered to GPUReduction by GPUGraphCompiler. */
|
|
53
|
+
export class GPUGraphReduction {
|
|
54
|
+
/** Semantic operation discriminator. */
|
|
55
|
+
type = 'reduction';
|
|
56
|
+
/** Stable operation identifier. */
|
|
57
|
+
id;
|
|
58
|
+
/** Immutable logical operation arguments. */
|
|
59
|
+
props;
|
|
60
|
+
/** Describe a scalar reduction without allocating or reading GPU storage. */
|
|
61
|
+
constructor(props) {
|
|
62
|
+
this.id = props.id ?? `${getGPUOperationValueName(props.output)}-reduction`;
|
|
63
|
+
this.props = Object.freeze({ ...props });
|
|
64
|
+
}
|
|
65
|
+
/** Infer a packed one-row result, or two rows for extent. */
|
|
66
|
+
get contract() {
|
|
67
|
+
const { input, mask, output, operation } = this.props;
|
|
68
|
+
return {
|
|
69
|
+
outputs: ({ getValue }) => {
|
|
70
|
+
const descriptor = getValue(getGPUOperationValueName(input));
|
|
71
|
+
assert(descriptor.type === 'vector');
|
|
72
|
+
const { format } = descriptor;
|
|
73
|
+
assert(format === 'uint32' || format === 'sint32' || format === 'float32');
|
|
74
|
+
if (mask) {
|
|
75
|
+
const selection = getValue(getGPUOperationValueName(mask));
|
|
76
|
+
assert(selection.type === 'vector' && selection.format === 'uint32');
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
[getGPUOperationValueName(output)]: gpuGraph.vector(format, {
|
|
80
|
+
length: operation === 'extent' ? 2 : 1
|
|
81
|
+
})
|
|
82
|
+
};
|
|
83
|
+
},
|
|
84
|
+
values: [
|
|
85
|
+
{ value: input, access: 'read' },
|
|
86
|
+
...(mask ? [{ value: mask, access: 'read' }] : []),
|
|
87
|
+
{ value: output, access: 'write' }
|
|
88
|
+
]
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=gpu-semantic-aggregation-operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gpu-semantic-aggregation-operation.js","sourceRoot":"","sources":["../../src/gpu-core/gpu-semantic-aggregation-operation.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAE5D,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AACrC,OAAO,EAAC,QAAQ,EAAsB,6BAA0B;AAEhE,OAAO,EAAC,wBAAwB,EAA4B,oCAAiC;AAkC7F,mFAAmF;AACnF,MAAM,OAAO,wBAAwB;IACnC,wCAAwC;IAC/B,IAAI,GAAG,mBAAmB,CAAC;IACpC,mCAAmC;IAC1B,EAAE,CAAS;IACpB,6CAA6C;IACpC,KAAK,CAA0C;IAExD,4EAA4E;IAC5E,YAAY,KAAoC;QAC9C,mEAAmE;QACnE,MAAM,CACJ,KAAK,CAAC,UAAU,KAAK,SAAS;YAC5B,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CACnE,CAAC;QACF,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,G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