pub struct Buffer { /* private fields */ }Expand description
GPU memory in unified (shared) storage: the CPU reads and writes it in place.
Buffers come from the device’s caching allocator and return to it when dropped. Hazard
tracking is disabled at the Metal level (as in MLX); nuvec orders accesses itself. CPU
access is refused while submitted GPU work uses the buffer, and GPU writes require
&mut Buffer, so the CPU and the GPU never race on it.
Implementations§
Trait Implementations§
Source§impl Drop for Buffer
impl Drop for Buffer
impl Send for Buffer
impl Sync for Buffer
Auto Trait Implementations§
impl !RefUnwindSafe for Buffer
impl !UnwindSafe for Buffer
impl Freeze for Buffer
impl Unpin for Buffer
impl UnsafeUnpin for Buffer
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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