pub struct BlockSparseConfig {
pub block_size: usize,
pub top_blocks: usize,
pub init_blocks: usize,
pub local_blocks: usize,
}Expand description
How many blocks a query may see, and which are free.
Fields§
§block_size: usizeTokens per block. MINIMAX_BLOCK_SIZE for a real checkpoint;
configurable only so the rules can be tested at a readable size.
top_blocks: usizeTotal blocks visible per query, force-included ones counted.
init_blocks: usizeBlocks at the start of the sequence that are always visible.
local_blocks: usizeBlocks nearest the query that are always visible.
Implementations§
Source§impl BlockSparseConfig
impl BlockSparseConfig
Sourcepub fn causal_blocks(&self, query_pos: usize) -> usize
pub fn causal_blocks(&self, query_pos: usize) -> usize
Blocks covering positions 0..=query_pos, the last one possibly
partial.
Trait Implementations§
Source§impl Clone for BlockSparseConfig
impl Clone for BlockSparseConfig
Source§fn clone(&self) -> BlockSparseConfig
fn clone(&self) -> BlockSparseConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BlockSparseConfig
Source§impl Debug for BlockSparseConfig
impl Debug for BlockSparseConfig
Source§impl Default for BlockSparseConfig
impl Default for BlockSparseConfig
impl Eq for BlockSparseConfig
Source§impl PartialEq for BlockSparseConfig
impl PartialEq for BlockSparseConfig
impl StructuralPartialEq for BlockSparseConfig
Auto Trait Implementations§
impl Freeze for BlockSparseConfig
impl RefUnwindSafe for BlockSparseConfig
impl Send for BlockSparseConfig
impl Sync for BlockSparseConfig
impl Unpin for BlockSparseConfig
impl UnsafeUnpin for BlockSparseConfig
impl UnwindSafe for BlockSparseConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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