pub struct DeviceArena { /* private fields */ }Expand description
One device arena plus its page-locked staging ring.
Implementations§
Source§impl DeviceArena
impl DeviceArena
Sourcepub fn alloc(
gpu: &dyn GpuBackend,
bytes: usize,
layout: SlotLayout,
ring_slots: usize,
) -> Result<(Self, ExpertLru)>
pub fn alloc( gpu: &dyn GpuBackend, bytes: usize, layout: SlotLayout, ring_slots: usize, ) -> Result<(Self, ExpertLru)>
bytes of device memory (off the allocation ledger) and a ring of
ring_slots page-locked expert slots (rounded up to an even count).
pub fn dev(&self) -> DevicePtr
pub fn bytes(&self) -> usize
pub fn free(self, gpu: &dyn GpuBackend) -> Result<()>
Trait Implementations§
impl Send for DeviceArena
impl Sync for DeviceArena
Auto Trait Implementations§
impl Freeze for DeviceArena
impl RefUnwindSafe for DeviceArena
impl Unpin for DeviceArena
impl UnwindSafe for DeviceArena
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