Expand description
Block-based storage engine for temporal tensor compression (ADR-018).
Provides tiered quantized storage with CRC32 integrity checking, access-pattern tracking, and eviction support. Each block of tensor data is quantized at the bit width appropriate for its storage tier and tracked with rich metadata for tier-promotion/demotion decisions.
§Storage Tiers
| Tier | Bits | Description |
|---|---|---|
| Tier0 | 0 | Evicted: metadata only, no payload |
| Tier1 | 8 | Hot: full fidelity quantization |
| Tier2 | 7 | Warm: moderate compression |
| Tier3 | 3 | Cold: aggressive compression |
§Example
use ruvector_temporal_tensor::store::{BlockKey, Tier, TieredStore, ReconstructPolicy};
let mut store = TieredStore::new(4096);
let key = BlockKey { tensor_id: 1, block_index: 0 };
let data = vec![1.0f32; 64];
store.put(key, &data, Tier::Tier1, 0).unwrap();
assert_eq!(store.block_count(), 1);
let mut out = vec![0.0f32; 64];
let n = store.get(key, &mut out, 1).unwrap();
assert_eq!(n, 64);Structs§
- Block
Key - Unique identifier for a tensor block.
- Block
Meta - Complete metadata for a single block.
- Tick
Result - Summary of actions taken during a budgeted maintenance tick.
- Tiered
Store - In-memory tiered storage engine for quantized tensor blocks.
Enums§
- DType
- Data type of the original tensor.
- Reconstruct
Policy - Reconstruction policy for evicted (Tier0) blocks.
- Store
Error - Errors produced by the storage engine.
- Tier
- Storage tier for a block.
Traits§
- BlockIO
- Block I/O for reading and writing raw quantized data.
- Clock
- Clock abstraction for deterministic time in tests and production.
- MetaLog
- Metadata log for append-only persistence of block metadata.
Functions§
- crc32
- Compute CRC32 using the standard reflected polynomial (0xEDB88320).