@luma.gl/graph 10.0.0-alpha.12 → 10.0.0-alpha.14
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/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.map +3 -3
- package/dist/arrow/internal.cjs.map +2 -2
- package/dist/dist.dev.js +1506 -163
- package/dist/dist.min.js +401 -105
- 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-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-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-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-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/index.cjs +5 -0
- package/dist/gpu-core/index.cjs.map +3 -3
- package/dist/gpu-core/index.d.ts +2 -0
- package/dist/gpu-core/index.d.ts.map +1 -1
- package/dist/gpu-core/index.js +1 -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-gpu-vector-transfer.cjs +7 -2
- package/dist/gpu-data/cpu-gpu-vector-transfer.d.ts.map +1 -1
- package/dist/gpu-data/cpu-gpu-vector-transfer.js +9 -6
- package/dist/gpu-data/cpu-gpu-vector-transfer.js.map +1 -1
- 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/index.cjs +7 -2
- package/dist/gpu-data/index.cjs.map +3 -3
- package/dist/gpu-data/index.d.ts +2 -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-graph/index.cjs +5 -0
- package/dist/gpu-graph/index.cjs.map +3 -3
- package/dist/gpu-graph/index.d.ts +2 -0
- package/dist/gpu-graph/index.d.ts.map +1 -1
- package/dist/gpu-graph/index.js +1 -0
- package/dist/gpu-graph/index.js.map +1 -1
- package/dist/gpu-graph-algorithms/benchmarks.cjs.map +1 -1
- package/dist/gpu-graph-algorithms/index.cjs.map +1 -1
- package/dist/gpu-project/benchmarks.cjs.map +2 -2
- package/dist/gpu-project/crs.cjs.map +2 -2
- package/dist/gpu-project/graph.cjs.map +3 -3
- package/dist/gpu-project/index.cjs.map +2 -2
- 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 +2 -0
- package/dist/gpu-simple-graph/operation/gpu-data-evaluator.js +3 -0
- package/dist/gpu-simple-graph/operation/gpu-data-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 +112 -100
- 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 +120 -102
- package/dist/gpu-sql/gpu-sql.js.map +1 -1
- package/dist/gpu-sql/index.cjs.map +2 -2
- 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/index.cjs +5 -0
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +11 -8
- package/src/arrow/arrow-colors.ts +194 -33
- package/src/arrow/gpu/arrow-gpu-vector-adapters.ts +20 -7
- package/src/arrow/gpu/arrow-gpu-vector-conversion.ts +49 -6
- package/src/gpu-core/gpu-expression-operation.ts +1 -1
- package/src/gpu-core/gpu-graph-compiler.ts +61 -0
- package/src/gpu-core/gpu-group-aggregation.ts +38 -50
- package/src/gpu-core/gpu-reduction.ts +32 -42
- package/src/gpu-core/gpu-semantic-aggregation-operation.ts +150 -0
- package/src/gpu-core/index.ts +6 -0
- package/src/gpu-data/color-conversion.ts +158 -0
- package/src/gpu-data/cpu-gpu-vector-transfer.ts +10 -7
- package/src/gpu-data/gpu-data-buffer-props.ts +25 -0
- package/src/gpu-data/index.ts +3 -0
- package/src/gpu-graph/index.ts +9 -0
- package/src/gpu-simple-graph/index.ts +1 -0
- package/src/gpu-simple-graph/operation/gpu-data-evaluator.ts +2 -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 +130 -103
- package/src/gpu-tables/table/gpu-table.ts +2 -1
- package/src/index.ts +9 -0
package/LICENSE
CHANGED
|
@@ -8,16 +8,16 @@ Copyright (c) 2015 Uber Technologies, Inc.
|
|
|
8
8
|
This software includes parts of PhiloGL (https://github.com/philogb/philogl)
|
|
9
9
|
under MIT license. PhiloGL parts Copyright © 2013 Sencha Labs.
|
|
10
10
|
|
|
11
|
-
This software includes adaptations of some postprocessing code from
|
|
12
|
-
THREE.js (https://github.com/mrdoob/three.js/) under MIT license.
|
|
13
|
-
THREE.js parts Copyright © 2010-2018 three.js authors.
|
|
11
|
+
This software includes adaptations of some postprocessing code from
|
|
12
|
+
THREE.js (https://github.com/mrdoob/three.js/) under MIT license.
|
|
13
|
+
THREE.js parts Copyright © 2010-2018 three.js authors.
|
|
14
14
|
|
|
15
15
|
This software includes adaptations of Gaussian-splat rendering and
|
|
16
16
|
level-of-detail behavior from Spark (https://github.com/sparkjsdev/spark)
|
|
17
17
|
under MIT license.
|
|
18
18
|
Spark parts Copyright © 2025 WORLD LABS TECHNOLOGIES, INC.
|
|
19
19
|
|
|
20
|
-
Additional attribution given in specific source files.
|
|
20
|
+
Additional attribution given in specific source files.
|
|
21
21
|
|
|
22
22
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
23
23
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Third-party notices: graph
|
|
2
|
+
|
|
3
|
+
Application-facing GPU graph composition and independently implemented analysis, physics, and projection operations. NVIDIA RAPIDS cuGraph, cuVS, cuSpatial, cuProj, cuDF, cuCIM, and cuXfilter provide inspiration; Crossfilter and Lalit Maganti/Perfetto provide interactive analysis ideas. These are algorithm and API inspirations, not claims that their implementation code is redistributed. See feature documentation for differences. The physics guide uses Erin Catto’s Box2D simulation documentation as a timestep reference; no Box2D solver port is claimed.
|
|
4
|
+
|
|
5
|
+
See the [repository license](./LICENSE) and [References and credits](https://luma.gl/docs/references-and-credits). Separately installed dependencies retain their own licenses. No additional embedded third-party source is identified in this inventory.
|
|
6
|
+
|
|
7
|
+
## Projection formula references
|
|
8
|
+
|
|
9
|
+
The PROJ contributors document the published projection formulas and coefficient
|
|
10
|
+
matrices used by independently implemented WebGPU kernels in `src/gpu-project`.
|
|
11
|
+
Source comments link the relevant Lambert conformal conic, Albers equal-area,
|
|
12
|
+
Transverse Mercator, Web Mercator, and unit-conversion references.
|
|
13
|
+
The sixth-order Krüger matrices in `projection-transverse-mercator.ts` are
|
|
14
|
+
identified there as published coefficients, rather than copied PROJ program code.
|
|
15
|
+
[PROJ projection documentation](https://proj.org/en/stable/operations/projections/index.html).
|
|
16
|
+
|
|
17
|
+
## Parcels adaptive advection
|
|
18
|
+
|
|
19
|
+
Copyright (c) 2025, Parcels team. RKF45 stages and controller in `src/experimental/simulation/scientific-flow-rk45-shaders.ts` adapt [Parcels AdvectionRK45](https://github.com/Parcels-code/Parcels/blob/8584c09a4189ed29a49aa980b9830a2379e42c65/src/parcels/kernels/_advection.py), at commit `8584c09a4189ed29a49aa980b9830a2379e42c65`. Full terms: [Parcels MIT license](./src/experimental/simulation/PARCELS-LICENSE.txt).
|
|
@@ -30,36 +30,53 @@ var import_gpu_vector_evaluator = require("../gpu-simple-graph/operation/gpu-vec
|
|
|
30
30
|
var import_gpu_data = require("@luma.gl/graph/gpu-data");
|
|
31
31
|
var import_apache_arrow = require("apache-arrow");
|
|
32
32
|
var import_arrow_gpu_vector_adapters = require("./gpu/arrow-gpu-vector-adapters.cjs");
|
|
33
|
+
var import_arrow_gpu_data = require("./gpu/arrow-gpu-data.cjs");
|
|
34
|
+
var import_color_conversion = require("../gpu-data/color-conversion.cjs");
|
|
33
35
|
const ARROW_UINT8_COLOR_TYPE = new import_apache_arrow.FixedSizeList(4, new import_apache_arrow.Field("value", new import_apache_arrow.Uint8(), false));
|
|
34
36
|
async function convertColors(device, colors, props = {}) {
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
var _a;
|
|
38
|
+
const format = (0, import_gpu_data.resolveColorOutputFormat)(((_a = props.inputFormat) == null ? void 0 : _a.startsWith("float16")) ? "float16x4" : colors.format, props);
|
|
39
|
+
const outputType = getColorArrowType(format);
|
|
40
|
+
const byteStride = (0, import_gpu_data.getGPUVectorFormatInfo)(format).byteLength;
|
|
41
|
+
if (props.format === "preserve" && colors.format === format) {
|
|
42
|
+
return new import_gpu_data.GPUVector({
|
|
43
|
+
type: "data",
|
|
44
|
+
name: props.name ?? colors.name,
|
|
45
|
+
format,
|
|
46
|
+
dataType: outputType,
|
|
47
|
+
data: colors.data,
|
|
48
|
+
ownsData: false
|
|
42
49
|
});
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
});
|
|
50
|
+
}
|
|
51
|
+
const source = import_gpu_vector_evaluator.GPUVectorEvaluator.fromGPUVector(colors);
|
|
52
|
+
const converted = source.mapGPUData((data) => (0, import_convert_colors.convertColorData)(data, { inputFormat: props.inputFormat, format }));
|
|
53
|
+
const outputBuffers = [];
|
|
46
54
|
try {
|
|
55
|
+
converted.gpuDataEvaluators.forEach((evaluator, chunkIndex) => {
|
|
56
|
+
const buffer = device.createBuffer({
|
|
57
|
+
id: `${props.name ?? "colors"}-${chunkIndex}`,
|
|
58
|
+
usage: import_core.Buffer.VERTEX | import_core.Buffer.STORAGE | import_core.Buffer.COPY_DST | import_core.Buffer.COPY_SRC,
|
|
59
|
+
byteLength: Math.max(evaluator.byteLength, 4)
|
|
60
|
+
});
|
|
61
|
+
evaluator.setTargetBuffer({ buffer });
|
|
62
|
+
outputBuffers.push(buffer);
|
|
63
|
+
});
|
|
47
64
|
const evaluated = await converted.evaluate(device, {
|
|
48
65
|
name: props.name ?? "colors",
|
|
49
|
-
format
|
|
66
|
+
format
|
|
50
67
|
});
|
|
51
68
|
const data = evaluated.data.map((chunk, chunkIndex) => {
|
|
52
69
|
const sourceData = colors.data[chunkIndex];
|
|
53
70
|
const readbackMetadata = sourceData ? getConvertedColorReadbackMetadata(sourceData) : void 0;
|
|
54
71
|
return new import_gpu_data.GPUData({
|
|
55
72
|
buffer: outputBuffers[chunkIndex],
|
|
56
|
-
dataType:
|
|
57
|
-
format
|
|
73
|
+
dataType: outputType,
|
|
74
|
+
format,
|
|
58
75
|
length: chunk.length,
|
|
59
76
|
stride: 4,
|
|
60
77
|
byteOffset: chunk.byteOffset,
|
|
61
|
-
byteStride
|
|
62
|
-
rowByteLength:
|
|
78
|
+
byteStride,
|
|
79
|
+
rowByteLength: byteStride,
|
|
63
80
|
ownsBuffer: true,
|
|
64
81
|
nullBitmap: readbackMetadata == null ? void 0 : readbackMetadata.nullBitmap,
|
|
65
82
|
readbackMetadata
|
|
@@ -68,8 +85,8 @@ async function convertColors(device, colors, props = {}) {
|
|
|
68
85
|
return new import_gpu_data.GPUVector({
|
|
69
86
|
type: "data",
|
|
70
87
|
name: evaluated.name,
|
|
71
|
-
dataType:
|
|
72
|
-
format
|
|
88
|
+
dataType: outputType,
|
|
89
|
+
format,
|
|
73
90
|
data,
|
|
74
91
|
ownsData: true
|
|
75
92
|
});
|
|
@@ -103,8 +120,68 @@ function canConvertColors(colors) {
|
|
|
103
120
|
}
|
|
104
121
|
}
|
|
105
122
|
async function convertArrowColors(device, colors, props = {}) {
|
|
123
|
+
var _a;
|
|
106
124
|
validateArrowColorType(colors.type, "convertArrowColors");
|
|
107
125
|
const inputFormat = getArrowColorInputFormat(colors.type);
|
|
126
|
+
const sourceFormat = getArrowColorGPUFormat(inputFormat);
|
|
127
|
+
const format = (0, import_gpu_data.resolveColorOutputFormat)(inputFormat.startsWith("float16") ? "float16x4" : sourceFormat, props);
|
|
128
|
+
if (props.format === "preserve" && (sourceFormat === format || sourceFormat === "uint8x4" && format === "unorm8x4")) {
|
|
129
|
+
return (0, import_arrow_gpu_vector_adapters.makeGPUVectorFromArrow)(device, colors, {
|
|
130
|
+
...props.bufferProps,
|
|
131
|
+
name: props.name ?? "colors",
|
|
132
|
+
format,
|
|
133
|
+
preserveDataChunks: true
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
if (props.preferCPU || device.type !== "webgpu") {
|
|
137
|
+
const cpuSource = new import_gpu_data.CPUVector({
|
|
138
|
+
name: props.name ?? "colors",
|
|
139
|
+
format: sourceFormat,
|
|
140
|
+
data: colors.data.map((chunk) => new import_gpu_data.CPUData({
|
|
141
|
+
buffer: (0, import_arrow_gpu_data.getArrowDataBufferSource)(chunk),
|
|
142
|
+
format: sourceFormat,
|
|
143
|
+
length: chunk.length,
|
|
144
|
+
nullBitmap: (0, import_arrow_gpu_vector_adapters.makeArrowGPUValidityBitmap)((0, import_arrow_gpu_data.getArrowFixedSizeListRowValidity)(chunk))
|
|
145
|
+
}))
|
|
146
|
+
});
|
|
147
|
+
const data = [];
|
|
148
|
+
try {
|
|
149
|
+
for (const chunk of cpuSource.data) {
|
|
150
|
+
const converted = (0, import_color_conversion.convertCPUColorData)(chunk, format, inputFormat);
|
|
151
|
+
const bytes = new Uint8Array(converted.buffer, converted.byteOffset, converted.length * converted.byteStride);
|
|
152
|
+
const readbackMetadata = getConvertedColorReadbackMetadata({
|
|
153
|
+
nullBitmap: chunk.nullBitmap,
|
|
154
|
+
length: chunk.length
|
|
155
|
+
});
|
|
156
|
+
data.push(new import_gpu_data.GPUData({
|
|
157
|
+
buffer: device.createBuffer({
|
|
158
|
+
...props.bufferProps,
|
|
159
|
+
byteLength: Math.max(bytes.length, 4),
|
|
160
|
+
data: bytes.length ? bytes : new Uint8Array(4),
|
|
161
|
+
usage: ((_a = props.bufferProps) == null ? void 0 : _a.usage) ?? import_core.Buffer.VERTEX | import_core.Buffer.STORAGE | import_core.Buffer.COPY_DST | import_core.Buffer.COPY_SRC
|
|
162
|
+
}),
|
|
163
|
+
format,
|
|
164
|
+
dataType: getColorArrowType(format),
|
|
165
|
+
length: chunk.length,
|
|
166
|
+
ownsBuffer: true,
|
|
167
|
+
nullBitmap: readbackMetadata == null ? void 0 : readbackMetadata.nullBitmap,
|
|
168
|
+
readbackMetadata
|
|
169
|
+
}));
|
|
170
|
+
}
|
|
171
|
+
return new import_gpu_data.GPUVector({
|
|
172
|
+
type: "data",
|
|
173
|
+
name: props.name ?? "colors",
|
|
174
|
+
format,
|
|
175
|
+
dataType: getColorArrowType(format),
|
|
176
|
+
data,
|
|
177
|
+
ownsData: true
|
|
178
|
+
});
|
|
179
|
+
} catch (error) {
|
|
180
|
+
for (const chunk of data)
|
|
181
|
+
chunk.destroy();
|
|
182
|
+
throw error;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
108
185
|
const source = (0, import_arrow_gpu_vector_adapters.makeGPUVectorFromArrow)(device, colors, {
|
|
109
186
|
...props.bufferProps,
|
|
110
187
|
name: props.name ? `${props.name}-source` : "colors-source",
|
|
@@ -114,7 +191,8 @@ async function convertArrowColors(device, colors, props = {}) {
|
|
|
114
191
|
try {
|
|
115
192
|
return await convertColors(device, source, {
|
|
116
193
|
name: props.name ?? "colors",
|
|
117
|
-
inputFormat
|
|
194
|
+
inputFormat,
|
|
195
|
+
format
|
|
118
196
|
});
|
|
119
197
|
} finally {
|
|
120
198
|
source.destroy();
|
|
@@ -181,6 +259,9 @@ function getConvertedColorReadbackMetadata(source) {
|
|
|
181
259
|
}
|
|
182
260
|
return nullCount > 0 ? { kind: "fixed-size-list", nullCount, nullBitmap, childNullCount: 0 } : void 0;
|
|
183
261
|
}
|
|
262
|
+
function getColorArrowType(format) {
|
|
263
|
+
return format === "unorm8x4" ? ARROW_UINT8_COLOR_TYPE : format === "float16x4" ? new import_apache_arrow.FixedSizeList(4, new import_apache_arrow.Field("value", new import_apache_arrow.Float16(), false)) : new import_apache_arrow.FixedSizeList(4, new import_apache_arrow.Field("value", new import_apache_arrow.Float32(), false));
|
|
264
|
+
}
|
|
184
265
|
// Annotate the CommonJS export names for ESM import in node:
|
|
185
266
|
0 && (module.exports = {
|
|
186
267
|
canConvertColors,
|
|
@@ -1,24 +1,41 @@
|
|
|
1
1
|
import { type Device } from '@luma.gl/core';
|
|
2
2
|
import { type ColorInputFormat } from "../gpu-simple-graph/operations/convert-colors.js";
|
|
3
|
-
import { GPUVector, type GPUVectorBufferProps } from '@luma.gl/graph/gpu-data';
|
|
3
|
+
import { GPUVector, type ColorConversionOptions, type ColorOutputFormat, type GPUVectorBufferProps } from '@luma.gl/graph/gpu-data';
|
|
4
4
|
import { FixedSizeList, Float16, Float32, Uint8, Vector } from 'apache-arrow';
|
|
5
5
|
export type ArrowColorType = FixedSizeList<Uint8> | FixedSizeList<Float16> | FixedSizeList<Float32>;
|
|
6
6
|
type ArrowUint8ColorType = FixedSizeList<Uint8>;
|
|
7
|
-
type ConvertColorsProps = {
|
|
7
|
+
type ConvertColorsProps = ColorConversionOptions & {
|
|
8
8
|
name?: string;
|
|
9
9
|
inputFormat?: ColorInputFormat;
|
|
10
10
|
};
|
|
11
|
-
type ConvertArrowColorsProps = {
|
|
11
|
+
type ConvertArrowColorsProps = ColorConversionOptions & {
|
|
12
|
+
/** Convert Arrow payloads before uploading; avoids source upload and readback on CPU backends. */
|
|
13
|
+
preferCPU?: boolean;
|
|
12
14
|
name?: string;
|
|
13
15
|
bufferProps?: GPUVectorBufferProps;
|
|
14
16
|
};
|
|
15
|
-
/** Converts fixed-width GPU RGB/RGBA chunks
|
|
16
|
-
export declare function convertColors(device: Device, colors: GPUVector, props?: ConvertColorsProps
|
|
17
|
-
|
|
17
|
+
/** Converts fixed-width GPU RGB/RGBA chunks; preserve returns a borrowed wrapper when compatible. */
|
|
18
|
+
export declare function convertColors(device: Device, colors: GPUVector, props?: ConvertColorsProps & {
|
|
19
|
+
format?: 'unorm8x4';
|
|
20
|
+
}): Promise<GPUVector<'unorm8x4'>>;
|
|
21
|
+
export declare function convertColors<T extends ColorOutputFormat>(device: Device, colors: GPUVector, props: ConvertColorsProps & {
|
|
22
|
+
format: T;
|
|
23
|
+
}): Promise<GPUVector<T>>;
|
|
24
|
+
export declare function convertColors(device: Device, colors: GPUVector, props: ConvertColorsProps): Promise<GPUVector<ColorOutputFormat>>;
|
|
25
|
+
/** Returns true for supported fixed-width RGB/RGBA Arrow or GPU inputs. */
|
|
18
26
|
export declare function canConvertColors(colors: GPUVector | Vector): boolean;
|
|
19
|
-
/**
|
|
20
|
-
export declare function convertArrowColors(device: Device, colors: Vector<ArrowColorType>, props?: ConvertArrowColorsProps
|
|
21
|
-
|
|
22
|
-
|
|
27
|
+
/** Converts Arrow RGB/RGBA chunks to selected storage without changing color space or alpha convention. */
|
|
28
|
+
export declare function convertArrowColors(device: Device, colors: Vector<ArrowColorType>, props?: ConvertArrowColorsProps & {
|
|
29
|
+
format?: 'unorm8x4';
|
|
30
|
+
}): Promise<GPUVector<'unorm8x4'>>;
|
|
31
|
+
export declare function convertArrowColors<T extends ColorOutputFormat>(device: Device, colors: Vector<ArrowColorType>, props: ConvertArrowColorsProps & {
|
|
32
|
+
format: T;
|
|
33
|
+
}): Promise<GPUVector<T>>;
|
|
34
|
+
export declare function convertArrowColors(device: Device, colors: Vector<ArrowColorType>, props: ConvertArrowColorsProps): Promise<GPUVector<ColorOutputFormat>>;
|
|
35
|
+
/** Converts color storage and reads it back; floating outputs retain HDR and negative channels. */
|
|
36
|
+
export declare function convertArrowColorsToArrow(device: Device, colors: Vector<ArrowColorType>, props?: ConvertArrowColorsProps & {
|
|
37
|
+
format?: 'unorm8x4';
|
|
38
|
+
}): Promise<Vector<ArrowUint8ColorType>>;
|
|
39
|
+
export declare function convertArrowColorsToArrow(device: Device, colors: Vector<ArrowColorType>, props: ConvertArrowColorsProps): Promise<Vector<ArrowColorType>>;
|
|
23
40
|
export {};
|
|
24
41
|
//# sourceMappingURL=arrow-colors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow-colors.d.ts","sourceRoot":"","sources":["../../src/arrow/arrow-colors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAS,KAAK,MAAM,EAAoB,MAAM,eAAe,CAAC;AACrE,OAAO,EAEL,KAAK,gBAAgB,EACtB,yDAAsD;AAGvD,OAAO,
|
|
1
|
+
{"version":3,"file":"arrow-colors.d.ts","sourceRoot":"","sources":["../../src/arrow/arrow-colors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAS,KAAK,MAAM,EAAoB,MAAM,eAAe,CAAC;AACrE,OAAO,EAEL,KAAK,gBAAgB,EACtB,yDAAsD;AAGvD,OAAO,EAML,SAAS,EACT,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAkB,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAC,MAAM,cAAc,CAAC;AAY7F,MAAM,MAAM,cAAc,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,aAAa,CAAC,OAAO,CAAC,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;AACpG,KAAK,mBAAmB,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAEhD,KAAK,kBAAkB,GAAG,sBAAsB,GAAG;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,gBAAgB,CAAC;CAChC,CAAC;AAEF,KAAK,uBAAuB,GAAG,sBAAsB,GAAG;IACtD,kGAAkG;IAClG,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IA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,CAAC;AACzB,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC,EAC9B,KAAK,EAAE,uBAAuB,GAC7B,OAAO,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAsGzC,mGAAmG;AACnG,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC,EAC9B,KAAK,CAAC,EAAE,uBAAuB,GAAG;IAAC,MAAM,CAAC,EAAE,UAAU,CAAA;CAAC,GACtD,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC;AACxC,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC,EAC9B,KAAK,EAAE,uBAAuB,GAC7B,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC"}
|
|
@@ -5,27 +5,42 @@ import { Buffer } from '@luma.gl/core';
|
|
|
5
5
|
import { convertColorData } from "../gpu-simple-graph/operations/convert-colors.js";
|
|
6
6
|
import { GPUDataEvaluator } from "../gpu-simple-graph/operation/gpu-data-evaluator.js";
|
|
7
7
|
import { GPUVectorEvaluator } from "../gpu-simple-graph/operation/gpu-vector-evaluator.js";
|
|
8
|
-
import { GPUData, GPUVector } from '@luma.gl/graph/gpu-data';
|
|
8
|
+
import { CPUData, CPUVector, resolveColorOutputFormat, getGPUVectorFormatInfo, GPUData, GPUVector } from '@luma.gl/graph/gpu-data';
|
|
9
9
|
import { DataType, Field, FixedSizeList, Float16, Float32, Uint8 } from 'apache-arrow';
|
|
10
|
-
import { makeGPUVectorFromArrow, readArrowGPUVectorAsync } from "./gpu/arrow-gpu-vector-adapters.js";
|
|
10
|
+
import { makeArrowGPUValidityBitmap, makeGPUVectorFromArrow, readArrowGPUVectorAsync } from "./gpu/arrow-gpu-vector-adapters.js";
|
|
11
|
+
import { getArrowDataBufferSource, getArrowFixedSizeListRowValidity } from "./gpu/arrow-gpu-data.js";
|
|
12
|
+
import { convertCPUColorData } from "../gpu-data/color-conversion.js";
|
|
11
13
|
const ARROW_UINT8_COLOR_TYPE = new FixedSizeList(4, new Field('value', new Uint8(), false));
|
|
12
|
-
/** Converts fixed-width GPU RGB/RGBA chunks to materialized normalized Uint8 RGBA chunks. */
|
|
13
14
|
export async function convertColors(device, colors, props = {}) {
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
const format = resolveColorOutputFormat(props.inputFormat?.startsWith('float16') ? 'float16x4' : colors.format, props);
|
|
16
|
+
const outputType = getColorArrowType(format);
|
|
17
|
+
const byteStride = getGPUVectorFormatInfo(format).byteLength;
|
|
18
|
+
if (props.format === 'preserve' && colors.format === format) {
|
|
19
|
+
return new GPUVector({
|
|
20
|
+
type: 'data',
|
|
21
|
+
name: props.name ?? colors.name,
|
|
22
|
+
format,
|
|
23
|
+
dataType: outputType,
|
|
24
|
+
data: colors.data,
|
|
25
|
+
ownsData: false
|
|
21
26
|
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
});
|
|
27
|
+
}
|
|
28
|
+
const source = GPUVectorEvaluator.fromGPUVector(colors);
|
|
29
|
+
const converted = source.mapGPUData(data => convertColorData(data, { inputFormat: props.inputFormat, format }));
|
|
30
|
+
const outputBuffers = [];
|
|
25
31
|
try {
|
|
32
|
+
converted.gpuDataEvaluators.forEach((evaluator, chunkIndex) => {
|
|
33
|
+
const buffer = device.createBuffer({
|
|
34
|
+
id: `${props.name ?? 'colors'}-${chunkIndex}`,
|
|
35
|
+
usage: Buffer.VERTEX | Buffer.STORAGE | Buffer.COPY_DST | Buffer.COPY_SRC,
|
|
36
|
+
byteLength: Math.max(evaluator.byteLength, 4)
|
|
37
|
+
});
|
|
38
|
+
evaluator.setTargetBuffer({ buffer });
|
|
39
|
+
outputBuffers.push(buffer);
|
|
40
|
+
});
|
|
26
41
|
const evaluated = await converted.evaluate(device, {
|
|
27
42
|
name: props.name ?? 'colors',
|
|
28
|
-
format
|
|
43
|
+
format
|
|
29
44
|
});
|
|
30
45
|
const data = evaluated.data.map((chunk, chunkIndex) => {
|
|
31
46
|
const sourceData = colors.data[chunkIndex];
|
|
@@ -34,13 +49,13 @@ export async function convertColors(device, colors, props = {}) {
|
|
|
34
49
|
: undefined;
|
|
35
50
|
return new GPUData({
|
|
36
51
|
buffer: outputBuffers[chunkIndex],
|
|
37
|
-
dataType:
|
|
38
|
-
format
|
|
52
|
+
dataType: outputType,
|
|
53
|
+
format,
|
|
39
54
|
length: chunk.length,
|
|
40
55
|
stride: 4,
|
|
41
56
|
byteOffset: chunk.byteOffset,
|
|
42
|
-
byteStride
|
|
43
|
-
rowByteLength:
|
|
57
|
+
byteStride,
|
|
58
|
+
rowByteLength: byteStride,
|
|
44
59
|
ownsBuffer: true,
|
|
45
60
|
nullBitmap: readbackMetadata?.nullBitmap,
|
|
46
61
|
readbackMetadata
|
|
@@ -49,8 +64,8 @@ export async function convertColors(device, colors, props = {}) {
|
|
|
49
64
|
return new GPUVector({
|
|
50
65
|
type: 'data',
|
|
51
66
|
name: evaluated.name,
|
|
52
|
-
dataType:
|
|
53
|
-
format
|
|
67
|
+
dataType: outputType,
|
|
68
|
+
format,
|
|
54
69
|
data,
|
|
55
70
|
ownsData: true
|
|
56
71
|
});
|
|
@@ -66,7 +81,7 @@ export async function convertColors(device, colors, props = {}) {
|
|
|
66
81
|
source.destroy();
|
|
67
82
|
}
|
|
68
83
|
}
|
|
69
|
-
/** Returns true
|
|
84
|
+
/** Returns true for supported fixed-width RGB/RGBA Arrow or GPU inputs. */
|
|
70
85
|
export function canConvertColors(colors) {
|
|
71
86
|
try {
|
|
72
87
|
if (colors instanceof GPUVector) {
|
|
@@ -89,10 +104,71 @@ export function canConvertColors(colors) {
|
|
|
89
104
|
return false;
|
|
90
105
|
}
|
|
91
106
|
}
|
|
92
|
-
/** Uploads Arrow RGB/RGBA chunks unchanged, converts each chunk, and returns Uint8 RGBA rows. */
|
|
93
107
|
export async function convertArrowColors(device, colors, props = {}) {
|
|
94
108
|
validateArrowColorType(colors.type, 'convertArrowColors');
|
|
95
109
|
const inputFormat = getArrowColorInputFormat(colors.type);
|
|
110
|
+
const sourceFormat = getArrowColorGPUFormat(inputFormat);
|
|
111
|
+
const format = resolveColorOutputFormat(inputFormat.startsWith('float16') ? 'float16x4' : sourceFormat, props);
|
|
112
|
+
if (props.format === 'preserve' &&
|
|
113
|
+
(sourceFormat === format || (sourceFormat === 'uint8x4' && format === 'unorm8x4'))) {
|
|
114
|
+
return makeGPUVectorFromArrow(device, colors, {
|
|
115
|
+
...props.bufferProps,
|
|
116
|
+
name: props.name ?? 'colors',
|
|
117
|
+
format,
|
|
118
|
+
preserveDataChunks: true
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
if (props.preferCPU || device.type !== 'webgpu') {
|
|
122
|
+
const cpuSource = new CPUVector({
|
|
123
|
+
name: props.name ?? 'colors',
|
|
124
|
+
format: sourceFormat,
|
|
125
|
+
data: colors.data.map(chunk => new CPUData({
|
|
126
|
+
buffer: getArrowDataBufferSource(chunk),
|
|
127
|
+
format: sourceFormat,
|
|
128
|
+
length: chunk.length,
|
|
129
|
+
nullBitmap: makeArrowGPUValidityBitmap(getArrowFixedSizeListRowValidity(chunk))
|
|
130
|
+
}))
|
|
131
|
+
});
|
|
132
|
+
const data = [];
|
|
133
|
+
try {
|
|
134
|
+
for (const chunk of cpuSource.data) {
|
|
135
|
+
const converted = convertCPUColorData(chunk, format, inputFormat);
|
|
136
|
+
const bytes = new Uint8Array(converted.buffer, converted.byteOffset, converted.length * converted.byteStride);
|
|
137
|
+
const readbackMetadata = getConvertedColorReadbackMetadata({
|
|
138
|
+
nullBitmap: chunk.nullBitmap,
|
|
139
|
+
length: chunk.length
|
|
140
|
+
});
|
|
141
|
+
data.push(new GPUData({
|
|
142
|
+
buffer: device.createBuffer({
|
|
143
|
+
...props.bufferProps,
|
|
144
|
+
byteLength: Math.max(bytes.length, 4),
|
|
145
|
+
data: bytes.length ? bytes : new Uint8Array(4),
|
|
146
|
+
usage: props.bufferProps?.usage ??
|
|
147
|
+
Buffer.VERTEX | Buffer.STORAGE | Buffer.COPY_DST | Buffer.COPY_SRC
|
|
148
|
+
}),
|
|
149
|
+
format,
|
|
150
|
+
dataType: getColorArrowType(format),
|
|
151
|
+
length: chunk.length,
|
|
152
|
+
ownsBuffer: true,
|
|
153
|
+
nullBitmap: readbackMetadata?.nullBitmap,
|
|
154
|
+
readbackMetadata
|
|
155
|
+
}));
|
|
156
|
+
}
|
|
157
|
+
return new GPUVector({
|
|
158
|
+
type: 'data',
|
|
159
|
+
name: props.name ?? 'colors',
|
|
160
|
+
format,
|
|
161
|
+
dataType: getColorArrowType(format),
|
|
162
|
+
data,
|
|
163
|
+
ownsData: true
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
catch (error) {
|
|
167
|
+
for (const chunk of data)
|
|
168
|
+
chunk.destroy();
|
|
169
|
+
throw error;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
96
172
|
const source = makeGPUVectorFromArrow(device, colors, {
|
|
97
173
|
...props.bufferProps,
|
|
98
174
|
name: props.name ? `${props.name}-source` : 'colors-source',
|
|
@@ -102,14 +178,14 @@ export async function convertArrowColors(device, colors, props = {}) {
|
|
|
102
178
|
try {
|
|
103
179
|
return await convertColors(device, source, {
|
|
104
180
|
name: props.name ?? 'colors',
|
|
105
|
-
inputFormat
|
|
181
|
+
inputFormat,
|
|
182
|
+
format
|
|
106
183
|
});
|
|
107
184
|
}
|
|
108
185
|
finally {
|
|
109
186
|
source.destroy();
|
|
110
187
|
}
|
|
111
188
|
}
|
|
112
|
-
/** Normalizes Arrow RGB/RGBA rows and reads the canonical Uint8 RGBA rows back to Arrow. */
|
|
113
189
|
export async function convertArrowColorsToArrow(device, colors, props = {}) {
|
|
114
190
|
const converted = await convertArrowColors(device, colors, props);
|
|
115
191
|
try {
|
|
@@ -182,4 +258,11 @@ function getConvertedColorReadbackMetadata(source) {
|
|
|
182
258
|
? { kind: 'fixed-size-list', nullCount, nullBitmap, childNullCount: 0 }
|
|
183
259
|
: undefined;
|
|
184
260
|
}
|
|
261
|
+
function getColorArrowType(format) {
|
|
262
|
+
return format === 'unorm8x4'
|
|
263
|
+
? ARROW_UINT8_COLOR_TYPE
|
|
264
|
+
: format === 'float16x4'
|
|
265
|
+
? new FixedSizeList(4, new Field('value', new Float16(), false))
|
|
266
|
+
: new FixedSizeList(4, new Field('value', new Float32(), false));
|
|
267
|
+
}
|
|
185
268
|
//# sourceMappingURL=arrow-colors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow-colors.js","sourceRoot":"","sources":["../../src/arrow/arrow-colors.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAE5D,OAAO,EAAC,MAAM,EAAiC,MAAM,eAAe,CAAC;AACrE,OAAO,EACL,gBAAgB,EAEjB,yDAAsD;AACvD,OAAO,EAAC,gBAAgB,EAAC,4DAAyD;AAClF,OAAO,EAAC,kBAAkB,EAAC,8DAA2D;AACtF,OAAO,
|
|
1
|
+
{"version":3,"file":"arrow-colors.js","sourceRoot":"","sources":["../../src/arrow/arrow-colors.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAE5D,OAAO,EAAC,MAAM,EAAiC,MAAM,eAAe,CAAC;AACrE,OAAO,EACL,gBAAgB,EAEjB,yDAAsD;AACvD,OAAO,EAAC,gBAAgB,EAAC,4DAAyD;AAClF,OAAO,EAAC,kBAAkB,EAAC,8DAA2D;AACtF,OAAO,EACL,OAAO,EACP,SAAS,EACT,wBAAwB,EACxB,sBAAsB,EACtB,OAAO,EACP,SAAS,EAIV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,QAAQ,EAAE,KAAK,EAA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AE,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC,EAAC;QACrE,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAyB;IAClD,OAAO,MAAM,KAAK,UAAU;QAC1B,CAAC,CAAC,sBAAsB;QACxB,CAAC,CAAC,MAAM,KAAK,WAAW;YACtB,CAAC,CAAC,IAAI,aAAa,CAAC,CAAC,EAAE,IAAI,KAAK,CAAC,OAAO,EAAE,IAAI,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC;YAChE,CAAC,CAAC,IAAI,aAAa,CAAC,CAAC,EAAE,IAAI,KAAK,CAAC,OAAO,EAAE,IAAI,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;AACvE,CAAC"}
|
|
@@ -24,13 +24,14 @@ __export(arrow_gpu_vector_adapters_exports, {
|
|
|
24
24
|
isArrowUtf8DictionaryType: () => isArrowUtf8DictionaryType,
|
|
25
25
|
isCanonicalFloat32ArrowMatrixInfo: () => isCanonicalFloat32ArrowMatrixInfo,
|
|
26
26
|
isStorageFixedSizeListArrowType: () => isStorageFixedSizeListArrowType,
|
|
27
|
+
makeArrowGPUValidityBitmap: () => makeArrowGPUValidityBitmap,
|
|
27
28
|
makeGPUDataFromArrowData: () => makeGPUDataFromArrowData,
|
|
28
29
|
makeGPUVectorFromArrow: () => makeGPUVectorFromArrow,
|
|
29
30
|
readArrowGPUDataAsync: () => readArrowGPUDataAsync,
|
|
30
31
|
readArrowGPUVectorAsync: () => readArrowGPUVectorAsync
|
|
31
32
|
});
|
|
32
33
|
module.exports = __toCommonJS(arrow_gpu_vector_adapters_exports);
|
|
33
|
-
var
|
|
34
|
+
var import_gpu_data_buffer_props = require("../../gpu-data/gpu-data-buffer-props.cjs");
|
|
34
35
|
var import_dynamic = require("@luma.gl/core/dynamic");
|
|
35
36
|
var import_gpu_data = require("@luma.gl/graph/gpu-data");
|
|
36
37
|
var import_apache_arrow = require("apache-arrow");
|
|
@@ -98,7 +99,7 @@ function makeGPUDataFromArrowData(device, data, props = {}) {
|
|
|
98
99
|
const byteStride2 = (0, import_arrow_gpu_data.getArrowTypeByteStride)(arrowType.indices);
|
|
99
100
|
return new import_gpu_data.GPUData({
|
|
100
101
|
buffer: new import_dynamic.DynamicBuffer(device, {
|
|
101
|
-
usage
|
|
102
|
+
...bufferProps.usage === void 0 ? (0, import_gpu_data_buffer_props.getGPUDataBufferProps)(device, format === "uint16" ? "uint16" : "uint32") : {},
|
|
102
103
|
...bufferProps,
|
|
103
104
|
data: getArrowDictionaryIndexBufferSource(data)
|
|
104
105
|
}),
|
|
@@ -114,7 +115,7 @@ function makeGPUDataFromArrowData(device, data, props = {}) {
|
|
|
114
115
|
if (import_apache_arrow.DataType.isUtf8(arrowType)) {
|
|
115
116
|
return new import_gpu_data.GPUData({
|
|
116
117
|
buffer: new import_dynamic.DynamicBuffer(device, {
|
|
117
|
-
usage
|
|
118
|
+
...bufferProps.usage === void 0 ? (0, import_gpu_data_buffer_props.getGPUDataBufferProps)(device, format === "uint16" ? "uint16" : "uint32") : {},
|
|
118
119
|
...bufferProps,
|
|
119
120
|
data: (0, import_arrow_gpu_data.getArrowUtf8DataBufferSource)(data)
|
|
120
121
|
}),
|
|
@@ -137,7 +138,7 @@ function makeGPUDataFromArrowData(device, data, props = {}) {
|
|
|
137
138
|
const byteStride2 = (0, import_arrow_gpu_data.getArrowTypeByteStride)(arrowType);
|
|
138
139
|
return new import_gpu_data.GPUData({
|
|
139
140
|
buffer: new import_dynamic.DynamicBuffer(device, {
|
|
140
|
-
usage
|
|
141
|
+
...bufferProps.usage === void 0 ? (0, import_gpu_data_buffer_props.getGPUDataBufferProps)(device, format === "uint16" ? "uint16" : "uint32") : {},
|
|
141
142
|
...bufferProps,
|
|
142
143
|
data: (0, import_arrow_gpu_data.getArrowVariableLengthAttributeDataBufferSource)(data)
|
|
143
144
|
}),
|
|
@@ -158,7 +159,7 @@ function makeGPUDataFromArrowData(device, data, props = {}) {
|
|
|
158
159
|
const byteStride = (0, import_arrow_gpu_data.getArrowTypeByteStride)(arrowType);
|
|
159
160
|
return new import_gpu_data.GPUData({
|
|
160
161
|
buffer: new import_dynamic.DynamicBuffer(device, {
|
|
161
|
-
usage
|
|
162
|
+
...bufferProps.usage === void 0 ? (0, import_gpu_data_buffer_props.getGPUDataBufferProps)(device, format === "uint16" ? "uint16" : "uint32") : {},
|
|
162
163
|
...bufferProps,
|
|
163
164
|
data: (0, import_arrow_gpu_data.getArrowDataBufferSource)(data)
|
|
164
165
|
}),
|
|
@@ -210,7 +211,7 @@ function makeGPUVectorFromArrow(device, vector, props = {}) {
|
|
|
210
211
|
});
|
|
211
212
|
}
|
|
212
213
|
const buffer = device.createBuffer({
|
|
213
|
-
usage
|
|
214
|
+
...bufferProps.usage === void 0 ? (0, import_gpu_data_buffer_props.getGPUDataBufferProps)(device, vectorFormat === "uint16" ? "uint16" : "uint32") : {},
|
|
214
215
|
...bufferProps,
|
|
215
216
|
data: (0, import_arrow_gpu_data.getArrowVectorBufferSource)(vector)
|
|
216
217
|
});
|
|
@@ -315,6 +316,7 @@ function getArrowDictionaryIndexBufferSource(data) {
|
|
|
315
316
|
isArrowUtf8DictionaryType,
|
|
316
317
|
isCanonicalFloat32ArrowMatrixInfo,
|
|
317
318
|
isStorageFixedSizeListArrowType,
|
|
319
|
+
makeArrowGPUValidityBitmap,
|
|
318
320
|
makeGPUDataFromArrowData,
|
|
319
321
|
makeGPUVectorFromArrow,
|
|
320
322
|
readArrowGPUDataAsync,
|
|
@@ -42,4 +42,5 @@ export declare function isArrowUtf8DictionaryType(type: DataType): type is Arrow
|
|
|
42
42
|
export declare function isStorageFixedSizeListArrowType(type: DataType): boolean;
|
|
43
43
|
export declare function getGPUVectorFormatForArrowType(type: DataType): GPUVectorFormat;
|
|
44
44
|
export declare function isCanonicalFloat32ArrowMatrixInfo(matrixInfo: NonNullable<ReturnType<typeof getArrowMatrixVectorInfo>>): boolean;
|
|
45
|
+
export declare function makeArrowGPUValidityBitmap(validity: Uint32Array | undefined): Uint8Array | undefined;
|
|
45
46
|
//# sourceMappingURL=arrow-gpu-vector-adapters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow-gpu-vector-adapters.d.ts","sourceRoot":"","sources":["../../../src/arrow/gpu/arrow-gpu-vector-adapters.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"arrow-gpu-vector-adapters.d.ts","sourceRoot":"","sources":["../../../src/arrow/gpu/arrow-gpu-vector-adapters.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,MAAM,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAC,MAAM,eAAe,CAAC;AAE7E,OAAO,EACL,OAAO,EACP,SAAS,EAET,KAAK,aAAa,IAAI,gBAAgB,EACtC,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,aAAa,EACb,OAAO,EACP,KAAK,EACL,KAAK,EACL,IAAI,EACJ,IAAI,EAEJ,MAAM,EACN,MAAM,EACN,KAAK,EACL,IAAI,EACJ,MAAM,EACP,MAAM,cAAc,CAAC;AAqBtB,OAAO,EAAC,wBAAwB,EAAC,0CAAuC;AACxE,OAAO,EAAC,iCAAiC,EAAC,4BAAyB;AAEnE,KAAK,4BAA4B,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AACnF,KAAK,mBAAmB,GAAG,UAAU,CAAC,IAAI,EAAE,4BAA4B,CAAC,CAAC;AAC1E,KAAK,8BAA8B,CAAC,CAAC,SAAS,QAAQ,IAAI,CAAC,SAAS,OAAO,GACvE,SAAS,GACT,CAAC,SAAS,KAAK,GACb,OAAO,GACP,CAAC,SAAS,IAAI,GACZ,OAAO,GACP,CAAC,SAA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