Skip to content

Make ST_distance core kernels (point-point, point-linestring, linestring-linestring) perfectly load balanced. #1061

@isVoid

Description

@isVoid

Currently, distance computation kernels are not perfectly load balanced. Most kernels follow this pattern: launch the number of threads on one operand and for each thread loop over points/segments of the correponding pair in the other. This can slow down the operation if the data are unbalanced/skewed.

Instead, the kernels should launch the number of thread that's makes one thread computes one pair of point-point/point-segment/segment-segment, then uses atomic operation to aggregate the result. This avoids slow down if the data is skewed.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Blocked

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions