86 #include "../base/plugin.h"
144 [[nodiscard]]
virtual uint8_t*
map(
const zerocopy::FastBuffer::Buffer& buffer,
145 zerocopy::FastBuffer::Access access) noexcept = 0;
155 [[nodiscard]]
virtual bool unmap(
const zerocopy::FastBuffer::Buffer& buffer,
156 zerocopy::FastBuffer::Access access) noexcept = 0;
165 [[nodiscard]]
virtual const void*
native_handle(
const zerocopy::FastBuffer::Buffer& buffer)
const noexcept {
178 [[nodiscard]]
virtual bool import_native(
const void* handle, zerocopy::FastBuffer::Buffer& buffer) noexcept {
273 [[nodiscard]]
virtual bool export_handle(
const zerocopy::FastBuffer::Buffer& buffer,
Bytes& descriptor) noexcept {
287 [[nodiscard]]
virtual bool import_handle(
const Bytes& descriptor, zerocopy::FastBuffer::Buffer& buffer) noexcept {
Fixed-size 128-byte buffer holder with SBO, five ownership modes and integrated codecs.
Definition: bytes.h:120
Supplies platform buffers without exposing a vendor runtime to VLink.
Definition: fast_buffer_plugin_interface.h:127
virtual bool import_handle(const Bytes &descriptor, zerocopy::FastBuffer::Buffer &buffer) noexcept
Validates a native descriptor and acquires one local SDK reference.
Definition: fast_buffer_plugin_interface.h:287
virtual bool destroy_handle(const Bytes &descriptor) noexcept
Removes named operating-system resources of a descriptor whose exporting process has died.
Definition: fast_buffer_plugin_interface.h:302
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.
FastBufferPluginInterface()=default
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.
Definition: fast_buffer_plugin_interface.h:273
virtual ~FastBufferPluginInterface()=default
virtual uint64_t get_protocol_id() const noexcept=0
Returns the nonzero identity of the descriptor protocol, including its ABI version.
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.
virtual bool release(zerocopy::FastBuffer::Buffer &buffer) noexcept=0
Closes the SDK resource and clears it on success; the manager has completed local work.
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.
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.
virtual bool import_native(const void *handle, zerocopy::FastBuffer::Buffer &buffer) noexcept
Retains a provider-native resource without taking the caller's reference.
Definition: fast_buffer_plugin_interface.h:178
virtual size_t get_handle_size(const zerocopy::FastBuffer::Buffer &buffer) const noexcept
Returns the fixed descriptor byte count for a live reference.
Definition: fast_buffer_plugin_interface.h:260
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.
virtual bool copy_to_host(const zerocopy::FastBuffer::Buffer &source, Bytes &destination) noexcept=0
Reads the complete payload into an exactly sized host view.
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.
Definition: fast_buffer_plugin_interface.h:165
virtual bool synchronize(const zerocopy::FastBuffer::Buffer &buffer) noexcept=0
Waits until previously submitted work using this reference has completed.
Platform-independent buffer with a Header and a pointer-free wire envelope.
#define VLINK_DISALLOW_COPY_AND_ASSIGN(classname)
Deletes the copy constructor and copy-assignment operator of classname.
Definition: macros.h:174
#define VLINK_PLUGIN_REGISTER(InterfaceType)
Declares a plugin's identity from the demangled name of its abstract interface.
Definition: plugin.h:359
Holds a local memory address and an owned provider reference.
Definition: fast_buffer.h:138