vibespatial.constructive.extract_unique_points

GPU-accelerated extract_unique_points: per-geometry coordinate deduplication.

For each geometry row, extracts all coordinates, deduplicates (x, y) pairs, and returns a MultiPoint containing only the unique coordinates.

ADR-0033 tiers:

Tier 1 NVRTC — count_coords_per_row, scatter_coords, mark_unique_coords Tier 3a CCCL — segmented_sort (sort x within row segments),

exclusive_sum (prefix scan for offsets), compact_indices (gather unique coords)

Tier 2 CuPy — element-wise gather, boolean indexing

ADR-0002: CONSTRUCTIVE class — fp64 uniform precision. Coordinates are exact subsets of input (no arithmetic), so the precision plan is wired through for observability but stays fp64.

ADR-0034: NVRTC and CCCL warmup registered at module scope.

Attributes

cp

Functions

extract_unique_points_owned(...)

Extract unique coordinates from each geometry as MultiPoint.

Module Contents

vibespatial.constructive.extract_unique_points.cp = None
vibespatial.constructive.extract_unique_points.extract_unique_points_owned(owned: vibespatial.geometry.owned.OwnedGeometryArray, *, dispatch_mode: vibespatial.runtime.ExecutionMode | str = ExecutionMode.AUTO, precision: vibespatial.runtime.precision.PrecisionMode | str = PrecisionMode.AUTO) vibespatial.geometry.owned.OwnedGeometryArray

Extract unique coordinates from each geometry as MultiPoint.

For each row, flattens all coordinates, deduplicates (x, y) pairs, and returns a MultiPoint containing the unique coordinates.

Parameters

ownedOwnedGeometryArray

Input geometries (any family).

dispatch_modeExecutionMode or str, default AUTO

Execution mode hint.

precisionPrecisionMode or str, default AUTO

Precision mode. CONSTRUCTIVE class stays fp64 per ADR-0002; wired for observability.

Returns

OwnedGeometryArray

MultiPoint geometries with unique coordinates per row.