Expand description
PreparedCodec: pre-built session object for the hot compress/decompress path.
Owns a RotationMatrix built once from the supplied CodecConfig, so
subsequent calls to [Codec::compress_prepared] and
[Codec::decompress_prepared_into] skip the O(dim²) QR factorization
that RotationMatrix::build performs. This is the CPU prerequisite for
attaching a GPU backend (Phase 27+): a GPU backend simply calls
PreparedCodec::set_gpu_state to attach device-resident state without
requiring changes to tinyquant-core.
§Construction cost
PreparedCodec::new runs RotationMatrix::build once (O(dim² × dim) QR).
Amortise it by constructing once and reusing across all compress/decompress
calls over the same (config, codebook) pair.
Structs§
- Prepared
Codec - Pre-built compress/decompress session.