Skip to main content

VirtualTensorExpand

Struct VirtualTensorExpand 

Source
pub struct VirtualTensorExpand<E: Numeric, N: Size, IO> { /* private fields */ }
Expand description

Expand type for VirtualTensor.

Implementations§

Source§

impl<E: Numeric, N: Size, IO: Clone> VirtualTensorExpand<E, N, IO>

Source

pub fn __expand_read_method( &self, scope: &Scope, index: <usize as CubeType>::ExpandType, ) -> <Vector<E, N> as CubeType>::ExpandType

Source

pub fn __expand_len_method( &self, scope: &Scope, ) -> <usize as CubeType>::ExpandType

Source

pub fn __expand_read( scope: &Scope, this: &Self, index: <usize as CubeType>::ExpandType, ) -> <Vector<E, N> as CubeType>::ExpandType

Source

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

Source§

impl<E: Numeric, N: Size, IO: Clone> VirtualTensorExpand<E, N, IO>

Source

pub fn __expand_as_slice_method<'infer, 'scope>( &'infer self, scope: &'scope Scope, ) -> &'infer <[Vector<E, N>] as CubeType>::ExpandType

Source

pub fn __expand_as_mut_slice_method<'infer, 'scope>( &'infer mut self, scope: &'scope Scope, ) -> &'infer mut <[Vector<E, N>] as CubeType>::ExpandType

Source

pub fn __expand_as_tensor_map_method( &self, scope: &Scope, ) -> <ComptimeOption<TensorMap<E, Tiled>> as CubeType>::ExpandType

Source

pub fn __expand_slice_method<'infer, 'scope>( &'infer self, scope: &'scope Scope, start: <usize as CubeType>::ExpandType, end: <usize as CubeType>::ExpandType, ) -> &'infer <[Vector<E, N>] as CubeType>::ExpandType

Source

pub fn __expand_shape_method( &self, scope: &Scope, axis: <usize as CubeType>::ExpandType, ) -> <usize as CubeType>::ExpandType

Get the shape of the tensor at the given axis.

Source

pub fn __expand_stride_method( &self, scope: &Scope, axis: <usize as CubeType>::ExpandType, ) -> <usize as CubeType>::ExpandType

Get the stride of the tensor at the given axis.

Source

pub fn __expand_rank_method( &self, scope: &Scope, ) -> <usize as CubeType>::ExpandType

Get the rank of the tensor.

Source

pub fn __expand_buffer_len_method( &self, scope: &Scope, ) -> <usize as CubeType>::ExpandType

Source

pub fn __expand_as_slice<'infer, 'scope>( scope: &'scope Scope, this: &'infer Self, ) -> &'infer <[Vector<E, N>] as CubeType>::ExpandType

Source

pub fn __expand_as_mut_slice<'infer, 'scope>( scope: &'scope Scope, this: &'infer mut Self, ) -> &'infer mut <[Vector<E, N>] as CubeType>::ExpandType

Source

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

Source

pub fn __expand_slice<'infer, 'scope>( scope: &'scope Scope, this: &'infer Self, start: <usize as CubeType>::ExpandType, end: <usize as CubeType>::ExpandType, ) -> &'infer <[Vector<E, N>] as CubeType>::ExpandType

Source

pub fn __expand_shape( scope: &Scope, this: &Self, axis: <usize as CubeType>::ExpandType, ) -> <usize as CubeType>::ExpandType

Get the shape of the tensor at the given axis.

Source

pub fn __expand_stride( scope: &Scope, this: &Self, axis: <usize as CubeType>::ExpandType, ) -> <usize as CubeType>::ExpandType

Get the stride of the tensor at the given axis.

Source

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

Get the rank of the tensor.

Source

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

Source§

impl<E: Numeric, N: Size, IO: Clone + 'static> VirtualTensorExpand<E, N, IO>

Source

pub fn __expand_as_view_method<'infer, 'scope>( &'infer self, scope: &'scope Scope, ) -> <View<'infer, Vector<E, N>, usize> as CubeType>::ExpandType

Create a conceptual view over this tensor, with a simple linear layout

Source

pub fn __expand_as_view<'infer, 'scope>( scope: &'scope Scope, this: &'infer Self, ) -> <View<'infer, Vector<E, N>, usize> as CubeType>::ExpandType

Create a conceptual view over this tensor, with a simple linear layout

Source§

impl<E: Numeric, N: Size, IO: Clone + 'static> VirtualTensorExpand<E, N, IO>

Source

pub fn __expand_view_method<C: Coordinates + 'static>( &self, scope: &Scope, layout: VirtualLayoutExpand<C, Coords1d>, ) -> ViewExpand<'_, Vector<E, N>, C>

Create a conceptual view over this tensor, allowing for multi-dimensional indexing with custom layouts

Source

pub fn __expand_into_view_method<C: Coordinates + 'static>( self, scope: &Scope, layout: VirtualLayoutExpand<C, Coords1d>, ) -> ViewExpand<'static, Vector<E, N>, C>

Source§

impl<E: Numeric, N: Size> VirtualTensorExpand<E, N, ReadWrite>

Source

pub fn __expand_view_mut_method<C: Coordinates + 'static>( &mut self, scope: &Scope, layout: VirtualLayoutExpand<C, Coords1d>, ) -> ViewMutExpand<'_, Vector<E, N>, C>

Source

pub fn __expand_into_view_mut_method<C: Coordinates + 'static>( self, scope: &Scope, layout: VirtualLayoutExpand<C, Coords1d>, ) -> ViewMutExpand<'static, Vector<E, N>, C>

Source§

impl<E: Numeric, N: Size> VirtualTensorExpand<E, N, ReadWrite>

Source

pub fn __expand_as_view_mut_method<'infer, 'scope>( &'infer mut self, scope: &'scope Scope, ) -> <ViewMut<'infer, Vector<E, N>, usize> as CubeType>::ExpandType

Create a conceptual mutable view over this tensor, with a simple linear layout

Source

pub fn __expand_as_view_mut<'infer, 'scope>( scope: &'scope Scope, this: &'infer mut Self, ) -> <ViewMut<'infer, Vector<E, N>, usize> as CubeType>::ExpandType

Create a conceptual mutable view over this tensor, with a simple linear layout

Source§

impl<E: Numeric, N: Size, IO: Clone + 'static> VirtualTensorExpand<E, N, IO>

Source

pub fn __expand_coordinate_method( &self, scope: &Scope, index: <usize as CubeType>::ExpandType, dim: <usize as CubeType>::ExpandType, ) -> <usize as CubeType>::ExpandType

Source

pub fn __expand_coordinate( scope: &Scope, this: &Self, index: <usize as CubeType>::ExpandType, dim: <usize as CubeType>::ExpandType, ) -> <usize as CubeType>::ExpandType

Source§

impl<E: Numeric, N: Size> VirtualTensorExpand<E, N, ReadWrite>

Source

pub fn __expand_write_method( &mut self, scope: &Scope, index: <usize as CubeType>::ExpandType, value: <Vector<E, N> as CubeType>::ExpandType, )

Source

pub fn __expand_write( scope: &Scope, this: &mut Self, index: <usize as CubeType>::ExpandType, value: <Vector<E, N> as CubeType>::ExpandType, )

Trait Implementations§

Source§

impl<E: Numeric, N: Size, IO: Clone> AsMutExpand for VirtualTensorExpand<E, N, IO>

Source§

fn __expand_ref_mut_method(&mut self, _: &Scope) -> &mut Self

Source§

fn __expand_as_mut_method(&mut self, scope: &Scope) -> &mut T

Source§

impl<E: Numeric, N: Size, IO: Clone> AsRefExpand for VirtualTensorExpand<E, N, IO>

Source§

fn __expand_ref_method(&self, _: &Scope) -> &Self

Source§

fn __expand_as_ref_method(&self, scope: &Scope) -> &T

Source§

impl<E: Clone + Numeric, N: Clone + Size, IO: Clone> Clone for VirtualTensorExpand<E, N, IO>

Source§

fn clone(&self) -> VirtualTensorExpand<E, N, IO>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<E: Numeric, N: Size, IO> CubeDebug for VirtualTensorExpand<E, N, IO>

Source§

fn set_debug_name(&self, scope: &Scope, name: &'static str)

Set the debug name of this type’s expansion. Should do nothing for types that don’t appear at runtime
Source§

impl<E: Numeric, N: Size, IO: Clone> ExpandTypeClone for VirtualTensorExpand<E, N, IO>

Source§

fn clone_unchecked(&self) -> Self

Unchecked clone that only clones the conceptual runtime value. Should only be used in cases where each copy is used in a mutually exclusive branch (i.e. match, runtime enums). This is intentionally separated from Rust’s Clone semantics and should only be used for the conceptual expand values, never real data. Using two values in the same branch is undefined behaviour.
Source§

impl<E: Numeric, N: Size, IO: Clone> IntoExpand for VirtualTensorExpand<E, N, IO>

Source§

type Expand = VirtualTensorExpand<E, N, IO>

Source§

fn into_expand(self, _: &Scope) -> Self::Expand

Source§

impl<E: Numeric, N: Size, IO> IntoMut for VirtualTensorExpand<E, N, IO>

Source§

fn into_mut(self, _scope: &Scope) -> Self

Convert the variable into a potentially new mutable variable in scope, copying if needed.
Source§

impl<E: Numeric, N: Size, IO: Clone> SliceOperatorExpand<Vector<E, N>> for VirtualTensorExpand<E, N, IO>

Source§

impl<E: Numeric, N: Size, IO: Clone> VectorizedExpand for VirtualTensorExpand<E, N, IO>

Source§

impl<T: Numeric, N: Size, IO: Clone> ViewOperationsExpand<Vector<T, N>, usize> for VirtualTensorExpand<T, N, IO>

Source§

impl<T: Numeric, N: Size> ViewOperationsMutExpand<Vector<T, N>, usize> for VirtualTensorExpand<T, N, ReadWrite>

Source§

fn __expand_write_method( &self, scope: &Scope, pos: NativeExpand<usize>, value: <Vector<T, N> as CubeType>::ExpandType, )

Source§

fn __expand_write_checked_method( &self, scope: &Scope, pos: NativeExpand<usize>, value: <Vector<T, N> as CubeType>::ExpandType, )

Source§

fn __expand_as_linear_slice_mut_method( &self, _scope: &Scope, _pos: NativeExpand<usize>, _end: NativeExpand<usize>, ) -> &mut SliceExpand<Vector<T, N>>

Source§

fn __expand_tensor_map_store_method( &self, _scope: &Scope, _shared_memory: &SliceExpand<Vector<T, N>>, _pos: <Coords1d as CubeType>::ExpandType, )

Auto Trait Implementations§

§

impl<E, N, IO> !RefUnwindSafe for VirtualTensorExpand<E, N, IO>

§

impl<E, N, IO> !Send for VirtualTensorExpand<E, N, IO>

§

impl<E, N, IO> !Sync for VirtualTensorExpand<E, N, IO>

§

impl<E, N, IO> !UnwindSafe for VirtualTensorExpand<E, N, IO>

§

impl<E, N, IO> Freeze for VirtualTensorExpand<E, N, IO>

§

impl<E, N, IO> Unpin for VirtualTensorExpand<E, N, IO>
where IO: Unpin,

§

impl<E, N, IO> UnsafeUnpin for VirtualTensorExpand<E, N, IO>

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> CloneExpand for T
where T: Clone,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> IntoComptime for T

Source§

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

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.