ptwm_core::transforms::source
ptwm_core::transforms::source
Source op — graph entry node that describes the raw input tensor.
ptwm_core::transforms::source
crates/ptwm-core/src/transforms/source.rs:1mod source`Source` op — graph entry node that describes the raw input tensor.
ptwm_core::transforms::source::element_width_for
crates/ptwm-core/src/transforms/source.rs:18pub fn element_width_for(dtype_code: u16) -> ElementWidthElement width inferred from a chain-internal dtype code. The chain's Source params use a different code space than `Dtype::from_code` (the public registry); see `_CHAIN_DTYPE` in `python/ptwm/preprocessing/_chains.py`. This is the one owner of the mapping: `compressor::source_descriptor_for` calls it rather than restating it.
ptwm_core::transforms::source::is_nibble_packed_dtype
crates/ptwm-core/src/transforms/source.rs:39pub fn is_nibble_packed_dtype(dtype_code: u16) -> boolWhether a chain-internal dtype stores two values per byte.
ptwm_core::transforms::source::MAX_SOURCE_DIMS
crates/ptwm-core/src/transforms/source.rs:76pub const MAX_SOURCE_DIMSMaximum number of dimensions the wire format supports. Encoded as a single `u8` length prefix in `write_params`.
ptwm_core::transforms::source::read_source_params
crates/ptwm-core/src/transforms/source.rs:177pub fn read_source_params(buf: &[u8]) -> Result<(Source, usize), PtwmCoreError>Parse `Source` params from a raw byte buffer. Returns `(Source, bytes_consumed)`.
ptwm_core::transforms::source::Source
crates/ptwm-core/src/transforms/source.rs:69pub struct SourceMandatory 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`.
reshape
Reshape op — re-tags a plane's layout without modifying its bytes.
spherical_normalize
SphericalNormalize — per-row (radius, direction) reparameterization with an exact XOR residual. Lossless by construction (the inverse reconstructs the prediction from the stored radius/direction and XORs the residual back, so float-op inaccuracy only affects residual size, never correctness).