vibespatial.kernels.core.wkb_decode¶
GPU WKB decode kernel pipeline (P1a).
Implements a 5-stage GPU pipeline that reads WKB byte streams directly on device and produces OwnedGeometryArray results without host round-trips.
- Stages:
Header scan kernel – 1 thread per WKB record, reads endian + type tag
Family partition – CuPy boolean masks to bucket records by geometry type
Size scan + offset computation – sizing kernels + CCCL exclusive_sum
Family decode kernels – per-family coordinate extraction
Assembly – build OwnedGeometryArray via io_pylibcudf helpers
- ADR-0033 dispatch tiers:
Tier 1 (custom NVRTC) for geometry-specific decode Tier 3a (CCCL) for prefix-sum offset computation
Attributes¶
Functions¶
GPU WKB decode pipeline. |
Module Contents¶
- vibespatial.kernels.core.wkb_decode.logger¶
- vibespatial.kernels.core.wkb_decode.decode_wkb_device_pipeline(payload_device, record_offsets_device, record_count: int) vibespatial.geometry.owned.OwnedGeometryArray¶
GPU WKB decode pipeline.
Reads WKB byte streams directly on GPU using custom CUDA kernels. Returns an OwnedGeometryArray with device-resident geometry buffers.
Parameters¶
- payload_devicedevice array (uint8)
Contiguous WKB byte payload on device.
- record_offsets_devicedevice array (int32)
Byte offsets for each record (length = record_count + 1).
- record_countint
Number of WKB records.
Returns¶
- OwnedGeometryArray
Device-resident geometry array.