Skip to main content

TensorArg

Struct TensorArg 

Source
pub struct TensorArg<P: ReduceDType, RA: ReduceArgs, Tag> { /* private fields */ }

Implementations§

Source§

impl<P: ReduceDType, RA: ReduceArgs> TensorArg<P, RA, Input>

Source

pub fn new_input(_state: &RA::State<P>) -> Self

Source

pub fn __expand_new_input( _scope: &mut Scope, state: <RA::State<P> as RudaType>::ExpandType, ) -> TensorArgExpand<P, RA, Input>

Source§

impl<P: ReduceDType, RA: ReduceArgs> TensorArg<P, RA, Output>

Source

pub fn new_output(_state: &mut RA::State<P>) -> Self

Source

pub fn __expand_new_output( _scope: &mut Scope, state: <RA::State<P> as RudaType>::ExpandType, ) -> TensorArgExpand<P, RA, Output>

Trait Implementations§

Source§

impl<P: ReduceDType, RA: ReduceArgs, Tag> RudaType for TensorArg<P, RA, Tag>

Source§

impl<P: ReduceDType, RA: ReduceArgs> Vectorized for TensorArg<P, RA, Input>

Source§

fn vector_size(&self) -> usize

Source§

fn __expand_vector_size(_scope: &mut Scope, this: Self::ExpandType) -> usize

Source§

impl<P: ReduceDType, RA: ReduceArgs> Vectorized for TensorArg<P, RA, Output>

Source§

fn vector_size(&self) -> usize

Source§

fn __expand_vector_size(_scope: &mut Scope, this: Self::ExpandType) -> usize

Source§

impl<P: ReduceDType, RA: ReduceArgs> VirtualTensorOperations<<P as ReduceDType>::In, <P as ReduceDType>::SizeIn> for TensorArg<P, RA, Input>

Source§

fn as_tensor_map(&self) -> ComptimeOption<TensorMap<E, Tiled>>

Source§

fn read(&self, _index: usize) -> Vector<E, N>

Read the tensor at the given index.
Source§

fn read_window(&self, _start: usize, _end: usize) -> Slice<Vector<E, N>> ⓘ

Source§

fn write(&self, _index: usize, _value: Vector<E, N>)

Write the tensor at the given index.
Source§

fn shape(&self, _axis: usize) -> usize

Get the shape of the tensor at the given axis.
Source§

fn stride(&self, _axis: usize) -> usize

Get the stride of the tensor at the given axis.
Source§

fn rank(&self) -> usize

Get the rank of the tensor.
Source§

fn len(&self) -> usize

Source§

fn buffer_len(&self) -> usize

Source§

fn __expand_as_tensor_map( scope: &mut Scope, this: Self::ExpandType, ) -> <ComptimeOption<TensorMap<E, Tiled>> as RudaType>::ExpandType

Source§

fn __expand_read( scope: &mut Scope, this: Self::ExpandType, _index: <usize as RudaType>::ExpandType, ) -> <Vector<E, N> as RudaType>::ExpandType

Source§

fn __expand_read_window( scope: &mut Scope, this: Self::ExpandType, _start: <usize as RudaType>::ExpandType, _end: <usize as RudaType>::ExpandType, ) -> <Slice<Vector<E, N>> as RudaType>::ExpandType ⓘ

Source§

fn __expand_write( scope: &mut Scope, this: Self::ExpandType, _index: <usize as RudaType>::ExpandType, _value: <Vector<E, N> as RudaType>::ExpandType, ) -> <() as RudaType>::ExpandType

Source§

fn __expand_shape( scope: &mut Scope, this: Self::ExpandType, _axis: <usize as RudaType>::ExpandType, ) -> <usize as RudaType>::ExpandType

Source§

fn __expand_stride( scope: &mut Scope, this: Self::ExpandType, _axis: <usize as RudaType>::ExpandType, ) -> <usize as RudaType>::ExpandType

Source§

fn __expand_rank( scope: &mut Scope, this: Self::ExpandType, ) -> <usize as RudaType>::ExpandType

Source§

fn __expand_len( scope: &mut Scope, this: Self::ExpandType, ) -> <usize as RudaType>::ExpandType

Source§

fn __expand_buffer_len( scope: &mut Scope, this: Self::ExpandType, ) -> <usize as RudaType>::ExpandType

Source§

impl<P: ReduceDType, RA: ReduceArgs> VirtualTensorOperations<<P as ReduceDType>::Out, <P as ReduceDType>::SizeOut> for TensorArg<P, RA, Output>

Source§

fn as_tensor_map(&self) -> ComptimeOption<TensorMap<E, Tiled>>

Source§

fn read(&self, _index: usize) -> Vector<E, N>

Read the tensor at the given index.
Source§

fn read_window(&self, _start: usize, _end: usize) -> Slice<Vector<E, N>> ⓘ

Source§

fn write(&self, _index: usize, _value: Vector<E, N>)

Write the tensor at the given index.
Source§

fn shape(&self, _axis: usize) -> usize

Get the shape of the tensor at the given axis.
Source§

fn stride(&self, _axis: usize) -> usize

Get the stride of the tensor at the given axis.
Source§

fn rank(&self) -> usize

Get the rank of the tensor.
Source§

fn len(&self) -> usize

Source§

fn buffer_len(&self) -> usize

Source§

fn __expand_as_tensor_map( scope: &mut Scope, this: Self::ExpandType, ) -> <ComptimeOption<TensorMap<E, Tiled>> as RudaType>::ExpandType

Source§

fn __expand_read( scope: &mut Scope, this: Self::ExpandType, _index: <usize as RudaType>::ExpandType, ) -> <Vector<E, N> as RudaType>::ExpandType

Source§

fn __expand_read_window( scope: &mut Scope, this: Self::ExpandType, _start: <usize as RudaType>::ExpandType, _end: <usize as RudaType>::ExpandType, ) -> <Slice<Vector<E, N>> as RudaType>::ExpandType ⓘ

Source§

fn __expand_write( scope: &mut Scope, this: Self::ExpandType, _index: <usize as RudaType>::ExpandType, _value: <Vector<E, N> as RudaType>::ExpandType, ) -> <() as RudaType>::ExpandType

Source§

fn __expand_shape( scope: &mut Scope, this: Self::ExpandType, _axis: <usize as RudaType>::ExpandType, ) -> <usize as RudaType>::ExpandType

Source§

fn __expand_stride( scope: &mut Scope, this: Self::ExpandType, _axis: <usize as RudaType>::ExpandType, ) -> <usize as RudaType>::ExpandType

Source§

fn __expand_rank( scope: &mut Scope, this: Self::ExpandType, ) -> <usize as RudaType>::ExpandType

Source§

fn __expand_len( scope: &mut Scope, this: Self::ExpandType, ) -> <usize as RudaType>::ExpandType

Source§

fn __expand_buffer_len( scope: &mut Scope, this: Self::ExpandType, ) -> <usize as RudaType>::ExpandType

Auto Trait Implementations§

§

impl<P, RA, Tag> !Send for TensorArg<P, RA, Tag>

§

impl<P, RA, Tag> !Sync for TensorArg<P, RA, Tag>

§

impl<P, RA, Tag> Freeze for TensorArg<P, RA, Tag>
where *mut <RA as ReduceArgs>::State<P>: Freeze, PhantomData<Tag>: Freeze,

§

impl<P, RA, Tag> RefUnwindSafe for TensorArg<P, RA, Tag>

§

impl<P, RA, Tag> Unpin for TensorArg<P, RA, Tag>
where *mut <RA as ReduceArgs>::State<P>: Unpin, PhantomData<Tag>: Unpin,

§

impl<P, RA, Tag> UnsafeUnpin for TensorArg<P, RA, Tag>

§

impl<P, RA, Tag> UnwindSafe for TensorArg<P, RA, Tag>

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
Source§

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

Source§

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

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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.

Source§

impl<T> IntoComptime for T

Source§

fn comptime(self) -> Self

Source§

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.