[][src]Enum weld::ast::ScalarKind

pub enum ScalarKind {
    Bool,
    I8,
    I16,
    I32,
    I64,
    U8,
    U16,
    U32,
    U64,
    F32,
    F64,
}

Scalar types in the Weld IR.

Variants

Bool
I8
I16
I32
I64
U8
U16
U32
U64
F32
F64

Methods

impl ScalarKind[src]

pub fn is_float(self) -> bool[src]

Returns whether this scalar is a floating-point type.

The current floating point kinds are F32 and F64.

pub fn is_bool(self) -> bool[src]

Returns whether this scalar is a boolean.

pub fn is_signed_integer(self) -> bool[src]

Returns whether this scalar is a signed integer.

Booleans are not considered to be signed integers.

pub fn is_unsigned_integer(self) -> bool[src]

Returns whether this scalar is an unsigned integer.

Booleans are not considered to be unsigned integers.

pub fn is_signed(self) -> bool[src]

Returns whether this scalar is signed.

pub fn is_integer(self) -> bool[src]

Returns whether this scalar is an integer.

Booleans are not considered to be integers.

pub fn is_numeric(self) -> bool[src]

Returns whether the scalar is a numeric.

pub fn bits(self) -> u32[src]

Return the length of this scalar type in bits.

pub fn is_upcast(self, target: ScalarKind) -> bool[src]

Returns whether this type is smaller in bits than target.

pub fn is_strict_upcast(self, target: ScalarKind) -> bool[src]

Returns whether this type is strictly smaller in bits than target.

Trait Implementations

impl Clone for ScalarKind[src]

impl Copy for ScalarKind[src]

impl Debug for ScalarKind[src]

impl Display for ScalarKind[src]

impl Eq for ScalarKind[src]

impl Hash for ScalarKind[src]

impl PartialEq<ScalarKind> for ScalarKind[src]

impl StructuralEq for ScalarKind[src]

impl StructuralPartialEq for ScalarKind[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.