Enum cubecl_core::ir::Elem
source · pub enum Elem {
Float(FloatKind),
Int(IntKind),
AtomicInt(IntKind),
UInt,
AtomicUInt,
Bool,
}
Variants§
Implementations§
source§impl Elem
impl Elem
sourcepub fn constant_from_f64(&self, val: f64) -> Variable
pub fn constant_from_f64(&self, val: f64) -> Variable
Create a constant scalar from a float.
The output will have the same type as the element.
sourcepub fn constant_from_i64(&self, val: i64) -> Variable
pub fn constant_from_i64(&self, val: i64) -> Variable
Create a constant scalar from a signed integer.
The output will have the same type as the element.
sourcepub fn constant_from_u64(&self, val: u64) -> Variable
pub fn constant_from_u64(&self, val: u64) -> Variable
Create a constant scalar from a unsigned integer.
The output will have the same type as the element.
sourcepub fn constant_from_bool(&self, val: bool) -> Variable
pub fn constant_from_bool(&self, val: bool) -> Variable
Create a constant scalar from a boolean.
The output will have the same type as the element.
sourcepub fn from_constant(&self, constant: Variable) -> Variable
pub fn from_constant(&self, constant: Variable) -> Variable
Ensure that the variable provided, when a constant, is the same type as elem.
pub fn is_atomic(&self) -> bool
Trait Implementations§
source§impl<'de> Deserialize<'de> for Elem
impl<'de> Deserialize<'de> for Elem
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for Elem
impl Ord for Elem
source§impl PartialOrd for Elem
impl PartialOrd for Elem
impl Copy for Elem
impl Eq for Elem
impl StructuralPartialEq for Elem
Auto Trait Implementations§
impl Freeze for Elem
impl RefUnwindSafe for Elem
impl Send for Elem
impl Sync for Elem
impl Unpin for Elem
impl UnwindSafe for Elem
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)