Skip to main content

Module buffer_export

Module buffer_export 

Source
Expand description

Binary tensor buffer export for Qualia portal GPU upload.

Layout: header (32 B) + N × Tensor10D (40 B each), little-endian f32.

Structs§

TensorBufferHeader

Constants§

TENSOR_BUFFER_MAGIC
TENSOR_BUFFER_VERSION
TENSOR_HEADER_BYTES
Byte offset to the first Tensor10D record in a baked buffer blob.
TENSOR_STRIDE

Functions§

parse_header
Parse header from a tensor buffer blob. Returns (header, header_byte_len).
read_tensor_at
Read one Tensor10D by index from a buffer (zero-alloc).
tensor_node_count
Node count encoded in a tensor buffer (zero-alloc).
tensor_render_color
Pack σ / α / q into linear RGBA for viewport shaders (cold path).
write_tensor_buffer
Write header + tensor slice into caller buffer. Returns bytes written.
write_tensor_q_at
Write epistemic q for one node (wavefunction collapse). Returns previous q.
write_tensor_slice_from_resident
Export a bounded slice from the resident U1 substrate into a tensor buffer blob.