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§
Methods from Deref<Target = Variable>§
Sourcepub fn is_immutable(&self) -> bool
pub fn is_immutable(&self) -> bool
Whether a variable is always immutable. Used for optimizations to determine whether it’s safe to inline/merge
pub fn has_length(&self) -> bool
pub fn has_buffer_length(&self) -> bool
Sourcepub fn is_constant(&self, value: i64) -> bool
pub fn is_constant(&self, value: i64) -> bool
Determines if the value is a constant with the specified value (converted if necessary)
Sourcepub fn is_true(&self) -> bool
pub fn is_true(&self) -> bool
Determines if the value is a boolean constant with the true
value
Sourcepub fn is_false(&self) -> bool
pub fn is_false(&self) -> bool
Determines if the value is a boolean constant with the false
value
pub fn vectorization_factor(&self) -> u8
pub fn index(&self) -> Option<Id>
pub fn as_const(&self) -> Option<ConstantScalarValue>
Trait Implementations§
Source§impl Clone for ExpandElement
impl Clone for ExpandElement
Source§fn clone(&self) -> ExpandElement
fn clone(&self) -> ExpandElement
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ExpandElement
impl Debug for ExpandElement
Source§impl Deref for ExpandElement
impl Deref for ExpandElement
Source§impl<T: CubeType> From<ExpandElement> for ExpandElementTyped<T>
impl<T: CubeType> From<ExpandElement> for ExpandElementTyped<T>
Source§fn from(expand: ExpandElement) -> Self
fn from(expand: ExpandElement) -> Self
Converts to this type from the input type.
Source§impl From<ExpandElement> for Variable
impl From<ExpandElement> for Variable
Source§fn from(value: ExpandElement) -> Self
fn from(value: ExpandElement) -> Self
Converts to this type from the input type.
Source§impl<T: CubeType> From<ExpandElementTyped<T>> for ExpandElement
impl<T: CubeType> From<ExpandElementTyped<T>> for ExpandElement
Source§fn from(value: ExpandElementTyped<T>) -> Self
fn from(value: ExpandElementTyped<T>) -> Self
Converts to this type from the input type.
Source§impl From<bf16> for ExpandElement
impl From<bf16> for ExpandElement
Source§impl From<bool> for ExpandElement
impl From<bool> for ExpandElement
Source§impl From<f16> for ExpandElement
impl From<f16> for ExpandElement
Source§impl From<f32> for ExpandElement
impl From<f32> for ExpandElement
Source§impl From<flex32> for ExpandElement
impl From<flex32> for ExpandElement
Source§impl From<i16> for ExpandElement
impl From<i16> for ExpandElement
Source§impl From<i32> for ExpandElement
impl From<i32> for ExpandElement
Source§impl From<i64> for ExpandElement
impl From<i64> for ExpandElement
Source§impl From<i8> for ExpandElement
impl From<i8> for ExpandElement
Source§impl From<tf32> for ExpandElement
impl From<tf32> for ExpandElement
Source§impl From<u16> for ExpandElement
impl From<u16> for ExpandElement
Source§impl From<u32> for ExpandElement
impl From<u32> for ExpandElement
Source§impl From<u64> for ExpandElement
impl From<u64> for ExpandElement
Source§impl From<u8> for ExpandElement
impl From<u8> for ExpandElement
Source§impl From<usize> for ExpandElement
impl From<usize> for ExpandElement
Source§impl Init for ExpandElement
impl Init for ExpandElement
Auto Trait Implementations§
impl Freeze for ExpandElement
impl RefUnwindSafe for ExpandElement
impl !Send for ExpandElement
impl !Sync for ExpandElement
impl Unpin for ExpandElement
impl UnwindSafe for ExpandElement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more