Expand description
Typed tensor storage: DType enum and byte-first TypedStorage.
Typed tensor infrastructure: DType enum and TypedStorage.
This module provides the byte-first storage layer for multi-typed tensors. The core idea: raw bytes are the primary representation, typed views are computed on demand. This enables zero-copy serialization (snap), SIMD-friendly aligned buffers, and memory-efficient storage for non-f64 types.
§Byte-First Philosophy
TypedStoragestores rawVec<u8>+ aDTypetag- Typed access via
as_f64(),as_i64(), etc. reinterprets bytes in-place - Serialization = memcpy the byte buffer (no conversion)
- COW semantics via
Rc<RefCell<Vec<u8>>>(same pattern as Buffer)
Structs§
- Typed
Storage - Byte-first tensor storage with COW (copy-on-write) semantics.
Enums§
- DType
- Element type for typed tensor storage.