Enum cubecl_core::frontend::ExpandElement

source ·
pub enum ExpandElement {
    Managed(Rc<Variable>),
    Plain(Variable),
}
Expand description

Reference to a JIT variable

Variants§

§

Managed(Rc<Variable>)

Variable kept in the variable pool.

§

Plain(Variable)

Variable not kept in the variable pool.

Implementations§

source§

impl ExpandElement

source

pub fn can_mut(&self) -> bool

If the element can be mutated inplace, potentially reusing the register.

Methods from Deref<Target = Variable>§

source

pub fn index(&self) -> Option<u16>

source

pub fn item(&self) -> Item

Fetch the item of the variable.

Trait Implementations§

source§

impl Clone for ExpandElement

source§

fn clone(&self) -> ExpandElement

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 Debug for ExpandElement

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deref for ExpandElement

§

type Target = Variable

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl From<BF16> for ExpandElement

source§

fn from(value: BF16) -> Self

Converts to this type from the input type.
source§

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

source§

fn from(expand: ExpandElement) -> Self

Converts to this type from the input type.
source§

impl From<ExpandElement> for Variable

source§

fn from(value: ExpandElement) -> Self

Converts to this type from the input type.
source§

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

source§

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

Converts to this type from the input type.
source§

impl From<F16> for ExpandElement

source§

fn from(value: F16) -> Self

Converts to this type from the input type.
source§

impl From<F32> for ExpandElement

source§

fn from(value: F32) -> Self

Converts to this type from the input type.
source§

impl From<F64> for ExpandElement

source§

fn from(value: F64) -> Self

Converts to this type from the input type.
source§

impl From<I32> for ExpandElement

source§

fn from(value: I32) -> Self

Converts to this type from the input type.
source§

impl From<I64> for ExpandElement

source§

fn from(value: I64) -> Self

Converts to this type from the input type.
source§

impl From<UInt> for ExpandElement

Useful for Comptime

source§

fn from(value: UInt) -> Self

Converts to this type from the input type.
source§

impl From<bool> for ExpandElement

source§

fn from(value: bool) -> Self

Converts to this type from the input type.
source§

impl From<f32> for ExpandElement

source§

fn from(value: f32) -> Self

Converts to this type from the input type.
source§

impl From<i32> for ExpandElement

source§

fn from(value: i32) -> Self

Converts to this type from the input type.
source§

impl From<i64> for ExpandElement

source§

fn from(value: i64) -> Self

Converts to this type from the input type.
source§

impl From<u32> for ExpandElement

source§

fn from(value: u32) -> Self

Converts to this type from the input type.
source§

impl From<usize> for ExpandElement

source§

fn from(value: usize) -> Self

Converts to this type from the input type.
source§

impl Init for ExpandElement

source§

fn init(self, context: &mut CubeContext) -> Self

Initialize a type within a context. Read more
source§

impl Vectorized for &ExpandElement

source§

fn vectorization_factor(&self) -> UInt

source§

fn vectorize(self, _factor: UInt) -> Self

source§

impl Vectorized for ExpandElement

source§

fn vectorization_factor(&self) -> UInt

source§

fn vectorize(self, _factor: UInt) -> Self

Auto Trait Implementations§

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§

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