-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPU Aggregation (5/8): GridLayer #9096
Conversation
be5ee7e
to
826cb88
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
@@ -13,6 +13,8 @@ export type AggregationProps = { | |||
operations: AggregationOperation[]; | |||
/** Additional options to control bin sorting, e.g. bin size */ | |||
binOptions: Record<string, number | number[]>; | |||
/** Callback after a channel is updated */ | |||
onUpdate?: (channel: number) => void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Total nits: Make it more specific onUpdateChannel
? Or make it extensible onUpdate(options: {channel?: number})
?
modules/aggregation-layers/src/aggregation-layer-v9/cpu-aggregator/aggregate.ts
Show resolved
Hide resolved
modules/aggregation-layers/src/aggregation-layer-v9/cpu-aggregator/aggregate.ts
Outdated
Show resolved
Hide resolved
modules/aggregation-layers/src/grid-layer/grid-cell-layer-vertex.glsl.ts
Outdated
Show resolved
Hide resolved
getAggregatorType(): string { | ||
const { | ||
gpuAggregation, | ||
// lowerPercentile, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe some TODO or explanation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See PR description
826cb88
to
8d42053
Compare
acde30e
to
d6b7c48
Compare
d6b7c48
to
d477dce
Compare
c8cfba4
to
2623861
Compare
2623861
to
94e670b
Compare
For #7457
There is a breaking change in the calculation of bins (division is moved from world space to common space)
Change List
onUpdate
to AggregatorPropscustomOperations
to CPUAggregatorProps for legacy CPUGridLayergetColorValue
,getElevationValue
callbacksTODO
*ScaleType
,*UpperPercentile
,*LowerPercentile
props are temporarily disabled. This is currently unsupported by the unified Aggregator interface. I think non-linear scales (e.g. step, sqrt, log etc.) would be a nice-to-have for both CPU and GPU aggregation. However, calculating percentiles on GPU is out of scope of v9.1.This PR is already pretty big, so I'll try to bring these functionalities back in a separate PR.