@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
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
mergeGeoArrowDimensions,
|
|
8
8
|
interleaveGeoArrowCoordinates,
|
|
9
9
|
isGeoArrowValueValid,
|
|
10
|
-
|
|
10
|
+
getGeoArrowColumnView,
|
|
11
11
|
type GeoArrowColumn,
|
|
12
12
|
type GeoArrowDimension,
|
|
13
13
|
type GeoArrowEncoding,
|
|
14
14
|
type GeoArrowSerialized
|
|
15
|
-
} from '@math.gl/
|
|
16
|
-
import {decodeGeoArrowWKB, decodeGeoArrowWKT} from '@math.gl/
|
|
15
|
+
} from '@math.gl/core/arrow';
|
|
16
|
+
import {decodeGeoArrowWKB, decodeGeoArrowWKT} from '@math.gl/core/arrow';
|
|
17
17
|
import {
|
|
18
18
|
Data,
|
|
19
19
|
DataType,
|
|
@@ -43,6 +43,8 @@ export type GeoArrowNativeEncoding =
|
|
|
43
43
|
export type GeoArrowSerializedEncoding = 'geoarrow.wkb' | 'geoarrow.wkt';
|
|
44
44
|
|
|
45
45
|
export type GeoArrowInterleaveOptions = {
|
|
46
|
+
/** Encoding for explicitly selected columns without GeoArrow extension metadata. */
|
|
47
|
+
encoding?: GeoArrowNativeEncoding;
|
|
46
48
|
/** Optional single geometry column to convert. Defaults to native GeoArrow metadata columns. */
|
|
47
49
|
geometryColumn?: string;
|
|
48
50
|
/** Optional geometry columns to convert. Defaults to native GeoArrow metadata columns. */
|
|
@@ -110,7 +112,7 @@ export function convertGeoArrowTableToInterleaved<T extends TypeMap>(
|
|
|
110
112
|
}
|
|
111
113
|
const encoding = getFieldEncoding(field) as GeoArrowNativeEncoding | null;
|
|
112
114
|
const column = makeGeoArrowColumnFromArrowVector(vector, {
|
|
113
|
-
encoding: encoding ??
|
|
115
|
+
encoding: encoding ?? options.encoding,
|
|
114
116
|
metadata: getFieldExtensionMetadata(field)
|
|
115
117
|
});
|
|
116
118
|
const interleavedColumn = interleaveGeoArrowCoordinates(column);
|
|
@@ -317,7 +319,7 @@ function splitGeoArrowColumn(column: GeoArrowColumn, chunkLengths: number[]): Ge
|
|
|
317
319
|
const chunks = [];
|
|
318
320
|
let rowOffset = 0;
|
|
319
321
|
for (const chunkLength of chunkLengths) {
|
|
320
|
-
const slicedColumn =
|
|
322
|
+
const slicedColumn = getGeoArrowColumnView(column, rowOffset, rowOffset + chunkLength);
|
|
321
323
|
if (slicedColumn.chunks.length !== 1) {
|
|
322
324
|
throw new Error('GeoArrow conversion could not preserve Arrow chunk boundaries');
|
|
323
325
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import {tessellateGeoArrowPolygons} from '@math.gl/
|
|
5
|
+
import {tessellateGeoArrowPolygons} from '@math.gl/geometry/arrow';
|
|
6
6
|
import {
|
|
7
7
|
DataType,
|
|
8
8
|
DenseUnion,
|
|
@@ -36,29 +36,82 @@ export type ArrowColumnGPUVectorOptions = {
|
|
|
36
36
|
transform?: (value: number[]) => readonly number[];
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
/**
|
|
40
|
-
export
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
/** Options for selecting an output format from Arrow type metadata. */
|
|
40
|
+
export type ArrowColumnFormatOptions = Pick<
|
|
41
|
+
Partial<ArrowColumnGPUVectorOptions>,
|
|
42
|
+
'format' | 'transform'
|
|
43
|
+
> & {
|
|
44
|
+
/** Selects numeric, XY/XYZ position, scalar, or normalized RGBA conversion. */
|
|
45
|
+
semantic?: 'auto' | 'numeric' | 'position' | 'scalar' | 'color';
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Infers and validates a GPU format for an Arrow column without reading rows or uploading data.
|
|
50
|
+
* Conversion still validates nulls and transformed row widths.
|
|
51
|
+
*/
|
|
52
|
+
export function getArrowConversionFormat(
|
|
53
|
+
type: DataType,
|
|
54
|
+
{semantic = 'auto', format, transform}: ArrowColumnFormatOptions = {}
|
|
55
|
+
): GPUVectorFormat {
|
|
56
|
+
const listWidth = DataType.isFixedSizeList(type) ? type.listSize : undefined;
|
|
57
|
+
if (semantic === 'position' && listWidth !== 2 && listWidth !== 3) {
|
|
58
|
+
throw new Error('Arrow positions must be FixedSizeList[2] or FixedSizeList[3]');
|
|
59
|
+
}
|
|
60
|
+
if (semantic === 'scalar' && !DataType.isInt(type) && !DataType.isFloat(type)) {
|
|
61
|
+
throw new Error('Arrow scalar input must be numeric');
|
|
62
|
+
}
|
|
63
|
+
const width = listWidth ?? 1;
|
|
64
|
+
const outputFormat =
|
|
65
|
+
format ??
|
|
66
|
+
(semantic === 'color'
|
|
67
|
+
? 'unorm8x4'
|
|
68
|
+
: width === 1
|
|
69
|
+
? 'float32'
|
|
70
|
+
: (`float32x${width}` as GPUVectorFormat));
|
|
71
|
+
validateArrowColumnFormat(
|
|
72
|
+
type,
|
|
73
|
+
outputFormat,
|
|
74
|
+
semantic === 'color' || outputFormat === 'unorm8x4',
|
|
75
|
+
transform
|
|
76
|
+
);
|
|
77
|
+
return outputFormat;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function validateArrowColumnFormat(
|
|
81
|
+
sourceType: DataType,
|
|
82
|
+
format: GPUVectorFormat,
|
|
83
|
+
color: boolean,
|
|
84
|
+
transform: ArrowColumnGPUVectorOptions['transform']
|
|
85
|
+
) {
|
|
46
86
|
const width = format === 'float32' ? 1 : Number(/x([234])$/.exec(format)?.[1]);
|
|
47
87
|
if (!width || (color ? format !== 'unorm8x4' : !format.startsWith('float32'))) {
|
|
48
88
|
throw new Error(`Unsupported Arrow output format: ${format}`);
|
|
49
89
|
}
|
|
50
|
-
const list = DataType.isFixedSizeList(
|
|
51
|
-
const sourceWidth = list ?
|
|
52
|
-
const type = list ?
|
|
90
|
+
const list = DataType.isFixedSizeList(sourceType);
|
|
91
|
+
const sourceWidth = list ? sourceType.listSize : 1;
|
|
92
|
+
const type = list ? sourceType.children[0].type : sourceType;
|
|
53
93
|
if (!DataType.isInt(type) && !DataType.isFloat(type)) {
|
|
54
94
|
throw new Error('Arrow input must contain numeric values');
|
|
55
95
|
}
|
|
56
|
-
if (
|
|
57
|
-
(!color && !options.transform && sourceWidth > width) ||
|
|
58
|
-
(color && ![3, 4].includes(sourceWidth))
|
|
59
|
-
) {
|
|
96
|
+
if ((!color && !transform && sourceWidth > width) || (color && ![3, 4].includes(sourceWidth))) {
|
|
60
97
|
throw new Error('Arrow input width does not match the requested output format');
|
|
61
98
|
}
|
|
99
|
+
return {width, sourceWidth, type, list};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** Converts fixed-width numeric Arrow chunks to owned GPU vectors with optional row transforms and validity. */
|
|
103
|
+
export function convertArrowColumnToGPUVector(
|
|
104
|
+
device: Device,
|
|
105
|
+
vector: Vector,
|
|
106
|
+
options: ArrowColumnGPUVectorOptions
|
|
107
|
+
): PreparedArrowColumnGPUVector {
|
|
108
|
+
const {name = 'arrow-column', format, color, preserveNulls} = options;
|
|
109
|
+
const {width, sourceWidth, type, list} = validateArrowColumnFormat(
|
|
110
|
+
vector.type,
|
|
111
|
+
format,
|
|
112
|
+
color,
|
|
113
|
+
options.transform
|
|
114
|
+
);
|
|
62
115
|
const parts: GPUVector[] = [];
|
|
63
116
|
const residuals: GPUVector[] = [];
|
|
64
117
|
const validity: GPUVector[] = [];
|
|
@@ -59,7 +59,16 @@ export type PreparedArrowGPUTable = {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
/** Iterable Arrow record-batch source accepted by streaming conversion. */
|
|
62
|
-
export type ArrowRecordBatchConversionSource =
|
|
62
|
+
export type ArrowRecordBatchConversionSource =
|
|
63
|
+
| Iterable<RecordBatch>
|
|
64
|
+
| AsyncIterable<RecordBatch>
|
|
65
|
+
| AsyncIterator<RecordBatch>;
|
|
66
|
+
|
|
67
|
+
/** Controls cancellation of incremental Arrow conversion. */
|
|
68
|
+
export type ArrowRecordBatchConversionOptions = {
|
|
69
|
+
/** Stops pending reads and further conversion. Already yielded batches remain caller-owned. */
|
|
70
|
+
signal?: AbortSignal;
|
|
71
|
+
};
|
|
63
72
|
|
|
64
73
|
/** One independently owned GPU record batch produced from an Arrow stream. */
|
|
65
74
|
export type PreparedArrowGPURecordBatch = {
|
|
@@ -213,16 +222,21 @@ export async function convertArrowRecordBatchToGPURecordBatch(
|
|
|
213
222
|
*
|
|
214
223
|
* Temporal columns reuse the first prepared origin in later batches unless the schema supplies an
|
|
215
224
|
* explicit origin. Consumers own each yielded batch and should destroy it after use.
|
|
225
|
+
* Output GPU formats must match the first batch. Cancellation or validation failure destroys
|
|
226
|
+
* unyielded results; an in-flight conversion finishes before its result can be released.
|
|
216
227
|
*/
|
|
217
228
|
export async function* convertArrowRecordBatchesToGPURecordBatches(
|
|
218
229
|
device: Device,
|
|
219
230
|
source: ArrowRecordBatchConversionSource,
|
|
220
|
-
schema: ArrowGPUTableConversionSchema
|
|
231
|
+
schema: ArrowGPUTableConversionSchema,
|
|
232
|
+
{signal}: ArrowRecordBatchConversionOptions = {}
|
|
221
233
|
): AsyncGenerator<PreparedArrowGPURecordBatch> {
|
|
222
234
|
const temporalOrigins = new Map<string, number | bigint>();
|
|
235
|
+
const formats = new Map<string, string | undefined>();
|
|
223
236
|
let sourceBatchIndex = 0;
|
|
224
237
|
let sourceRowIndexOffset = 0;
|
|
225
|
-
for await (const recordBatch of source) {
|
|
238
|
+
for await (const recordBatch of iterateRecordBatches(source, signal)) {
|
|
239
|
+
signal?.throwIfAborted();
|
|
226
240
|
const batchSchema: ArrowGPUTableConversionSchema = {
|
|
227
241
|
columns: schema.columns.map(column => {
|
|
228
242
|
const origin = temporalOrigins.get(column.name);
|
|
@@ -237,7 +251,22 @@ export async function* convertArrowRecordBatchesToGPURecordBatches(
|
|
|
237
251
|
batchSchema,
|
|
238
252
|
{sourceBatchIndex, sourceRowIndexOffset}
|
|
239
253
|
);
|
|
240
|
-
|
|
254
|
+
try {
|
|
255
|
+
signal?.throwIfAborted();
|
|
256
|
+
for (const [name, vector] of Object.entries(prepared.vectors)) {
|
|
257
|
+
const expected = formats.get(name);
|
|
258
|
+
if (formats.has(name) && vector.format !== expected) {
|
|
259
|
+
throw new Error(
|
|
260
|
+
`Arrow stream column "${name}" format changed: ${expected} -> ${vector.format}`
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
formats.set(name, vector.format);
|
|
264
|
+
}
|
|
265
|
+
captureStreamingTemporalOrigins(recordBatch, schema, prepared.batch, temporalOrigins);
|
|
266
|
+
} catch (error) {
|
|
267
|
+
prepared.destroy();
|
|
268
|
+
throw error;
|
|
269
|
+
}
|
|
241
270
|
yield prepared;
|
|
242
271
|
sourceRowIndexOffset += recordBatch.numRows;
|
|
243
272
|
sourceBatchIndex++;
|
|
@@ -322,3 +351,66 @@ function sumConversionCosts(costs: readonly ArrowGPUConversionCost[]): ArrowGPUC
|
|
|
322
351
|
}
|
|
323
352
|
);
|
|
324
353
|
}
|
|
354
|
+
|
|
355
|
+
/** Pulls one batch at a time, allowing abort to interrupt a stalled next(). */
|
|
356
|
+
async function* iterateRecordBatches(
|
|
357
|
+
source: ArrowRecordBatchConversionSource,
|
|
358
|
+
signal?: AbortSignal
|
|
359
|
+
): AsyncGenerator<RecordBatch> {
|
|
360
|
+
signal?.throwIfAborted();
|
|
361
|
+
const iterator =
|
|
362
|
+
Symbol.asyncIterator in source
|
|
363
|
+
? source[Symbol.asyncIterator]()
|
|
364
|
+
: Symbol.iterator in source
|
|
365
|
+
? source[Symbol.iterator]()
|
|
366
|
+
: source;
|
|
367
|
+
let completed = false;
|
|
368
|
+
try {
|
|
369
|
+
for (;;) {
|
|
370
|
+
const result = await readRecordBatch(iterator, signal);
|
|
371
|
+
signal?.throwIfAborted();
|
|
372
|
+
if (result.done) {
|
|
373
|
+
completed = true;
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
yield result.value;
|
|
377
|
+
}
|
|
378
|
+
} finally {
|
|
379
|
+
if (!completed) {
|
|
380
|
+
// Async generators may queue return() behind a stalled next(); do not delay abort.
|
|
381
|
+
const cleanup = Promise.resolve().then(() => iterator.return?.());
|
|
382
|
+
if (signal?.aborted) void cleanup.catch(() => {});
|
|
383
|
+
else await cleanup;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
function readRecordBatch(
|
|
389
|
+
iterator: Iterator<RecordBatch> | AsyncIterator<RecordBatch>,
|
|
390
|
+
signal?: AbortSignal
|
|
391
|
+
): Promise<IteratorResult<RecordBatch>> {
|
|
392
|
+
signal?.throwIfAborted();
|
|
393
|
+
if (!signal) return Promise.resolve(iterator.next());
|
|
394
|
+
return new Promise((resolve, reject) => {
|
|
395
|
+
const abort = () => {
|
|
396
|
+
signal.removeEventListener('abort', abort);
|
|
397
|
+
reject(signal.reason);
|
|
398
|
+
};
|
|
399
|
+
signal.addEventListener('abort', abort, {once: true});
|
|
400
|
+
Promise.resolve()
|
|
401
|
+
.then(() => {
|
|
402
|
+
signal.throwIfAborted();
|
|
403
|
+
return iterator.next();
|
|
404
|
+
})
|
|
405
|
+
.then(
|
|
406
|
+
result => {
|
|
407
|
+
signal.removeEventListener('abort', abort);
|
|
408
|
+
resolve(result);
|
|
409
|
+
},
|
|
410
|
+
error => {
|
|
411
|
+
signal.removeEventListener('abort', abort);
|
|
412
|
+
reject(error);
|
|
413
|
+
}
|
|
414
|
+
);
|
|
415
|
+
});
|
|
416
|
+
}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import {getGPUDataBufferProps} from '../../gpu-data/gpu-data-buffer-props';
|
|
6
|
+
import {Device, type SignedDataType, type VertexFormat} from '@luma.gl/core';
|
|
6
7
|
import {DynamicBuffer} from '@luma.gl/core/dynamic';
|
|
7
8
|
import {
|
|
8
9
|
GPUData,
|
|
@@ -210,7 +211,9 @@ export function makeGPUDataFromArrowData<T extends DataType>(
|
|
|
210
211
|
const byteStride = getArrowTypeByteStride(arrowType.indices);
|
|
211
212
|
return new GPUData({
|
|
212
213
|
buffer: new DynamicBuffer(device, {
|
|
213
|
-
usage
|
|
214
|
+
...(bufferProps.usage === undefined
|
|
215
|
+
? getGPUDataBufferProps(device, format === 'uint16' ? 'uint16' : 'uint32')
|
|
216
|
+
: {}),
|
|
214
217
|
...bufferProps,
|
|
215
218
|
data: getArrowDictionaryIndexBufferSource(data as unknown as Data<ArrowUtf8Dictionary>)
|
|
216
219
|
}),
|
|
@@ -227,7 +230,9 @@ export function makeGPUDataFromArrowData<T extends DataType>(
|
|
|
227
230
|
if (DataType.isUtf8(arrowType)) {
|
|
228
231
|
return new GPUData({
|
|
229
232
|
buffer: new DynamicBuffer(device, {
|
|
230
|
-
usage
|
|
233
|
+
...(bufferProps.usage === undefined
|
|
234
|
+
? getGPUDataBufferProps(device, format === 'uint16' ? 'uint16' : 'uint32')
|
|
235
|
+
: {}),
|
|
231
236
|
...bufferProps,
|
|
232
237
|
data: getArrowUtf8DataBufferSource(data as Data<Utf8>)
|
|
233
238
|
}),
|
|
@@ -254,7 +259,9 @@ export function makeGPUDataFromArrowData<T extends DataType>(
|
|
|
254
259
|
const byteStride = getArrowTypeByteStride(arrowType);
|
|
255
260
|
return new GPUData({
|
|
256
261
|
buffer: new DynamicBuffer(device, {
|
|
257
|
-
usage
|
|
262
|
+
...(bufferProps.usage === undefined
|
|
263
|
+
? getGPUDataBufferProps(device, format === 'uint16' ? 'uint16' : 'uint32')
|
|
264
|
+
: {}),
|
|
258
265
|
...bufferProps,
|
|
259
266
|
data: getArrowVariableLengthAttributeDataBufferSource(
|
|
260
267
|
data as unknown as Data<VariableLengthAttributeArrowType>
|
|
@@ -278,7 +285,9 @@ export function makeGPUDataFromArrowData<T extends DataType>(
|
|
|
278
285
|
const byteStride = getArrowTypeByteStride(arrowType);
|
|
279
286
|
return new GPUData({
|
|
280
287
|
buffer: new DynamicBuffer(device, {
|
|
281
|
-
usage
|
|
288
|
+
...(bufferProps.usage === undefined
|
|
289
|
+
? getGPUDataBufferProps(device, format === 'uint16' ? 'uint16' : 'uint32')
|
|
290
|
+
: {}),
|
|
282
291
|
...bufferProps,
|
|
283
292
|
data: getArrowDataBufferSource(data as unknown as Data<AttributeArrowType>)
|
|
284
293
|
}),
|
|
@@ -385,7 +394,9 @@ export function makeGPUVectorFromArrow<T extends DataType>(
|
|
|
385
394
|
}
|
|
386
395
|
|
|
387
396
|
const buffer = device.createBuffer({
|
|
388
|
-
usage
|
|
397
|
+
...(bufferProps.usage === undefined
|
|
398
|
+
? getGPUDataBufferProps(device, vectorFormat === 'uint16' ? 'uint16' : 'uint32')
|
|
399
|
+
: {}),
|
|
389
400
|
...bufferProps,
|
|
390
401
|
data: getArrowVectorBufferSource(vector as unknown as Vector<AttributeArrowType>)
|
|
391
402
|
});
|
|
@@ -496,7 +507,9 @@ function getArrowDataValueLength(data: Data): number {
|
|
|
496
507
|
return Math.max(0, lastValueOffset - firstValueOffset);
|
|
497
508
|
}
|
|
498
509
|
|
|
499
|
-
function makeArrowGPUValidityBitmap(
|
|
510
|
+
export function makeArrowGPUValidityBitmap(
|
|
511
|
+
validity: Uint32Array | undefined
|
|
512
|
+
): Uint8Array | undefined {
|
|
500
513
|
if (!validity) {
|
|
501
514
|
return undefined;
|
|
502
515
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
5
|
import {Buffer, type Device} from '@luma.gl/core';
|
|
6
|
+
import {getGPUDataBufferProps} from '../../gpu-data/gpu-data-buffer-props';
|
|
6
7
|
import {DynamicBuffer} from '@luma.gl/core/dynamic';
|
|
7
8
|
import {
|
|
8
9
|
GPUData,
|
|
@@ -12,6 +13,7 @@ import {
|
|
|
12
13
|
type GPUVectorBufferProps,
|
|
13
14
|
type GPUVectorFormat
|
|
14
15
|
} from '@luma.gl/graph/gpu-data';
|
|
16
|
+
import {resolveColorOutputFormat, type ColorOutputFormat} from '../../gpu-data/color-conversion';
|
|
15
17
|
import {castData} from '../../gpu-simple-graph/operations/cast-data';
|
|
16
18
|
import {fround} from '../../gpu-simple-graph/operations/fround';
|
|
17
19
|
import {GPUDataEvaluator} from '../../gpu-simple-graph/operation/gpu-data-evaluator';
|
|
@@ -112,7 +114,11 @@ export type ArrowGPUConversionOptions = {
|
|
|
112
114
|
/** Semantic conversion family. `auto` recognizes temporal and metadata-tagged matrices. */
|
|
113
115
|
semantic?: ArrowGPUConversionSemantic;
|
|
114
116
|
/** One required output memory format. */
|
|
115
|
-
format?: GPUVectorFormat;
|
|
117
|
+
format?: GPUVectorFormat | 'preserve';
|
|
118
|
+
/** Consumer color storage capabilities, checked independently of the requested policy. */
|
|
119
|
+
acceptedFormats?: readonly ColorOutputFormat[];
|
|
120
|
+
/** Explicit fallback when preserved color precision is not accepted. */
|
|
121
|
+
fallbackFormat?: ColorOutputFormat;
|
|
116
122
|
/** Ordered acceptable output formats. The planner selects the first compatible format. */
|
|
117
123
|
formats?: readonly GPUVectorFormat[];
|
|
118
124
|
/** Strategy constraint. */
|
|
@@ -264,9 +270,14 @@ export async function convertArrowToGPUVector(
|
|
|
264
270
|
case 'convert-color': {
|
|
265
271
|
const vector =
|
|
266
272
|
source instanceof GPUVector
|
|
267
|
-
? await convertColors(device, source, {
|
|
273
|
+
? await convertColors(device, source, {
|
|
274
|
+
name,
|
|
275
|
+
format: plan.targetFormat as ColorOutputFormat
|
|
276
|
+
})
|
|
268
277
|
: await convertArrowColors(device, source as Parameters<typeof convertArrowColors>[1], {
|
|
269
278
|
name,
|
|
279
|
+
format: plan.targetFormat as ColorOutputFormat,
|
|
280
|
+
preferCPU: plan.backend === 'cpu',
|
|
270
281
|
bufferProps: options.bufferProps
|
|
271
282
|
});
|
|
272
283
|
return makePreparedArrowGPUVector(vector, plan, true);
|
|
@@ -367,10 +378,33 @@ function resolveTargetFormat(
|
|
|
367
378
|
options: ArrowGPUConversionOptions
|
|
368
379
|
): GPUVectorFormat {
|
|
369
380
|
const canonicalFormat = getCanonicalSemanticFormat(semantic, source, sourceFormat, options.field);
|
|
381
|
+
if (semantic === 'color') {
|
|
382
|
+
const requested =
|
|
383
|
+
options.format ??
|
|
384
|
+
options.formats?.find(format => ['unorm8x4', 'float16x4', 'float32x4'].includes(format)) ??
|
|
385
|
+
'unorm8x4';
|
|
386
|
+
if (!['preserve', 'unorm8x4', 'float16x4', 'float32x4'].includes(requested))
|
|
387
|
+
throw new Error('Unsupported color output format');
|
|
388
|
+
if (options.formats && !options.formats.includes(requested as GPUVectorFormat))
|
|
389
|
+
throw new Error('No compatible color output format');
|
|
390
|
+
return resolveColorOutputFormat(
|
|
391
|
+
source instanceof Vector &&
|
|
392
|
+
DataType.isFixedSizeList(source.type) &&
|
|
393
|
+
source.type.children[0].type instanceof Float16
|
|
394
|
+
? 'float16x4'
|
|
395
|
+
: (sourceFormat ?? canonicalFormat),
|
|
396
|
+
{
|
|
397
|
+
format: requested as ColorOutputFormat | 'preserve',
|
|
398
|
+
acceptedFormats: options.acceptedFormats,
|
|
399
|
+
fallbackFormat: options.fallbackFormat
|
|
400
|
+
}
|
|
401
|
+
);
|
|
402
|
+
}
|
|
403
|
+
if (options.format === 'preserve') throw new Error('preserve requires color semantics');
|
|
370
404
|
const requestedFormats = options.format ? [options.format] : options.formats;
|
|
371
405
|
if (!requestedFormats?.length) return canonicalFormat;
|
|
372
406
|
|
|
373
|
-
if (semantic === '
|
|
407
|
+
if (semantic === 'matrix' || semantic === 'temporal') {
|
|
374
408
|
if (!requestedFormats.includes(canonicalFormat)) {
|
|
375
409
|
throw new Error(
|
|
376
410
|
`Arrow ${semantic} conversion produces ${canonicalFormat}, not ${requestedFormats.join(', ')}`
|
|
@@ -434,7 +468,8 @@ function resolveConversionStrategy(
|
|
|
434
468
|
if (!sourceFormat || !areGPUFormatsByteCompatible(sourceFormat, targetFormat)) {
|
|
435
469
|
return 'convert-color';
|
|
436
470
|
}
|
|
437
|
-
if (source instanceof GPUVector)
|
|
471
|
+
if (source instanceof GPUVector)
|
|
472
|
+
return sourceFormat === targetFormat ? 'borrow' : 'convert-color';
|
|
438
473
|
return sourceFormat === targetFormat ? 'upload' : 'reinterpret-upload';
|
|
439
474
|
}
|
|
440
475
|
if (semantic === 'matrix') {
|
|
@@ -477,6 +512,8 @@ function resolveConversionBackend(
|
|
|
477
512
|
if (strategy === 'borrow') return 'none';
|
|
478
513
|
if (strategy === 'upload' || strategy === 'reinterpret-upload') return 'upload';
|
|
479
514
|
if (strategy === 'convert-matrix' && source instanceof Vector) return 'cpu';
|
|
515
|
+
if (strategy === 'convert-color' && source instanceof Vector && policy === 'prefer-cpu')
|
|
516
|
+
return 'cpu';
|
|
480
517
|
if (
|
|
481
518
|
strategy === 'convert-numeric' &&
|
|
482
519
|
source instanceof Vector &&
|
|
@@ -707,7 +744,7 @@ async function convertArrowFloat64VectorOnGPU(
|
|
|
707
744
|
const outputBuffer = device.createBuffer({
|
|
708
745
|
...options.bufferProps,
|
|
709
746
|
id: `${options.name}-${chunkIndex}`,
|
|
710
|
-
|
|
747
|
+
...getGPUDataBufferProps(device),
|
|
711
748
|
byteLength: Math.max(Float32Array.BYTES_PER_ELEMENT, split.byteLength)
|
|
712
749
|
});
|
|
713
750
|
outputBuffers.push(outputBuffer);
|
|
@@ -846,7 +883,7 @@ async function convertArrowNumericVectorOnGPU(
|
|
|
846
883
|
const outputBuffer = device.createBuffer({
|
|
847
884
|
...options.bufferProps,
|
|
848
885
|
id: `${options.name}-${chunkIndex}`,
|
|
849
|
-
|
|
886
|
+
...getGPUDataBufferProps(device, targetElementFormat === 'uint16' ? 'uint16' : 'uint32'),
|
|
850
887
|
byteLength: Math.max(4, converted.byteLength)
|
|
851
888
|
});
|
|
852
889
|
outputBuffers.push(outputBuffer);
|
|
@@ -1059,6 +1096,12 @@ function getConversionWarnings(
|
|
|
1059
1096
|
backend: ArrowGPUConversionBackend
|
|
1060
1097
|
): string[] {
|
|
1061
1098
|
const warnings: string[] = [];
|
|
1099
|
+
if (strategy === 'convert-color') {
|
|
1100
|
+
if (targetFormat === 'unorm8x4')
|
|
1101
|
+
warnings.push('floating color channels are clamped and quantized to RGBA8');
|
|
1102
|
+
if (targetFormat === 'float16x4')
|
|
1103
|
+
warnings.push('color channels are rounded to binary16; out-of-range values may overflow');
|
|
1104
|
+
}
|
|
1062
1105
|
const sourceType = getSourceArrowType(source);
|
|
1063
1106
|
const leafType = sourceType ? getArrowNumericLeafType(sourceType) : undefined;
|
|
1064
1107
|
if (
|
package/src/arrow/index.ts
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
export {
|
|
6
6
|
convertArrowColumnToGPUVector,
|
|
7
|
+
getArrowConversionFormat,
|
|
8
|
+
type ArrowColumnFormatOptions,
|
|
7
9
|
type ArrowColumnGPUVectorOptions,
|
|
8
10
|
type PreparedArrowColumnGPUVector
|
|
9
11
|
} from './gpu/arrow-column-gpu-vector';
|
|
@@ -31,6 +33,7 @@ export {
|
|
|
31
33
|
convertArrowTableToGPUTable,
|
|
32
34
|
planArrowTableGPUConversion,
|
|
33
35
|
type ArrowRecordBatchConversionSource,
|
|
36
|
+
type ArrowRecordBatchConversionOptions,
|
|
34
37
|
type ArrowGPUTableConversionColumn,
|
|
35
38
|
type ArrowGPUTableConversionPlan,
|
|
36
39
|
type ArrowGPUTableConversionSchema,
|
|
@@ -201,3 +204,14 @@ export {
|
|
|
201
204
|
type ArrowVertexFormatOptions,
|
|
202
205
|
type ArrowBufferLayoutOptions
|
|
203
206
|
} from './gpu/arrow-shader-layout';
|
|
207
|
+
|
|
208
|
+
export {
|
|
209
|
+
makeCPUVectorFromArrow,
|
|
210
|
+
makeArrowVectorFromCPUVector
|
|
211
|
+
} from './cpu/arrow-cpu-vector-adapters';
|
|
212
|
+
export {
|
|
213
|
+
projectCPUVector,
|
|
214
|
+
tessellateCPUVectorPolygons,
|
|
215
|
+
tessellateGeoArrowColumnToCPUVectors
|
|
216
|
+
} from './cpu/arrow-cpu-pipelines';
|
|
217
|
+
export {projectArrowCoordinates} from './cpu/arrow-coordinate-projection';
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
// SPDX-FileComment: Independently implemented for WebGPU; inspired by NVIDIA RAPIDS cuSpatial.
|
|
5
5
|
|
|
6
|
+
import {GPU_GRID_COORDINATE_WGSL} from '../gpu-core/gpu-grid-coordinate';
|
|
6
7
|
import {type Binding, Buffer} from '@luma.gl/core';
|
|
7
8
|
import {assembleComputeKernel} from '../utils/assemble-compute-kernel';
|
|
8
9
|
import {Kernel} from '../execution/compute/kernel';
|
|
@@ -277,21 +278,7 @@ fn finite(value: f32) -> bool {
|
|
|
277
278
|
return value == value && abs(value) <= 3.402823466e+38;
|
|
278
279
|
}
|
|
279
280
|
|
|
280
|
-
|
|
281
|
-
if (maximum == minimum || value <= minimum) { return 0u; }
|
|
282
|
-
if (value >= maximum) { return size - 1u; }
|
|
283
|
-
if (minimum < 0.0 && maximum > 0.0) {
|
|
284
|
-
let scale = max(abs(minimum), abs(maximum));
|
|
285
|
-
let scaledValue = value / scale;
|
|
286
|
-
let scaledMinimum = minimum / scale;
|
|
287
|
-
let scaledMaximum = maximum / scale;
|
|
288
|
-
return min(
|
|
289
|
-
u32((scaledValue - scaledMinimum) / (scaledMaximum - scaledMinimum) * f32(size)),
|
|
290
|
-
size - 1u
|
|
291
|
-
);
|
|
292
|
-
}
|
|
293
|
-
return min(u32((value - minimum) / (maximum - minimum) * f32(size)), size - 1u);
|
|
294
|
-
}
|
|
281
|
+
${GPU_GRID_COORDINATE_WGSL}
|
|
295
282
|
|
|
296
283
|
fn getCell(position: vec3<f32>) -> vec3<u32> {
|
|
297
284
|
return vec3<u32>(
|