pub struct DecodeMetaLayout { /* private fields */ }Expand description
Derived fixed-stride decode-metadata layout.
Implementations§
Source§impl DecodeMetaLayout
impl DecodeMetaLayout
Sourcepub fn for_max_batch_size(max_batch_size: usize) -> Self
pub fn for_max_batch_size(max_batch_size: usize) -> Self
Derive the layout from the serve max_batch_size. Callers gate
max_batch_size <= DECODE_META_MAX_ROWS at serve time; this
constructor only applies the byte-identity floor.
Sourcepub fn rows(&self) -> usize
pub fn rows(&self) -> usize
Row capacity of the metadata block (== the widest padded_n the
upload accepts).
Sourcepub fn positions_off(&self) -> usize
pub fn positions_off(&self) -> usize
positions u32 stream offset.
Sourcepub fn seq_slot_off(&self) -> usize
pub fn seq_slot_off(&self) -> usize
Per-request LoRA adapter-slot i32 stream offset.
Sourcepub fn seq_lens_off(&self) -> usize
pub fn seq_lens_off(&self) -> usize
seq_lens i32 stream offset.
Sourcepub fn block_table_off(&self) -> usize
pub fn block_table_off(&self) -> usize
Flattened block-table offset (row stride max_blocks · 4 bytes).
Sourcepub fn meta_bytes(&self, max_blocks: usize) -> usize
pub fn meta_bytes(&self, max_blocks: usize) -> usize
Total bytes of the metadata block for max_blocks blocks per row.
Trait Implementations§
Source§impl Clone for DecodeMetaLayout
impl Clone for DecodeMetaLayout
Source§fn clone(&self) -> DecodeMetaLayout
fn clone(&self) -> DecodeMetaLayout
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DecodeMetaLayout
impl Debug for DecodeMetaLayout
Source§impl PartialEq for DecodeMetaLayout
impl PartialEq for DecodeMetaLayout
impl Copy for DecodeMetaLayout
impl Eq for DecodeMetaLayout
impl StructuralPartialEq for DecodeMetaLayout
Auto Trait Implementations§
impl Freeze for DecodeMetaLayout
impl RefUnwindSafe for DecodeMetaLayout
impl Send for DecodeMetaLayout
impl Sync for DecodeMetaLayout
impl Unpin for DecodeMetaLayout
impl UnwindSafe for DecodeMetaLayout
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.