vibespatial.constructive.binary_constructive

GPU-accelerated binary constructive operations.

Operations: intersection(a,b), union(a,b), difference(a,b), symmetric_difference(a,b)

Element-wise binary constructive operations dispatched per family pair: - Point-Point: coordinate comparison (Tier 2 CuPy) - Point-Polygon: PIP kernel for intersection/difference - Point-LineString: point-on-segment kernel (Tier 1 NVRTC) - MultiPoint-Polygon: batch PIP + compact - LineString-Polygon: segment clipping kernel (Tier 1 NVRTC) - LineString-LineString: segment-segment intersection kernel (Tier 1 NVRTC) - Polygon-Polygon: overlay pipeline (face selection)

All GPU paths return device-resident OwnedGeometryArray. The function _binary_constructive_gpu never returns None: every family pair is handled by a GPU kernel.

ADR-0033: Tier 3 — complex multi-stage pipeline orchestrating Tier 1/2 kernels. ADR-0002: CONSTRUCTIVE class — stays fp64 on all devices per policy.

Attributes

Classes

PolygonPartCapacitySelection

Row-indirected Polygon parts with device-resident logical cardinality.

PointPartCapacitySelection

Row-indirected Point parts with device logical cardinality.

LinePartCapacitySelection

Row-indirected LineString parts with device logical cardinality.

Functions

is_constructive_op(→ bool)

Check if an operation name is a binary constructive operation.

broadcast_right_polygon_intersection_capacity_gpu(...)

Intersect polygon rows with one row-indirected right geometry at capacity.

point_parts_native_tabular_result(owned, *[, crs, ...])

Lower point part expansion to a non-row-aligned native result.

polygonal_parts_native_tabular_result(owned, *[, crs, ...])

Lower polygonal part expansion to a non-row-aligned native result.

lineal_parts_native_tabular_result(owned, *[, crs, ...])

Lower lineal part expansion to a non-row-aligned native result.

binary_constructive_owned(...)

Return a constructive result at the explicit legacy-owned boundary.

binary_constructive_native(op, left, right, **kwargs)

Return binary constructive geometry through the native result boundary.

Module Contents

vibespatial.constructive.binary_constructive.cp = None
vibespatial.constructive.binary_constructive.logger
vibespatial.constructive.binary_constructive.is_constructive_op(op: str) bool

Check if an operation name is a binary constructive operation.

vibespatial.constructive.binary_constructive.broadcast_right_polygon_intersection_capacity_gpu(left: vibespatial.geometry.owned.OwnedGeometryArray, right: vibespatial.geometry.owned.OwnedGeometryArray, *, right_row: int = 0, dispatch_mode: vibespatial.runtime._runtime.ExecutionMode = ExecutionMode.GPU) vibespatial.geometry.owned.OwnedGeometryArray | None

Intersect polygon rows with one row-indirected right geometry at capacity.

vibespatial.constructive.binary_constructive.point_parts_native_tabular_result(owned: vibespatial.geometry.owned.OwnedGeometryArray, *, crs=None, geometry_name: str = 'geometry', source_rows=None, source_tokens: tuple[str, Ellipsis] = (), attrs: dict | None = None)

Lower point part expansion to a non-row-aligned native result.

vibespatial.constructive.binary_constructive.polygonal_parts_native_tabular_result(owned: vibespatial.geometry.owned.OwnedGeometryArray, *, crs=None, geometry_name: str = 'geometry', source_rows=None, source_tokens: tuple[str, Ellipsis] = (), attrs: dict | None = None)

Lower polygonal part expansion to a non-row-aligned native result.

vibespatial.constructive.binary_constructive.lineal_parts_native_tabular_result(owned: vibespatial.geometry.owned.OwnedGeometryArray, *, crs=None, geometry_name: str = 'geometry', source_rows=None, source_tokens: tuple[str, Ellipsis] = (), attrs: dict | None = None)

Lower lineal part expansion to a non-row-aligned native result.

class vibespatial.constructive.binary_constructive.PolygonPartCapacitySelection

Row-indirected Polygon parts with device-resident logical cardinality.

geometry: vibespatial.geometry.owned.OwnedGeometryArray
source_rows: vibespatial.cuda._runtime.DeviceArray
selection: object
ring_capacity: int
coord_capacity: int
property capacity: int
property logical_count
class vibespatial.constructive.binary_constructive.PointPartCapacitySelection

Row-indirected Point parts with device logical cardinality.

geometry: vibespatial.geometry.owned.OwnedGeometryArray
source_rows: vibespatial.cuda._runtime.DeviceArray
selection: object
property capacity: int
property logical_count
class vibespatial.constructive.binary_constructive.LinePartCapacitySelection

Row-indirected LineString parts with device logical cardinality.

geometry: vibespatial.geometry.owned.OwnedGeometryArray
source_rows: vibespatial.cuda._runtime.DeviceArray
selection: object
coord_capacity: int
property capacity: int
property logical_count
vibespatial.constructive.binary_constructive.binary_constructive_owned(op: str, left: vibespatial.geometry.owned.OwnedGeometryArray, right: vibespatial.geometry.owned.OwnedGeometryArray, *, grid_size: float | None = None, dispatch_mode: vibespatial.runtime._runtime.ExecutionMode | str = ExecutionMode.AUTO, precision: vibespatial.runtime.precision.PrecisionMode | str = PrecisionMode.AUTO, _cached_right_segments: vibespatial.spatial.segment_primitives.DeviceSegmentTable | None = None, workload_shape: vibespatial.runtime.crossover.WorkloadShape | None = None) vibespatial.geometry.owned.OwnedGeometryArray

Return a constructive result at the explicit legacy-owned boundary.

vibespatial.constructive.binary_constructive.binary_constructive_native(op: str, left: vibespatial.geometry.owned.OwnedGeometryArray, right: vibespatial.geometry.owned.OwnedGeometryArray, **kwargs)

Return binary constructive geometry through the native result boundary.