@luma.gl/graph 10.0.0-alpha.14 → 10.0.0-alpha.16
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/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/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/index.cjs +2 -0
- package/dist/arrow/index.cjs.map +2 -2
- package/dist/arrow/index.d.ts +1 -1
- package/dist/arrow/index.d.ts.map +1 -1
- package/dist/arrow/index.js +1 -1
- package/dist/arrow/index.js.map +1 -1
- package/dist/arrow/internal.cjs.map +1 -1
- package/dist/dist.dev.js +82 -42
- package/dist/dist.min.js +61 -61
- 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/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 +6 -4
- package/dist/gpu-core/gpu-command-graph.d.ts +4 -4
- package/dist/gpu-core/gpu-command-graph.d.ts.map +1 -1
- package/dist/gpu-core/gpu-command-graph.js +6 -4
- package/dist/gpu-core/gpu-command-graph.js.map +1 -1
- 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 +1 -1
- 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-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-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/index.cjs +18 -0
- package/dist/gpu-core/index.cjs.map +3 -3
- package/dist/gpu-core/index.d.ts +13 -1
- package/dist/gpu-core/index.d.ts.map +1 -1
- package/dist/gpu-core/index.js +6 -0
- package/dist/gpu-core/index.js.map +1 -1
- 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 +3 -0
- package/dist/gpu-data/index.cjs.map +2 -2
- package/dist/gpu-data/index.d.ts +1 -0
- package/dist/gpu-data/index.d.ts.map +1 -1
- package/dist/gpu-data/index.js +1 -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.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 +3 -1
- package/dist/gpu-physics/gpu-rigid-body-world.d.ts +4 -0
- package/dist/gpu-physics/gpu-rigid-body-world.d.ts.map +1 -1
- package/dist/gpu-physics/gpu-rigid-body-world.js +3 -1
- package/dist/gpu-physics/gpu-rigid-body-world.js.map +1 -1
- package/dist/gpu-physics/index.cjs.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-pointcloud/index.cjs.map +1 -1
- package/dist/gpu-project/graph.cjs.map +1 -1
- package/dist/gpu-simple-graph/index.cjs.map +1 -1
- package/dist/gpu-sql/gpu-sql.cjs +99 -6
- package/dist/gpu-sql/gpu-sql.d.ts.map +1 -1
- package/dist/gpu-sql/gpu-sql.js +100 -5
- package/dist/gpu-sql/gpu-sql.js.map +1 -1
- package/dist/gpu-sql/index.cjs.map +2 -2
- package/dist/gpu-timeseries/index.cjs.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/arrow/arrow-utils/arrow-paths.ts +5 -3
- package/src/arrow/gpu/arrow-column-gpu-vector.ts +67 -14
- package/src/arrow/index.ts +2 -0
- package/src/geospatial/gpu-point-spatial-query.ts +2 -15
- 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 +11 -4
- 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-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-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/index.ts +21 -0
- package/src/gpu-data/gpu-vector-wgsl-layout.ts +79 -0
- package/src/gpu-data/index.ts +7 -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-algorithms/gpu-graph-spatial-force-layout-internals.ts +2 -15
- package/src/gpu-physics/gpu-rigid-body-world.ts +8 -1
- package/src/gpu-physics/rigid-body-parallel-shaders.ts +32 -9
- package/src/gpu-physics/rigid-body-shaders.ts +3 -2
- package/src/gpu-sql/gpu-sql.ts +106 -6
- package/src/index.ts +2 -0
|
@@ -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;QAC3C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,WAAW,CAAC;QACtC,wBAAwB,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC;QACzD,wBAAwB,CAAC,IAAI,CAAC,cAAc,EAAE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AAC,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"}
|
package/dist/gpu-core/index.cjs
CHANGED
|
@@ -21,6 +21,7 @@ __export(gpu_core_exports, {
|
|
|
21
21
|
CompiledGPUGraph: () => import_compiled_gpu_graph.CompiledGPUGraph,
|
|
22
22
|
DispatchCommandBuffer: () => import_dispatch_command_buffer.DispatchCommandBuffer,
|
|
23
23
|
DrawCommandBuffer: () => import_draw_command_buffer.DrawCommandBuffer,
|
|
24
|
+
GPUAdaptiveSpMV: () => import_gpu_adaptive_spmv.GPUAdaptiveSpMV,
|
|
24
25
|
GPUAncestorProjection: () => import_gpu_ancestor_projection.GPUAncestorProjection,
|
|
25
26
|
GPUBVH: () => import_gpu_bvh.GPUBVH,
|
|
26
27
|
GPUBVHQuery: () => import_gpu_bvh_query.GPUBVHQuery,
|
|
@@ -80,6 +81,7 @@ __export(gpu_core_exports, {
|
|
|
80
81
|
GPUIncrementalExecution: () => import_gpu_incremental_execution.GPUIncrementalExecution,
|
|
81
82
|
GPUIndexPickingTarget: () => import_gpu_index_picking_target.GPUIndexPickingTarget,
|
|
82
83
|
GPUIndexedRangeCompaction: () => import_gpu_indexed_range_compaction.GPUIndexedRangeCompaction,
|
|
84
|
+
GPUJacobiPCG: () => import_gpu_pcg.GPUJacobiPCG,
|
|
83
85
|
GPULZByteBatchDecompressor: () => import_gpu_lz_byte_batch_decompressor.GPULZByteBatchDecompressor,
|
|
84
86
|
GPULZByteDecompressor: () => import_gpu_lz_byte_decompressor.GPULZByteDecompressor,
|
|
85
87
|
GPULoopOperation: () => import_gpu_control_flow_operation.GPULoopOperation,
|
|
@@ -95,12 +97,15 @@ __export(gpu_core_exports, {
|
|
|
95
97
|
GPURunLengthEncode: () => import_gpu_run_length_encode.GPURunLengthEncode,
|
|
96
98
|
GPUScan: () => import_gpu_scan.GPUScan,
|
|
97
99
|
GPUScanUint64: () => import_gpu_uint64_scan.GPUScanUint64,
|
|
100
|
+
GPUScatter: () => import_gpu_scatter.GPUScatter,
|
|
98
101
|
GPUScene: () => import_gpu_scene.GPUScene,
|
|
99
102
|
GPUSceneDrawGeneration: () => import_gpu_scene_draw_generation.GPUSceneDrawGeneration,
|
|
100
103
|
GPUSceneResourceGroups: () => import_gpu_scene_resource_groups.GPUSceneResourceGroups,
|
|
101
104
|
GPUSegmentOffsets: () => import_gpu_segment_offsets.GPUSegmentOffsets,
|
|
102
105
|
GPUSegmentedBVH: () => import_gpu_segmented_bvh.GPUSegmentedBVH,
|
|
103
106
|
GPUSegmentedLayout: () => import_gpu_segmented_layout.GPUSegmentedLayout,
|
|
107
|
+
GPUSegmentedReduction: () => import_gpu_segmented_reduction.GPUSegmentedReduction,
|
|
108
|
+
GPUSegmentedScan: () => import_gpu_segmented_scan.GPUSegmentedScan,
|
|
104
109
|
GPUSegmentedSort: () => import_gpu_segmented_sort.GPUSegmentedSort,
|
|
105
110
|
GPUShaderPassOperation: () => import_gpu_shader_pass_operation.GPUShaderPassOperation,
|
|
106
111
|
GPUSort: () => import_gpu_sort.GPUSort,
|
|
@@ -125,6 +130,7 @@ __export(gpu_core_exports, {
|
|
|
125
130
|
GPU_GALLOPING_SEARCH_INVALID_QUERY_RANGE: () => import_gpu_galloping_search.GPU_GALLOPING_SEARCH_INVALID_QUERY_RANGE,
|
|
126
131
|
GPU_GALLOPING_SEARCH_INVALID_VALUE_RANGE: () => import_gpu_galloping_search.GPU_GALLOPING_SEARCH_INVALID_VALUE_RANGE,
|
|
127
132
|
GPU_GALLOPING_SEARCH_UNSORTED_QUERIES: () => import_gpu_galloping_search.GPU_GALLOPING_SEARCH_UNSORTED_QUERIES,
|
|
133
|
+
GPU_GRID_COORDINATE_WGSL: () => import_gpu_grid_coordinate.GPU_GRID_COORDINATE_WGSL,
|
|
128
134
|
GPU_HASH_INDEX_EMPTY_KEY: () => import_gpu_hash_index.GPU_HASH_INDEX_EMPTY_KEY,
|
|
129
135
|
GPU_HASH_INDEX_STATISTICS_LENGTH: () => import_gpu_hash_index.GPU_HASH_INDEX_STATISTICS_LENGTH,
|
|
130
136
|
GPU_HASH_QUERY_STATISTICS_LENGTH: () => import_gpu_hash_index.GPU_HASH_QUERY_STATISTICS_LENGTH,
|
|
@@ -217,10 +223,13 @@ var import_gpu_uint64_scan = require("./gpu-uint64-scan.cjs");
|
|
|
217
223
|
var import_gpu_uint32_gather = require("./gpu-uint32-gather.cjs");
|
|
218
224
|
var import_gpu_byte_range_gather = require("./gpu-byte-range-gather.cjs");
|
|
219
225
|
var import_gpu_gather = require("./gpu-gather.cjs");
|
|
226
|
+
var import_gpu_scatter = require("./gpu-scatter.cjs");
|
|
220
227
|
var import_gpu_lz_byte_decompressor = require("./gpu-lz-byte-decompressor.cjs");
|
|
221
228
|
var import_gpu_lz_byte_batch_decompressor = require("./gpu-lz-byte-batch-decompressor.cjs");
|
|
222
229
|
var import_gpu_workgroup_scan_benchmark = require("./gpu-workgroup-scan-benchmark.cjs");
|
|
223
230
|
var import_gpu_workgroup_reduction_benchmark = require("./gpu-workgroup-reduction-benchmark.cjs");
|
|
231
|
+
var import_gpu_segmented_scan = require("./gpu-segmented-scan.cjs");
|
|
232
|
+
var import_gpu_segmented_reduction = require("./gpu-segmented-reduction.cjs");
|
|
224
233
|
var import_gpu_segmented_sort = require("./gpu-segmented-sort.cjs");
|
|
225
234
|
var import_gpu_compaction = require("./gpu-compaction.cjs");
|
|
226
235
|
var import_gpu_flag_offsets = require("./gpu-flag-offsets.cjs");
|
|
@@ -250,6 +259,7 @@ var import_gpu_elementwise = require("./gpu-elementwise.cjs");
|
|
|
250
259
|
var import_gpu_finite_difference_2d = require("./gpu-finite-difference-2d.cjs");
|
|
251
260
|
var import_gpu_finite_difference_3d = require("./gpu-finite-difference-3d.cjs");
|
|
252
261
|
var import_gpu_histogram = require("./gpu-histogram.cjs");
|
|
262
|
+
var import_gpu_grid_coordinate = require("./gpu-grid-coordinate.cjs");
|
|
253
263
|
var import_gpu_grid_binning = require("./gpu-grid-binning.cjs");
|
|
254
264
|
var import_gpu_grid_index = require("./gpu-grid-index.cjs");
|
|
255
265
|
var import_gpu_grid_index_query = require("./gpu-grid-index-query.cjs");
|
|
@@ -284,6 +294,8 @@ var import_gpu_semantic_scalar_operation = require("./gpu-semantic-scalar-operat
|
|
|
284
294
|
var import_gpu_semantic_vector_operation = require("./gpu-semantic-vector-operation.cjs");
|
|
285
295
|
var import_gpu_semantic_spmv = require("./gpu-semantic-spmv.cjs");
|
|
286
296
|
var import_gpu_conjugate_gradient_program = require("./gpu-conjugate-gradient-program.cjs");
|
|
297
|
+
var import_gpu_adaptive_spmv = require("./gpu-adaptive-spmv.cjs");
|
|
298
|
+
var import_gpu_pcg = require("./gpu-pcg.cjs");
|
|
287
299
|
var import_gpu_coo_to_csr = require("./gpu-coo-to-csr.cjs");
|
|
288
300
|
var import_gpu_run_length_encode = require("./gpu-run-length-encode.cjs");
|
|
289
301
|
var import_gpu_incremental_execution = require("./gpu-incremental-execution.cjs");
|
|
@@ -302,6 +314,7 @@ var import_gpu_semantic_aggregation_operation = require("./gpu-semantic-aggregat
|
|
|
302
314
|
CompiledGPUGraph,
|
|
303
315
|
DispatchCommandBuffer,
|
|
304
316
|
DrawCommandBuffer,
|
|
317
|
+
GPUAdaptiveSpMV,
|
|
305
318
|
GPUAncestorProjection,
|
|
306
319
|
GPUBVH,
|
|
307
320
|
GPUBVHQuery,
|
|
@@ -361,6 +374,7 @@ var import_gpu_semantic_aggregation_operation = require("./gpu-semantic-aggregat
|
|
|
361
374
|
GPUIncrementalExecution,
|
|
362
375
|
GPUIndexPickingTarget,
|
|
363
376
|
GPUIndexedRangeCompaction,
|
|
377
|
+
GPUJacobiPCG,
|
|
364
378
|
GPULZByteBatchDecompressor,
|
|
365
379
|
GPULZByteDecompressor,
|
|
366
380
|
GPULoopOperation,
|
|
@@ -376,12 +390,15 @@ var import_gpu_semantic_aggregation_operation = require("./gpu-semantic-aggregat
|
|
|
376
390
|
GPURunLengthEncode,
|
|
377
391
|
GPUScan,
|
|
378
392
|
GPUScanUint64,
|
|
393
|
+
GPUScatter,
|
|
379
394
|
GPUScene,
|
|
380
395
|
GPUSceneDrawGeneration,
|
|
381
396
|
GPUSceneResourceGroups,
|
|
382
397
|
GPUSegmentOffsets,
|
|
383
398
|
GPUSegmentedBVH,
|
|
384
399
|
GPUSegmentedLayout,
|
|
400
|
+
GPUSegmentedReduction,
|
|
401
|
+
GPUSegmentedScan,
|
|
385
402
|
GPUSegmentedSort,
|
|
386
403
|
GPUShaderPassOperation,
|
|
387
404
|
GPUSort,
|
|
@@ -406,6 +423,7 @@ var import_gpu_semantic_aggregation_operation = require("./gpu-semantic-aggregat
|
|
|
406
423
|
GPU_GALLOPING_SEARCH_INVALID_QUERY_RANGE,
|
|
407
424
|
GPU_GALLOPING_SEARCH_INVALID_VALUE_RANGE,
|
|
408
425
|
GPU_GALLOPING_SEARCH_UNSORTED_QUERIES,
|
|
426
|
+
GPU_GRID_COORDINATE_WGSL,
|
|
409
427
|
GPU_HASH_INDEX_EMPTY_KEY,
|
|
410
428
|
GPU_HASH_INDEX_STATISTICS_LENGTH,
|
|
411
429
|
GPU_HASH_QUERY_STATISTICS_LENGTH,
|