|
VLink
2.0.0
A high-performance communication middleware
|
Zero-copy N-dimensional dense tensor container with shape, strides, and dtype metadata. More...
Go to the source code of this file.
Namespaces | |
| vlink | |
| vlink::zerocopy | |
Functions | |
| struct | vlink::zerocopy::VLINK_EXPORT_AND_ALIGNED (8) AudioFrame final |
Zero-copy N-dimensional dense tensor container with shape, strides, and dtype metadata.
Tensor is the canonical neural-network input / output message for the VLink autonomous-driving and embodied-intelligence stacks: camera feature maps, point-cloud features, language-model hidden states, action heads, diffusion latents, INT8 quantised activations, and so on. Each tensor carries the element buffer, shape (up to kMaxRank dimensions), strides, dtype, layout label, optional model identifier, optional INT8 quantisation scale / zero point, device hint, plus a 40-byte Header for sequencing.
| Enum | C++ type | Element size |
|---|---|---|
kBool | bool | 1 |
kInt8 | int8_t | 1 |
kUint8 | uint8_t | 1 |
kInt16 | int16_t | 2 |
kUint16 | uint16_t | 2 |
kInt32 | int32_t | 4 |
kUint32 | uint32_t | 4 |
kInt64 | int64_t | 8 |
kUint64 | uint64_t | 8 |
kFloat16 | half | 2 |
kBfloat16 | bf16 | 2 |
kFloat32 | float | 4 |
kFloat64 | double | 8 |
Tensor is POD; memcpy serialises the struct plus the element bytes. The sizeof value is locked by static_assert and forms a permanent contract: vlink::zerocopy::* containers have NO forward and NO backward binary compatibility, and every field, including reserved bytes, is wire-locked. reserved_buf_, reserved_buf2_, reserved_buf3_ are exposed through get_reserved* helpers and survive clear() and the copy / move helpers. These slots MUST NOT be repurposed by application code: future library revisions may bind them to real fields, silently breaking peers that abused the slot.