pub enum KernelArg<'a> {
Buffer(&'a MlxBuffer),
BufferWithOffset(&'a MlxBuffer, u64),
Bytes(&'a [u8]),
}Expand description
A buffer or inline-bytes binding for a compute kernel argument slot.
Variants§
Buffer(&'a MlxBuffer)
Bind an existing Metal buffer at the given index.
BufferWithOffset(&'a MlxBuffer, u64)
Bind an existing Metal buffer at the given index with a byte offset.
Bytes(&'a [u8])
Bind inline bytes (small constant data) at the given index.
The data must be Pod and is copied into the command encoder.
Auto Trait Implementations§
impl<'a> Freeze for KernelArg<'a>
impl<'a> RefUnwindSafe for KernelArg<'a>
impl<'a> Send for KernelArg<'a>
impl<'a> Sync for KernelArg<'a>
impl<'a> Unpin for KernelArg<'a>
impl<'a> UnsafeUnpin for KernelArg<'a>
impl<'a> UnwindSafe for KernelArg<'a>
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