pub struct StoredExpertLayout {
pub gate: StoredMatrixSpec,
pub up: StoredMatrixSpec,
pub down: StoredMatrixSpec,
}Expand description
Byte-range layout of one store-backed routed expert.
Fields§
§gate: StoredMatrixSpec§up: StoredMatrixSpec§down: StoredMatrixSpecImplementations§
Source§impl StoredExpertLayout
impl StoredExpertLayout
pub fn total_bytes(&self) -> usize
Sourcepub fn materialize(&self, lease: &ExpertLease) -> ExpertWeights
pub fn materialize(&self, lease: &ExpertLease) -> ExpertWeights
Builds temporary zero-copy WeightMatrix views over a leased
buffer. Each view’s WeightBytes::Shared clone of the lease’s
Arc keeps the cache entry pinned for the view’s lifetime.
Trait Implementations§
Source§impl Clone for StoredExpertLayout
impl Clone for StoredExpertLayout
Source§fn clone(&self) -> StoredExpertLayout
fn clone(&self) -> StoredExpertLayout
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 StoredExpertLayout
Auto Trait Implementations§
impl Freeze for StoredExpertLayout
impl RefUnwindSafe for StoredExpertLayout
impl Send for StoredExpertLayout
impl Sync for StoredExpertLayout
impl Unpin for StoredExpertLayout
impl UnsafeUnpin for StoredExpertLayout
impl UnwindSafe for StoredExpertLayout
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