PTWM
transforms

ptwm_core::transforms::source

Source op — graph entry node that describes the raw input tensor.

ptwm_core::transforms::source

Source op — graph entry node that describes the raw input tensor.

rsmod

ptwm_core::transforms::source

crates/ptwm-core/src/transforms/source.rs:1
mod source

`Source` op — graph entry node that describes the raw input tensor.

rsconst

ptwm_core::transforms::source::MAX_SOURCE_DIMS

crates/ptwm-core/src/transforms/source.rs:49
pub const MAX_SOURCE_DIMS

Maximum number of dimensions the wire format supports. Encoded as a single `u8` length prefix in `write_params`.

rsfn

ptwm_core::transforms::source::read_source_params

crates/ptwm-core/src/transforms/source.rs:150
pub fn read_source_params(buf: &[u8]) -> Result<(Source, usize), PtwmCoreError>

Parse `Source` params from a raw byte buffer. Returns `(Source, bytes_consumed)`.

rstype

ptwm_core::transforms::source::Source

crates/ptwm-core/src/transforms/source.rs:42
pub struct Source

Mandatory entry node of every PPG chain. Takes no inputs (the runtime injects raw tensor bytes externally) and emits one `Role::Raw` plane whose descriptor follows from the tensor `shape` and `dtype_code`.

### forward / inverse semantics The runtime wires tensor bytes into the graph, so `forward` expects a **single synthetic input** carrying the raw tensor bytes (the runtime wraps them in a `Plane` before calling). It validates the descriptor and forwards the plane unchanged. `inverse` is symmetric: takes one plane, returns it unchanged.