ptwm_core::flavor::native
ptwm_core::flavor::native
Native cdylib loader. Loads a .so / .dylib / .dll via libloading, probes for the per-kind ABI symbols, and exposes a thin handle the dispatcher uses to invoke each method.
ptwm_core::flavor::native
crates/ptwm-core/src/flavor/native.rs:1mod nativeNative cdylib loader. Loads a `.so` / `.dylib` / `.dll` via libloading, probes for the per-kind ABI symbols, and exposes a thin handle the dispatcher uses to invoke each method.
ptwm_core::flavor::native::DeltaSchemeFn
crates/ptwm-core/src/flavor/native.rs:96pub type DeltaSchemeFn`delta_scheme_v1_{encode,decode}` symbol shape.
ptwm_core::flavor::native::HardwareBackendCudaDispatchDecodeFn
crates/ptwm-core/src/flavor/native.rs:130pub type HardwareBackendCudaDispatchDecodeFn`hardware_backend_v1_dispatch_decode_cuda`: decode `in_dev_ptr` into `out_dev_ptr`, two distinct device buffers (this is NOT an in-place transform over one buffer; "zero-copy" means no host round-trip, not a shared address). `state_bytes` carries the codec's small per-tensor state (e.g. a 16-entry codebook), in the same `(state_format_version, state_bytes)` shape `plane_codec`'s existing `decode_stateful` path already carries. `codec_id` self-describes the wire format for the extension to validate against (distinct from the backend's own canonical id, which the router already resolved to get here).
ptwm_core::flavor::native::HardwareBackendCudaStreamHandleFn
crates/ptwm-core/src/flavor/native.rs:112pub type HardwareBackendCudaStreamHandleFn`hardware_backend_v1_cuda_stream_handle`: returns this backend's own, process-persistent CUDA stream (as a raw pointer value) for the given device ordinal. Callers pass this same handle to `tensor.__dlpack__ (stream=...)` for every tensor involved in a subsequent decode call, so PyTorch's DLPack producer inserts the correct cross-stream wait before handing back the device pointer. Returns 0 on failure (no such device, CUDA init failed).
ptwm_core::flavor::native::NativeExtension
crates/ptwm-core/src/flavor/native.rs:199pub struct NativeExtensionptwm_core::flavor::native::NativeSymbols
crates/ptwm-core/src/flavor/native.rs:37pub struct NativeSymbolsSymbol set discovered at load time. Each Option carries the raw fn pointer for the corresponding ABI export, or None if absent.
ptwm_core::flavor::native::PLANE_CODEC_CUDA_DECODE_SYMBOL
crates/ptwm-core/src/flavor/native.rs:144pub const PLANE_CODEC_CUDA_DECODE_SYMBOLptwm_core::flavor::native::PLANE_CODEC_CUDA_ENCODE_SYMBOL
crates/ptwm-core/src/flavor/native.rs:143pub const PLANE_CODEC_CUDA_ENCODE_SYMBOLptwm_core::flavor::native::PLANE_CODEC_CUDA_STREAM_HANDLE_SYMBOL
crates/ptwm-core/src/flavor/native.rs:145pub const PLANE_CODEC_CUDA_STREAM_HANDLE_SYMBOLptwm_core::flavor::native::PlaneCodecCudaDecodeFn
crates/ptwm-core/src/flavor/native.rs:163pub type PlaneCodecCudaDecodeFn`plane_codec_v1_decode_cuda`: decode `in_dev_ptr` into `out_dev_ptr`, two distinct device buffers. `state_bytes` carries the codec's small per-tensor state in the same `(state_format_version, state_bytes)` shape the existing `decode_stateful` path uses. `codec_id` self-describes the wire format for the extension to validate.
ptwm_core::flavor::native::PlaneCodecCudaEncodeFn
crates/ptwm-core/src/flavor/native.rs:185pub type PlaneCodecCudaEncodeFn`plane_codec_v1_encode_cuda`: encode `in_dev_ptr` into `out_dev_ptr`. Same completion contract as the decode symbol.
ptwm_core::flavor::native::PlaneCodecCudaStreamHandleFn
crates/ptwm-core/src/flavor/native.rs:150pub type PlaneCodecCudaStreamHandleFnReturns the extension's CUDA stream handle for `device_ordinal`, or 0 if unavailable. Same contract as the hardware-backend equivalent.
ptwm_core::flavor::native::PlaneCodecFn
crates/ptwm-core/src/flavor/native.rs:62pub type PlaneCodecFnptwm_core::flavor::native::PlaneCodecStatefulFn
crates/ptwm-core/src/flavor/native.rs:75pub type PlaneCodecStatefulFnState-aware decode symbol.
ptwm_core::flavor::native::TransformFn
crates/ptwm-core/src/flavor/native.rs:85pub type TransformFnptwm_core::flavor::native::VerifiedToken
crates/ptwm-core/src/flavor/native.rs:19pub struct VerifiedTokenCapability token proving the caller verified the contribution's signature. Construct via `VerifiedToken::new_unchecked` only when the verifier returned Trusted.