Trait melior_next::ir::type::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§
Provided Methods§
sourcefn context(&self) -> ContextRef<'c>
fn context(&self) -> ContextRef<'c>
Gets a context.
sourcefn is_integer(&self) -> bool
fn is_integer(&self) -> bool
Returns true
if a type is integer.
sourcefn get_width(&self) -> Option<u32>
fn get_width(&self) -> Option<u32>
Gets the bit width of this integer type.
Returns None if this type is not an integer.
sourcefn is_bfloat16(&self) -> bool
fn is_bfloat16(&self) -> bool
Returns true
if a type is bfloat16.
sourcefn is_float16(&self) -> bool
fn is_float16(&self) -> bool
Returns true
if a type is float16.
sourcefn is_float32(&self) -> bool
fn is_float32(&self) -> bool
Returns true
if a type is float32.
sourcefn is_float64(&self) -> bool
fn is_float64(&self) -> bool
Returns true
if a type is float64.
sourcefn is_function(&self) -> bool
fn is_function(&self) -> bool
Returns true
if a type is a function.
sourcefn is_mem_ref(&self) -> bool
fn is_mem_ref(&self) -> bool
Returns true
if a type is a memory reference.