|
| virtual uint8_t * | map (const zerocopy::FastBuffer::Buffer &buffer, zerocopy::FastBuffer::Access access) noexcept=0 |
| | Begins CPU access and invalidates stale host cache lines when reading. More...
|
| |
| virtual bool | unmap (const zerocopy::FastBuffer::Buffer &buffer, zerocopy::FastBuffer::Access access) noexcept=0 |
| | Ends CPU access and flushes modified host cache lines when writing. More...
|
| |
| virtual const void * | native_handle (const zerocopy::FastBuffer::Buffer &buffer) const noexcept |
| | Returns a borrowed native resource for integration with the provider's device APIs. More...
|
| |
| virtual bool | import_native (const void *handle, zerocopy::FastBuffer::Buffer &buffer) noexcept |
| | Retains a provider-native resource without taking the caller's reference. More...
|
| |
| virtual uint64_t | get_protocol_id () const noexcept=0 |
| | Returns the nonzero identity of the descriptor protocol, including its ABI version. More...
|
| |
| virtual bool | create (size_t size, const zerocopy::FastBuffer::Config &config, zerocopy::FastBuffer::Buffer &buffer) noexcept=0 |
| | Allocates an uninitialised buffer in the requested memory domain. More...
|
| |
| virtual bool | release (zerocopy::FastBuffer::Buffer &buffer) noexcept=0 |
| | Closes the SDK resource and clears it on success; the manager has completed local work. More...
|
| |
| virtual bool | synchronize (const zerocopy::FastBuffer::Buffer &buffer) noexcept=0 |
| | Waits until previously submitted work using this reference has completed. More...
|
| |
| virtual bool | copy (const zerocopy::FastBuffer::Buffer &source, const zerocopy::FastBuffer::Buffer &destination) noexcept=0 |
| | Copies between equal-sized buffers and completes the copy before returning. More...
|
| |
| virtual bool | copy_to_host (const zerocopy::FastBuffer::Buffer &source, Bytes &destination) noexcept=0 |
| | Reads the complete payload into an exactly sized host view. More...
|
| |
| virtual bool | copy_from_host (const Bytes &source, const zerocopy::FastBuffer::Buffer &destination) noexcept=0 |
| | Writes a complete host payload and completes the transfer before returning. More...
|
| |
| virtual size_t | get_handle_size (const zerocopy::FastBuffer::Buffer &buffer) const noexcept |
| | Returns the fixed descriptor byte count for a live reference. More...
|
| |
| virtual bool | export_handle (const zerocopy::FastBuffer::Buffer &buffer, Bytes &descriptor) noexcept |
| | Exports the native descriptor, stable for this local reference; the manager handles synchronization. More...
|
| |
| virtual bool | import_handle (const Bytes &descriptor, zerocopy::FastBuffer::Buffer &buffer) noexcept |
| | Validates a native descriptor and acquires one local SDK reference. More...
|
| |
| virtual bool | destroy_handle (const Bytes &descriptor) noexcept |
| | Removes named operating-system resources of a descriptor whose exporting process has died. More...
|
| |
Supplies platform buffers without exposing a vendor runtime to VLink.
All methods may run on different host threads; implementations select the resource's device/context. zerocopy::FastBuffer::Buffer addresses are process-local and must never be dereferenced by VLink on the CPU. Handles are plugin-owned allocation or import references, not wire data. Failed create/import calls leave their output empty and release partial resources. Successful calls return one reference, released exactly once by the host. Size and descriptor length remain constant for that reference.
Export is idempotent and creates no unclaimed reference. Publishing is not an import acknowledgement: a descriptor stays importable until the owner reuses or retires the allocation, after which import fails as expired and the message is dropped like a queue overflow. FastBufferManager owns local references and a shared-memory control block per exported allocation with a generation number and a reader table keyed by process identity; the native descriptor travels inside that block. No operation waits for another process, and dead readers or owners are detected by PID plus start time. Providers whose runtime keeps imported allocations alive independently of the exporter still rely on the reader table to know when an allocation may be overwritten. Descriptors identify the host, device and synchronization state as required by the backend. OS handles require real handle transfer; a numeric FD or device address is insufficient.
Published contents are immutable until all readers finish. The manager synchronizes before export; descriptors identify resources and stay stable for each local reference. The manager synchronizes before final release; an allocation is reused only through zerocopy::FastBufferPool once no local holder or live importer references it, and freed only once its reader table is empty. External device work must be completed by its owner before export, host access or release unless the provider explicitly supports waiting for it. CPU cache maintenance is not a device completion fence. A crashed importer is purged on the owner's next reclaim; forced exporter termination invalidates allocations whose SDK requires its survival; imports that attach a new mapping detect the dead owner and call destroy_handle() for named resources the operating system would otherwise keep. Release buffers before manager shutdown.
Implementations use VLINK_PLUGIN_DECLARE(Implementation, 1, 0). The descriptor protocol identity is separate from this interface ABI. Compatible providers may share a protocol; unrelated providers must use different nonzero IDs. No CUDA, image format or operating-system type is required here.