vibespatial.kernels.core.wkb_decode

Byte-, component-, and coordinate-shaped GPU WKB decode pipeline.

The structural scan is authoritative: every root and embedded header is validated before any count is used for allocation or coordinate decode. The public result is row-aligned, while nested coordinate work runs as uniform little- or big-endian component/ring tasks.

Attributes

Exceptions

WKBDeviceDecodeDeclined

Raised before decode when valid rows fall outside the native contract.

Classes

DeviceWKBStructuralPlan

Device-resident byte proof reused by every family decoder.

DeviceWKBDecodeResult

Native subset plus structural status for partial compatibility merge.

Functions

summarize_wkb_device_plan(→ dict[str, Any])

Return one bounded telemetry packet; geometry bytes never leave device.

scan_wkb_device_structural_plan(→ DeviceWKBStructuralPlan)

Prove complete canonical 2D WKB structure without decoding coordinates.

decode_wkb_device_pipeline(...)

Decode canonical 2D WKB directly to device owned buffers.

Module Contents

vibespatial.kernels.core.wkb_decode.logger
class vibespatial.kernels.core.wkb_decode.DeviceWKBStructuralPlan

Device-resident byte proof reused by every family decoder.

row_count: int
payload_bytes: int
statuses: Any
family_tags: Any
root_byte_orders: Any
empty_flags: Any
primary_counts: Any
part_counts: Any
ring_counts: Any
coordinate_counts: Any
input_validity: Any
native_mask: Any
class vibespatial.kernels.core.wkb_decode.DeviceWKBDecodeResult

Native subset plus structural status for partial compatibility merge.

owned: vibespatial.geometry.owned.OwnedGeometryArray
plan: DeviceWKBStructuralPlan
declined_rows: Any
exception vibespatial.kernels.core.wkb_decode.WKBDeviceDecodeDeclined(detail: str, *, plan: DeviceWKBStructuralPlan, declined_rows: Any)

Raised before decode when valid rows fall outside the native contract.

plan
declined_rows
vibespatial.kernels.core.wkb_decode.summarize_wkb_device_plan(plan: DeviceWKBStructuralPlan) → dict[str, Any]

Return one bounded telemetry packet; geometry bytes never leave device.

vibespatial.kernels.core.wkb_decode.scan_wkb_device_structural_plan(payload_device, record_offsets_device, record_count: int, *, validity_device=None) → DeviceWKBStructuralPlan

Prove complete canonical 2D WKB structure without decoding coordinates.

vibespatial.kernels.core.wkb_decode.decode_wkb_device_pipeline(payload_device, record_offsets_device, record_count: int, *, validity_device=None, on_invalid: str = 'raise', allow_declined: bool = False, structural_plan: DeviceWKBStructuralPlan | None = None, structural_summary: dict[str, Any] | None = None) → vibespatial.geometry.owned.OwnedGeometryArray | DeviceWKBDecodeResult

Decode canonical 2D WKB directly to device owned buffers.

Integer and coordinate bytes are decoded exactly in their owning record’s endian order. Precision dispatch does not downcast WKB coordinates: storage and decoded values remain fp64 by contract.