Struct cubecl::frontend::ExpandElementTyped

source ·
pub struct ExpandElementTyped<T>
where T: CubeType,
{ /* private fields */ }
Expand description

Expand type associated with a type.

Implementations§

source§

impl<C> ExpandElementTyped<Array<C>>
where C: CubePrimitive,

source

pub fn __expand_to_vectorized_method( self, context: &mut CubeContext, vectorization_factor: UInt, ) -> ExpandElementTyped<C>

source§

impl<T> ExpandElementTyped<T>
where T: CubeType,

source

pub fn new(expand: ExpandElement) -> ExpandElementTyped<T>

Constructs a new ExpandElementTyped.

source§

impl<T> ExpandElementTyped<T>
where T: CubePrimitive,

source

pub fn from_lit<L>(lit: L) -> ExpandElementTyped<T>
where L: Into<Variable>,

Create an ExpandElementTyped from a value that is normaly a literal.

source

pub fn constant(&self) -> Option<ConstantScalarValue>

Get the ConstantScalarValue from the variable.

source§

impl<T> ExpandElementTyped<T>
where T: CubeType,

source

pub fn __expand_stride_method<C>( self, context: &mut CubeContext, dim: C, ) -> ExpandElementTyped<UInt>
where C: Index,

source

pub fn __expand_shape_method<C>( self, context: &mut CubeContext, dim: C, ) -> ExpandElementTyped<UInt>
where C: Index,

source

pub fn __expand_len_method( self, context: &mut CubeContext, ) -> ExpandElementTyped<UInt>

source

pub fn __expand_rank_method( self, _context: &mut CubeContext, ) -> ExpandElementTyped<UInt>

Trait Implementations§

source§

impl<T> Clone for ExpandElementTyped<T>
where T: CubeType,

source§

fn clone(&self) -> ExpandElementTyped<T>

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl<T> From<ExpandElement> for ExpandElementTyped<T>
where T: CubeType,

source§

fn from(expand: ExpandElement) -> ExpandElementTyped<T>

Converts to this type from the input type.
source§

impl<T> From<ExpandElementTyped<T>> for ExpandElement
where T: CubeType,

source§

fn from(value: ExpandElementTyped<T>) -> ExpandElement

Converts to this type from the input type.
source§

impl From<F32> for ExpandElementTyped<UInt>

source§

fn from(value: F32) -> ExpandElementTyped<UInt>

Converts to this type from the input type.
source§

impl From<F64> for ExpandElementTyped<UInt>

source§

fn from(value: F64) -> ExpandElementTyped<UInt>

Converts to this type from the input type.
source§

impl From<I32> for ExpandElementTyped<UInt>

source§

fn from(value: I32) -> ExpandElementTyped<UInt>

Converts to this type from the input type.
source§

impl From<I64> for ExpandElementTyped<UInt>

source§

fn from(value: I64) -> ExpandElementTyped<UInt>

Converts to this type from the input type.
source§

impl From<UInt> for ExpandElementTyped<UInt>

source§

fn from(value: UInt) -> ExpandElementTyped<UInt>

Converts to this type from the input type.
source§

impl From<bool> for ExpandElementTyped<bool>

source§

fn from(value: bool) -> ExpandElementTyped<bool>

Converts to this type from the input type.
source§

impl From<f32> for ExpandElementTyped<F32>

source§

fn from(value: f32) -> ExpandElementTyped<F32>

Converts to this type from the input type.
source§

impl From<f64> for ExpandElementTyped<F64>

source§

fn from(value: f64) -> ExpandElementTyped<F64>

Converts to this type from the input type.
source§

impl From<i32> for ExpandElementTyped<I32>

source§

fn from(value: i32) -> ExpandElementTyped<I32>

Converts to this type from the input type.
source§

impl From<i64> for ExpandElementTyped<I64>

source§

fn from(value: i64) -> ExpandElementTyped<I64>

Converts to this type from the input type.
source§

impl From<u32> for ExpandElementTyped<UInt>

source§

fn from(value: u32) -> ExpandElementTyped<UInt>

Converts to this type from the input type.
source§

impl<T> Init for ExpandElementTyped<SharedMemory<T>>
where T: CubePrimitive,

source§

fn init(self, _context: &mut CubeContext) -> ExpandElementTyped<SharedMemory<T>>

Initialize a type within a context. Read more
source§

impl<'a, C> Init for ExpandElementTyped<Slice<'a, C>>
where C: CubeType,

source§

fn init(self, _context: &mut CubeContext) -> ExpandElementTyped<Slice<'a, C>>

Initialize a type within a context. Read more
source§

impl<'a, C> Init for ExpandElementTyped<SliceMut<'a, C>>
where C: CubeType,

source§

fn init(self, _context: &mut CubeContext) -> ExpandElementTyped<SliceMut<'a, C>>

Initialize a type within a context. Read more
source§

impl<T> Init for ExpandElementTyped<T>

source§

fn init(self, context: &mut CubeContext) -> ExpandElementTyped<T>

Initialize a type within a context. Read more
source§

impl<E> SliceOperatorExpand<E> for ExpandElementTyped<Array<E>>
where E: CubePrimitive,

source§

fn slice_base<Start, End>( &self, context: &mut CubeContext, start: Start, end: End, ) -> ExpandElement
where Start: Index, End: Index,

source§

fn __expand_slice_method<Start, End>( &self, context: &mut CubeContext, start: Start, end: End, ) -> ExpandElementTyped<Slice<'static, E>>
where Start: Index, End: Index,

source§

fn __expand_slice_mut_method<Start, End>( &self, context: &mut CubeContext, start: Start, end: End, ) -> ExpandElementTyped<SliceMut<'static, E>>
where Start: Index, End: Index,

source§

fn __expand_slice_mut_unsafe_method<Start, End>( &self, context: &mut CubeContext, start: Start, end: End, ) -> ExpandElementTyped<SliceMut<'static, E>>
where Start: Index, End: Index,

source§

fn __expand_as_slice_method( &self, _context: &mut CubeContext, ) -> ExpandElementTyped<Slice<'static, E>>

source§

fn __expand_as_slice_mut_unsafe_method( &self, context: &mut CubeContext, ) -> ExpandElementTyped<SliceMut<'static, E>>

source§

fn __expand_as_slice_mut_method( &self, _context: &mut CubeContext, ) -> ExpandElementTyped<SliceMut<'static, E>>

source§

impl<E> SliceOperatorExpand<E> for ExpandElementTyped<SharedMemory<E>>
where E: CubePrimitive,

source§

fn slice_base<Start, End>( &self, context: &mut CubeContext, start: Start, end: End, ) -> ExpandElement
where Start: Index, End: Index,

source§

fn __expand_slice_method<Start, End>( &self, context: &mut CubeContext, start: Start, end: End, ) -> ExpandElementTyped<Slice<'static, E>>
where Start: Index, End: Index,

source§

fn __expand_slice_mut_method<Start, End>( &self, context: &mut CubeContext, start: Start, end: End, ) -> ExpandElementTyped<SliceMut<'static, E>>
where Start: Index, End: Index,

source§

fn __expand_slice_mut_unsafe_method<Start, End>( &self, context: &mut CubeContext, start: Start, end: End, ) -> ExpandElementTyped<SliceMut<'static, E>>
where Start: Index, End: Index,

source§

fn __expand_as_slice_method( &self, _context: &mut CubeContext, ) -> ExpandElementTyped<Slice<'static, E>>

source§

fn __expand_as_slice_mut_unsafe_method( &self, context: &mut CubeContext, ) -> ExpandElementTyped<SliceMut<'static, E>>

source§

fn __expand_as_slice_mut_method( &self, _context: &mut CubeContext, ) -> ExpandElementTyped<SliceMut<'static, E>>

source§

impl<'a, E> SliceOperatorExpand<E> for ExpandElementTyped<Slice<'a, E>>
where E: CubePrimitive,

source§

fn slice_base<Start, End>( &self, context: &mut CubeContext, start: Start, end: End, ) -> ExpandElement
where Start: Index, End: Index,

source§

fn __expand_slice_method<Start, End>( &self, context: &mut CubeContext, start: Start, end: End, ) -> ExpandElementTyped<Slice<'static, E>>
where Start: Index, End: Index,

source§

fn __expand_slice_mut_method<Start, End>( &self, context: &mut CubeContext, start: Start, end: End, ) -> ExpandElementTyped<SliceMut<'static, E>>
where Start: Index, End: Index,

source§

fn __expand_slice_mut_unsafe_method<Start, End>( &self, context: &mut CubeContext, start: Start, end: End, ) -> ExpandElementTyped<SliceMut<'static, E>>
where Start: Index, End: Index,

source§

fn __expand_as_slice_method( &self, _context: &mut CubeContext, ) -> ExpandElementTyped<Slice<'static, E>>

source§

fn __expand_as_slice_mut_unsafe_method( &self, context: &mut CubeContext, ) -> ExpandElementTyped<SliceMut<'static, E>>

source§

fn __expand_as_slice_mut_method( &self, _context: &mut CubeContext, ) -> ExpandElementTyped<SliceMut<'static, E>>

source§

impl<'a, E> SliceOperatorExpand<E> for ExpandElementTyped<SliceMut<'a, E>>
where E: CubePrimitive,

source§

fn slice_base<Start, End>( &self, context: &mut CubeContext, start: Start, end: End, ) -> ExpandElement
where Start: Index, End: Index,

source§

fn __expand_slice_method<Start, End>( &self, context: &mut CubeContext, start: Start, end: End, ) -> ExpandElementTyped<Slice<'static, E>>
where Start: Index, End: Index,

source§

fn __expand_slice_mut_method<Start, End>( &self, context: &mut CubeContext, start: Start, end: End, ) -> ExpandElementTyped<SliceMut<'static, E>>
where Start: Index, End: Index,

source§

fn __expand_slice_mut_unsafe_method<Start, End>( &self, context: &mut CubeContext, start: Start, end: End, ) -> ExpandElementTyped<SliceMut<'static, E>>
where Start: Index, End: Index,

source§

fn __expand_as_slice_method( &self, _context: &mut CubeContext, ) -> ExpandElementTyped<Slice<'static, E>>

source§

fn __expand_as_slice_mut_unsafe_method( &self, context: &mut CubeContext, ) -> ExpandElementTyped<SliceMut<'static, E>>

source§

fn __expand_as_slice_mut_method( &self, _context: &mut CubeContext, ) -> ExpandElementTyped<SliceMut<'static, E>>

source§

impl<E> SliceOperatorExpand<E> for ExpandElementTyped<Tensor<E>>
where E: CubePrimitive,

source§

fn slice_base<Start, End>( &self, context: &mut CubeContext, start: Start, end: End, ) -> ExpandElement
where Start: Index, End: Index,

source§

fn __expand_slice_method<Start, End>( &self, context: &mut CubeContext, start: Start, end: End, ) -> ExpandElementTyped<Slice<'static, E>>
where Start: Index, End: Index,

source§

fn __expand_slice_mut_method<Start, End>( &self, context: &mut CubeContext, start: Start, end: End, ) -> ExpandElementTyped<SliceMut<'static, E>>
where Start: Index, End: Index,

source§

fn __expand_slice_mut_unsafe_method<Start, End>( &self, context: &mut CubeContext, start: Start, end: End, ) -> ExpandElementTyped<SliceMut<'static, E>>
where Start: Index, End: Index,

source§

fn __expand_as_slice_method( &self, _context: &mut CubeContext, ) -> ExpandElementTyped<Slice<'static, E>>

source§

fn __expand_as_slice_mut_unsafe_method( &self, context: &mut CubeContext, ) -> ExpandElementTyped<SliceMut<'static, E>>

source§

fn __expand_as_slice_mut_method( &self, _context: &mut CubeContext, ) -> ExpandElementTyped<SliceMut<'static, E>>

source§

impl<T> Vectorized for ExpandElementTyped<T>
where T: CubeType,

Auto Trait Implementations§

§

impl<T> Freeze for ExpandElementTyped<T>

§

impl<T> RefUnwindSafe for ExpandElementTyped<T>
where T: RefUnwindSafe,

§

impl<T> !Send for ExpandElementTyped<T>

§

impl<T> !Sync for ExpandElementTyped<T>

§

impl<T> Unpin for ExpandElementTyped<T>
where T: Unpin,

§

impl<T> UnwindSafe for ExpandElementTyped<T>
where T: 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> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> ToOwned for T
where T: Clone,

§

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>,

§

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>,

§

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