pub struct KvProvenanceMap { /* private fields */ }Implementations§
Source§impl KvProvenanceMap
impl KvProvenanceMap
Sourcepub fn generation(&self) -> u32
pub fn generation(&self) -> u32
Generation.
Sourcepub fn record(&mut self, tensor_index: u32, kv_slot: u32, parent_page_id: u64)
pub fn record(&mut self, tensor_index: u32, kv_slot: u32, parent_page_id: u64)
Record a single tensor index ↔ KV slot bidirectional binding in O(1) (cold path).
Sourcepub fn build_prompt_alignment(
&mut self,
prompt_token_count: u32,
tensor_node_count: u32,
root_page_id: u64,
)
pub fn build_prompt_alignment( &mut self, prompt_token_count: u32, tensor_node_count: u32, root_page_id: u64, )
1:1 prompt alignment: tensor node i ↔ KV slot i for min(prompt, nodes).
Sourcepub fn kv_slot_for_tensor(&self, tensor_index: u32) -> Option<u32>
pub fn kv_slot_for_tensor(&self, tensor_index: u32) -> Option<u32>
KvProvenanceMap::kv_slot_for_tensor.
Sourcepub fn tensor_for_kv_slot(&self, kv_slot: u32) -> Option<u32>
pub fn tensor_for_kv_slot(&self, kv_slot: u32) -> Option<u32>
Reverse lookup: find the 3D tensor index corresponding to a generated KV slot in O(1).
Sourcepub fn page_id_for_tensor(&self, tensor_index: u32) -> Option<u64>
pub fn page_id_for_tensor(&self, tensor_index: u32) -> Option<u64>
KvProvenanceMap::page_id_for_tensor.
Auto Trait Implementations§
impl Freeze for KvProvenanceMap
impl RefUnwindSafe for KvProvenanceMap
impl Send for KvProvenanceMap
impl Sync for KvProvenanceMap
impl Unpin for KvProvenanceMap
impl UnsafeUnpin for KvProvenanceMap
impl UnwindSafe for KvProvenanceMap
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more