ptwm_core::chain::runtime
ptwm_core::chain::runtime
PPG DAG runtime — forward executor, inverse executor, fusion picker.
ptwm_core::chain::runtime
crates/ptwm-core/src/chain/runtime.rs:1mod runtimePPG DAG runtime — forward executor, inverse executor, fusion picker.
ptwm_core::chain::runtime::chain_source_descriptor
crates/ptwm-core/src/chain/runtime.rs:278pub fn chain_source_descriptor(chain: &Chain) -> Result<PlaneDescriptor, PtwmCoreError>Descriptor of the plane the chain's `Source` node emits.
ptwm_core::chain::runtime::chain_terminal_descriptors
crates/ptwm-core/src/chain/runtime.rs:443pub fn chain_terminal_descriptors(chain: &Chain) -> Result<Vec<PlaneDescriptor>, PtwmCoreError>Recover terminal descriptors. Kept for callers of the earlier API; it is [`propagate_terminal_descriptors`].
ptwm_core::chain::runtime::forward_chain
crates/ptwm-core/src/chain/runtime.rs:106pub fn forward_chain(chain: &Chain, ctx: &ForwardContext<'_>) -> Result<ForwardResult, PtwmCoreError>Execute the chain in forward (encode) order.
ptwm_core::chain::runtime::ForwardContext
crates/ptwm-core/src/chain/runtime.rs:85pub struct ForwardContextContext supplied by the caller for a forward (encode) pass.
ptwm_core::chain::runtime::ForwardResult
crates/ptwm-core/src/chain/runtime.rs:95pub struct ForwardResultOutput of a forward pass.
ptwm_core::chain::runtime::FusedExecution
crates/ptwm-core/src/chain/runtime.rs:724pub struct FusedExecutionA fused execution pair: producer node merged with consumer node.
ptwm_core::chain::runtime::inverse_chain
crates/ptwm-core/src/chain/runtime.rs:535pub fn inverse_chain(chain: &Chain, ctx: &InverseContext<'_>) -> Result<Plane, PtwmCoreError>Execute the chain in inverse (decode) order, reconstructing the source plane.
ptwm_core::chain::runtime::InverseContext
crates/ptwm-core/src/chain/runtime.rs:520pub struct InverseContextContext supplied by the caller for an inverse (decode) pass.
ptwm_core::chain::runtime::max_plane_len
crates/ptwm-core/src/chain/runtime.rs:317pub fn max_plane_len(orig_size: u64) -> u64Largest plane, at any node of a chain, that a decoder accepts for a tensor of `orig_size` raw bytes.
ptwm_core::chain::runtime::propagate_terminal_descriptors
crates/ptwm-core/src/chain/runtime.rs:326pub fn propagate_terminal_descriptors(chain: &Chain) -> Result<Vec<PlaneDescriptor>, PtwmCoreError>Recover the [`PlaneDescriptor`] of every chain terminal in `chain.terminals` order, without the tensor bytes and without allocating any plane buffer.
ptwm_core::chain::runtime::propagate_terminal_descriptors_bounded
crates/ptwm-core/src/chain/runtime.rs:359pub fn propagate_terminal_descriptors_bounded(chain: &Chain, max_plane_len: u64) -> Result<Vec<PlaneDescriptor>, PtwmCoreError>Recover terminal descriptors symbolically and reject any node output longer than `max_plane_len` bytes.
ptwm_core::chain::runtime::try_fuse_at
crates/ptwm-core/src/chain/runtime.rs:744pub fn try_fuse_at(chain: &Chain, node_idx: u8) -> Option<FusedExecution>Check whether `node_idx` is the CONSUMER in a fusable pair. If so, return a `FusedExecution` with `producer_node` set to the upstream node.