pub enum ExpertArena {
Pinned(PinnedArena),
Device(DeviceArena),
}Expand description
Either arena, as the runtime that keeps it alive holds it.
Variants§
Pinned(PinnedArena)
Page-locked host memory the GPU reads in place.
Device(DeviceArena)
Device memory behind the staging ring.
Implementations§
Source§impl ExpertArena
impl ExpertArena
Sourcepub fn alloc(
gpu: &dyn GpuBackend,
bytes: usize,
layout: SlotLayout,
device: bool,
ring_slots: usize,
) -> Result<(Self, ExpertLru)>
pub fn alloc( gpu: &dyn GpuBackend, bytes: usize, layout: SlotLayout, device: bool, ring_slots: usize, ) -> Result<(Self, ExpertLru)>
The arena of bytes and the cache over it: device slots with a
ring_slots staging ring when device, the page-locked arena otherwise.
pub fn bytes(&self) -> usize
pub fn free(self, gpu: &dyn GpuBackend) -> Result<()>
Auto Trait Implementations§
impl Freeze for ExpertArena
impl RefUnwindSafe for ExpertArena
impl Send for ExpertArena
impl Sync for ExpertArena
impl Unpin for ExpertArena
impl UnwindSafe for ExpertArena
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