pub enum ArrayArg<R: Runtime> {
Handle {
handle: ArrayBinding<R>,
},
Alias {
input_pos: usize,
length: [usize; 1],
},
}Variants§
Handle
The array is passed with an array handle.
Fields
§
handle: ArrayBinding<R>The array handle.
Alias
The array is aliasing another input array.
Implementations§
Source§impl<R: Runtime> ArrayArg<R>
impl<R: Runtime> ArrayArg<R>
Sourcepub unsafe fn from_raw_parts(handle: Handle, length: usize) -> Self
pub unsafe fn from_raw_parts(handle: Handle, length: usize) -> Self
Create a new array argument.
§Safety
Specifying the wrong length may lead to out-of-bounds reads and writes.
Sourcepub unsafe fn from_raw_parts_binding(binding: Binding, length: usize) -> Self
pub unsafe fn from_raw_parts_binding(binding: Binding, length: usize) -> Self
Create a new array argument from a binding.
§Safety
Specifying the wrong length may lead to out-of-bounds reads and writes.
pub fn size(&self) -> usize
pub fn shape(&self) -> &[usize]
Auto Trait Implementations§
impl<R> Freeze for ArrayArg<R>
impl<R> !RefUnwindSafe for ArrayArg<R>
impl<R> Send for ArrayArg<R>
impl<R> Sync for ArrayArg<R>
impl<R> Unpin for ArrayArg<R>where
R: Unpin,
impl<R> UnsafeUnpin for ArrayArg<R>
impl<R> !UnwindSafe for ArrayArg<R>
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