PTWM
ptwm_core

ptwm_core::tensor_record

Tensor record serialization.

ptwm_core::tensor_record

Tensor record serialization.

rsmod

ptwm_core::tensor_record

crates/ptwm-core/src/tensor_record.rs:1
mod tensor_record

Tensor record serialization.

`chain_ref: u16` selects the preprocessing chain for this tensor: - High bit (`0x8000`) set: an inline chain payload follows the fixed header (before dependencies and per-terminal records). - High bit clear: `chain_ref & 0x7FFF` is a chain registry index.
rsconst

ptwm_core::tensor_record::CHAIN_REF_INLINE_BIT

crates/ptwm-core/src/tensor_record.rs:19
pub const CHAIN_REF_INLINE_BIT

High bit of `chain_ref`: when set, an inline chain follows the fixed header.

rstype

ptwm_core::tensor_record::Dependency

crates/ptwm-core/src/tensor_record.rs:41
pub struct Dependency
rsfn

ptwm_core::tensor_record::parse_tensor_record

crates/ptwm-core/src/tensor_record.rs:194
pub fn parse_tensor_record(buf: &[u8]) -> Result<(TensorRecord, usize), PtwmCoreError>
rstype

ptwm_core::tensor_record::RefKind

crates/ptwm-core/src/tensor_record.rs:23
pub enum RefKind
rsconst

ptwm_core::tensor_record::TENSOR_FLAG_DEPENDENCIES

crates/ptwm-core/src/tensor_record.rs:15
pub const TENSOR_FLAG_DEPENDENCIES
rsconst

ptwm_core::tensor_record::TENSOR_FLAG_METADATA

crates/ptwm-core/src/tensor_record.rs:16
pub const TENSOR_FLAG_METADATA
rsconst

ptwm_core::tensor_record::TENSOR_FLAG_PAYLOAD_HASH

crates/ptwm-core/src/tensor_record.rs:17
pub const TENSOR_FLAG_PAYLOAD_HASH
rstype

ptwm_core::tensor_record::TensorRecord

crates/ptwm-core/src/tensor_record.rs:58
pub struct TensorRecord

A serialized tensor record.

`chain_ref` encodes the chain association: - `chain_ref & 0x8000 == 0`: the tensor's chain is in the container chain registry at index `chain_ref & 0x7FFF`. `inline_chain` must be `None`. - `chain_ref & 0x8000 != 0`: the chain is stored inline in this record (in `inline_chain`). The low 15 bits are a hint or zero. `terminals` (formerly `planes`) hold the per-output codec records in terminal order; `num_terminals` is derived from `terminals.len()` on write.
rsfn

ptwm_core::tensor_record::write_tensor_record

crates/ptwm-core/src/tensor_record.rs:82
pub fn write_tensor_record(rec: &TensorRecord, out: &mut Vec<u8>) -> Result<(), PtwmCoreError>