Skip to main content

ArrayArg

Enum ArrayArg 

pub enum ArrayArg<R>
where 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.

Fields

§input_pos: usize

The position of the input array.

§length: [usize; 1]

The length of the underlying handle

Implementations§

§

impl<R> ArrayArg<R>
where R: Runtime,

pub unsafe fn from_raw_parts(handle: Handle, length: usize) -> ArrayArg<R>

Create a new array argument.

§Safety

Specifying the wrong length may lead to out-of-bounds reads and writes.

pub unsafe fn from_raw_parts_binding( binding: Binding, length: usize, ) -> ArrayArg<R>

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]

Trait Implementations§

§

impl<R> BufferArg for ArrayArg<R>
where R: Runtime,

§

fn len(&self) -> usize

§

fn shape(&self) -> &[usize]

§

fn strides(&self) -> &[usize]

Auto Trait Implementations§

§

impl<R> !RefUnwindSafe for ArrayArg<R>

§

impl<R> !UnwindSafe for ArrayArg<R>

§

impl<R> Freeze 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>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> ByRef<T> for T

§

fn by_ref(&self) -> &T

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> IntoComptime for T

§

fn comptime(self) -> Self

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> MaybeSendSync for T
where T: Send + Sync,

§

impl<T> MaybeSync for T
where T: Sync,

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,