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 CubeType>::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 CubeType>::ExpandType, ) -> TensorArgExpand<P, RA, Output>

Trait Implementations§

Source§

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

Source§

type ExpandType = TensorArgExpand<P, RA, Tag>

Source§

fn into_mut(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType

Wrapper around the init method, necessary to type inference.
Source§

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

Source§

fn read(&self, _index: u32) -> Line<E>

Read the tensor at the given index.
Source§

fn write(&self, _index: u32, _value: Line<E>)

Write the tensor at the given index.
Source§

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

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

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

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

fn rank(&self) -> u32

Get the rank of the tensor.
Source§

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

Source§

fn read(&self, _index: u32) -> Line<E>

Read the tensor at the given index.
Source§

fn write(&self, _index: u32, _value: Line<E>)

Write the tensor at the given index.
Source§

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

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

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

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

fn rank(&self) -> u32

Get the rank of the tensor.

Auto Trait Implementations§

§

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

§

impl<P, RA, Tag> RefUnwindSafe for TensorArg<P, RA, Tag>
where <RA as ReduceArgs>::State<P>: RefUnwindSafe, Tag: RefUnwindSafe,

§

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

§

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

§

impl<P, RA, Tag> Unpin for TensorArg<P, RA, Tag>
where Tag: Unpin,

§

impl<P, RA, Tag> UnwindSafe for TensorArg<P, RA, Tag>
where <RA as ReduceArgs>::State<P>: RefUnwindSafe, Tag: UnwindSafe,

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V