-
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 (3/8): CPUAggregator #8888
Conversation
2362a0d
to
430a347
Compare
795f733
to
78cfdbc
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.
Added some first impressions, will come back again for full review.
modules/aggregation-layers/src/aggregation-layer-v9/cpu-aggregator/cpu-aggregator.ts
Outdated
Show resolved
Hide resolved
modules/aggregation-layers/src/aggregation-layer-v9/cpu-aggregator/cpu-aggregator.ts
Outdated
Show resolved
Hide resolved
modules/aggregation-layers/src/aggregation-layer-v9/cpu-aggregator/cpu-aggregator.ts
Outdated
Show resolved
Hide resolved
modules/aggregation-layers/src/aggregation-layer-v9/cpu-aggregator/cpu-aggregator.ts
Outdated
Show resolved
Hide resolved
modules/aggregation-layers/src/aggregation-layer-v9/cpu-aggregator/cpu-aggregator.ts
Outdated
Show resolved
Hide resolved
21358eb
to
c49810a
Compare
78cfdbc
to
da7d1f5
Compare
c49810a
to
7984f42
Compare
da7d1f5
to
a96da42
Compare
c6fae8c
to
a9f0504
Compare
54ee4f1
to
941cc99
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.
Looks solid!
modules/aggregation-layers/src/aggregation-layer-v9/cpu-aggregator/aggregate.ts
Outdated
Show resolved
Hide resolved
modules/aggregation-layers/src/aggregation-layer-v9/cpu-aggregator/cpu-aggregator.ts
Outdated
Show resolved
Hide resolved
modules/aggregation-layers/src/aggregation-layer-v9/cpu-aggregator/cpu-aggregator.ts
Outdated
Show resolved
Hide resolved
modules/aggregation-layers/src/aggregation-layer-v9/cpu-aggregator/sort.ts
Outdated
Show resolved
Hide resolved
}; | ||
|
||
/** Evaluate a VertexAccessor with a set of attributes */ | ||
export function evaluateVertexAccessor<ValueT, OptionsT>( |
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.
Nit: If this makes good sense to you then fine. I was trying to understand in what sense we are "evaluating" something here. Since this returns a function, rather than evaluate directly, then maybe getVertexAccessFunction()
would be a better name?
For non-rendering processing like aggregation, I personally feel that talking about rows (in a binary columnar table) rather than "vertexes" tends to be more helpful for understanding.
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.
VertexAccessor
is provided by the user. For example,
const getBin: VertexAccessor = {
sources: ['positions'],
getValue: ({positions}, index, {binSize} => [
Math.floor(positions[0] / binSize[0]),
Math.floor(positions[1] / binSize[1])
}
}
Directly maps to
in vec2 positions;
uniform vec2 binSize;
void getBin(out vec2 binId) {
binId = floor(positions / binSize);
}
This function takes user-specified VertexAccessor
, attributes
and uniforms
and returns a value getter at each point index, hence "evaluate".
modules/aggregation-layers/src/aggregation-layer-v9/cpu-aggregator/vertex-accessor.ts
Show resolved
Hide resolved
941cc99
to
6160b98
Compare
2f06282
to
29a12a9
Compare
For #7457
Change List
CPUAggregator