Device buffers, streams and ownership#
Find the call that produced or imported your data, then keep its owner and any required stream or lease alive until the consumer has finished.
Geometry and result views#
Call or handle |
Ownership and release |
|---|---|
|
Borrows device geometry storage through a lease. Release the lease with |
|
Borrows device row states through a lease. Release the lease with |
Typed |
Borrow device result storage through a lease. Release the lease with |
Rust |
Represent device leases for their respective borrowed views. |
|
Borrows CUDA storage with a separately releasable lease. |
|
Returns an exported owner. Follow the export-mode readiness and lifetime rules below. |
|
Makes an explicit host copy. |
Result-stream next-page, schema and close calls have separate lifetimes. The adapter retains session-bound resources through the last consumer read. Release follows completion of consumer work. Failed retirement is retried or quarantined.
Arrow export readiness and lifetime#
Export or object |
Readiness and lifetime |
|---|---|
Independently owned device export |
Can outlive its result and session. |
Unbound consumer |
Wait on |
Bound consumer |
Keep the bound stream live through release. |
Capturing consumer stream |
Binding it yields |
Schema root, array root and moved-out child |
Treat each as a separate lifetime entry. |
|
Returns an independently owned host schema. It can survive result and session closure even if device-array allocation is refused. |
Arrow import and geometry layout#
Session.table_from_arrow selects the first available protocol in this order: device array, device stream, host array, host stream. Host batches upload. A single CUDA batch is normally borrowed unless copy=True. Same-session results use retained storage.
For native Arrow geometry import and export and host or device WKB decode, check the context, producer event, pointer range, dimensions, SRID, validity bitmap, sliced offsets and empty offsets. Pair views have ordinal bounds. Use their gather lookup to retrieve the corresponding entries.
Allocators and statuses#
cugeo_geometry_cuda_context_options supplies device and pinned allocation callbacks and byte ceilings. Keep callbacks alive through final child release. Observe the stream-ordered deallocation and non-reentrancy contracts.
Status |
Check |
|---|---|
|
Sizing. |
|
Host allocation. |
|
Device runtime failure. |