pub struct Memory { /* private fields */ }Expand description
Shared execution memory for storage and current workgroup buffers.
Implementations§
Source§impl Memory
impl Memory
Sourcepub fn with_storage(self, name: impl Into<Arc<str>>, buffer: Buffer) -> Self
pub fn with_storage(self, name: impl Into<Arc<str>>, buffer: Buffer) -> Self
Add a storage buffer.
Sourcepub fn with_workgroup(self, name: impl Into<Arc<str>>, buffer: Buffer) -> Self
pub fn with_workgroup(self, name: impl Into<Arc<str>>, buffer: Buffer) -> Self
Add a workgroup buffer.
Sourcepub fn from_bytes(bytes: Vec<u8>) -> Self
pub fn from_bytes(bytes: Vec<u8>) -> Self
Build a single byte payload memory used by canonical primitive evaluators.
Sourcepub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn into_bytes(self) -> Vec<u8> ⓘ
Consume this memory and return the byte payload for canonical primitives.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Memory
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin for Memory
impl UnsafeUnpin for Memory
impl UnwindSafe for Memory
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