pub struct DeviceExpertCsr { /* private fields */ }Implementations§
Source§impl DeviceExpertCsr
impl DeviceExpertCsr
Sourcepub fn with_capacity(
engine: &Engine,
n_expert: usize,
max_tokens: usize,
max_pairs: usize,
) -> Result<Self, Box<dyn Error>>
pub fn with_capacity( engine: &Engine, n_expert: usize, max_tokens: usize, max_pairs: usize, ) -> Result<Self, Box<dyn Error>>
Allocate stable device storage for schedules up to the supplied logical maxima.
refresh fills prefixes of these buffers. The grouped kernel receives only the active
lengths, so route changes do not change any device pointer or allocate in the hot path.
pub fn refresh( &mut self, engine: &Engine, csr: &ExpertCsr, ) -> Result<(), Box<dyn Error>>
pub fn clear(&mut self)
Auto Trait Implementations§
impl Freeze for DeviceExpertCsr
impl RefUnwindSafe for DeviceExpertCsr
impl Send for DeviceExpertCsr
impl Sync for DeviceExpertCsr
impl Unpin for DeviceExpertCsr
impl UnsafeUnpin for DeviceExpertCsr
impl UnwindSafe for DeviceExpertCsr
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