pub struct PhysicalBlock {
pub id: PhysicalBlockId,
pub block_size: usize,
pub ref_count: usize,
pub num_tokens: usize,
pub prefix_hash: Option<u64>,
pub tokens: Vec<TokenId>,
}Expand description
Represents a physical memory block storing KV-tensors for a fixed number of tokens.
Fields§
§id: PhysicalBlockId§block_size: usize§ref_count: usizeReference count for Copy-on-Write and prefix sharing.
num_tokens: usizeNumber of valid tokens currently stored in this block.
prefix_hash: Option<u64>Cached hash of the token sequence prefix stored in this block (for prefix caching).
tokens: Vec<TokenId>Token IDs stored in this block (for tracking and prefix matching).
Implementations§
Trait Implementations§
Source§impl Clone for PhysicalBlock
impl Clone for PhysicalBlock
Auto Trait Implementations§
impl Forget for PhysicalBlock
impl Freeze for PhysicalBlock
impl Move for PhysicalBlock
impl RefUnwindSafe for PhysicalBlock
impl Send for PhysicalBlock
impl Sync for PhysicalBlock
impl Unpin for PhysicalBlock
impl UnsafeUnpin for PhysicalBlock
impl UnwindSafe for PhysicalBlock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more