vibespatial.constructive.measurement

GPU-accelerated area and length measurement kernels.

Tier 1 NVRTC kernels (ADR-0033) for computing geometric area and length directly from OwnedGeometryArray coordinate buffers. ADR-0002 METRIC class precision dispatch: fp32 + Kahan + coordinate centering on consumer GPUs, native fp64 on datacenter GPUs.

Zero host/device transfers mid-process. When data is already device-resident (vibeFrame path), kernels read directly from DeviceFamilyGeometryBuffer pointers with no copy.

Functions

area_owned(→ numpy.ndarray)

Compute area directly from OwnedGeometryArray coordinate buffers.

length_owned(→ numpy.ndarray)

Compute length directly from OwnedGeometryArray coordinate buffers.

Module Contents

vibespatial.constructive.measurement.area_owned(owned: vibespatial.geometry.owned.OwnedGeometryArray, *, dispatch_mode: vibespatial.runtime.ExecutionMode | str = ExecutionMode.AUTO, precision: vibespatial.runtime.precision.PrecisionMode | str = 'auto') numpy.ndarray

Compute area directly from OwnedGeometryArray coordinate buffers.

GPU path uses ADR-0002 METRIC-class precision dispatch. Returns float64 array of shape (row_count,).

Zero host/device transfers mid-process. When owned.device_state is populated (vibeFrame path), GPU kernels read directly from device pointers with no copy.

vibespatial.constructive.measurement.length_owned(owned: vibespatial.geometry.owned.OwnedGeometryArray, *, dispatch_mode: vibespatial.runtime.ExecutionMode | str = ExecutionMode.AUTO, precision: vibespatial.runtime.precision.PrecisionMode | str = 'auto') numpy.ndarray

Compute length directly from OwnedGeometryArray coordinate buffers.

For Polygons, measures the perimeter (all rings including holes). For LineStrings, measures total segment length. Points return 0.0.

GPU path uses ADR-0002 METRIC-class precision dispatch. Returns float64 array of shape (row_count,).

Zero host/device transfers mid-process. When owned.device_state is populated (vibeFrame path), GPU kernels read directly from device pointers with no copy.