Trait melior_next::ir::TypeLike

source ·
pub trait TypeLike<'c> {
Show 15 methods // Required method fn to_raw(&self) -> MlirType; // Provided methods fn context(&self) -> ContextRef<'c> { ... } fn id(&self) -> Id { ... } fn is_integer(&self) -> bool { ... } fn get_width(&self) -> Option<u32> { ... } fn is_index(&self) -> bool { ... } fn is_bfloat16(&self) -> bool { ... } fn is_float16(&self) -> bool { ... } fn is_float32(&self) -> bool { ... } fn is_float64(&self) -> bool { ... } fn is_function(&self) -> bool { ... } fn is_mem_ref(&self) -> bool { ... } fn is_tuple(&self) -> bool { ... } fn is_vector(&self) -> bool { ... } fn dump(&self) { ... }
}
Expand description

Trait for type-like types.

Required Methods§

source

fn to_raw(&self) -> MlirType

Converts a type into a raw type.

Provided Methods§

source

fn context(&self) -> ContextRef<'c>

Gets a context.

source

fn id(&self) -> Id

Gets an ID.

source

fn is_integer(&self) -> bool

Returns true if a type is integer.

source

fn get_width(&self) -> Option<u32>

Gets the bit width of this integer type.

Returns None if this type is not an integer.

source

fn is_index(&self) -> bool

Returns true if a type is index.

source

fn is_bfloat16(&self) -> bool

Returns true if a type is bfloat16.

source

fn is_float16(&self) -> bool

Returns true if a type is float16.

source

fn is_float32(&self) -> bool

Returns true if a type is float32.

source

fn is_float64(&self) -> bool

Returns true if a type is float64.

source

fn is_function(&self) -> bool

Returns true if a type is a function.

source

fn is_mem_ref(&self) -> bool

Returns true if a type is a memory reference.

source

fn is_tuple(&self) -> bool

Returns true if a type is a tuple.

source

fn is_vector(&self) -> bool

Returns true if a type is a vector.

source

fn dump(&self)

Dumps a type.

Implementors§

source§

impl<'c> TypeLike<'c> for Function<'c>

source§

impl<'c> TypeLike<'c> for Tuple<'c>

source§

impl<'c> TypeLike<'c> for Type<'c>